---
title: "snap"
url: "https://claudemods.dev/zh-tw/builds/snap-5ae6cf"
source: "https://github.com/0xGondarxyz/claude-code-mods/tree/main/snap"
source_type: "github"
repo: "https://github.com/0xGondarxyz/claude-code-mods/tree/main/snap"
author: "0xGondarxyz"
author_handle: "0xGondarxyz"
stars: 0
category: "工具與整合"
categories: ["tools"]
tags: ["claude-code", "hooks", "kde", "mod", "plugin", "screenshot", "spectacle"]
permission_level: 2
scan_complete: true
install: "claude plugin marketplace add 0xGondarxyz/claude-code-mods\nclaude plugin install snap"
added: "2026-10-05T15:22:05.364Z"
updated: "2026-10-04T03:31:50Z"
locale: "zh-tw"
content_locale: "zh-tw"
---

# snap

一個 Claude Code 外掛。輸入 `/snap`，在螢幕上拖出一個框，截圖就會放進下一則訊息。

## Description

# snap

一個 Claude Code 外掛。輸入 `/snap`，在螢幕上拖出一個框，截圖就會放進下一則訊息。

## 運作方式

1. `/snap` 以區域模式執行 Spectacle：`spectacle --region --background --nonotify --output <file>`。
2. 檔案會寫入 `~/.cache/claude-snaps/snap-<YYYYMMDD-HHMMSS>.png`。
3. 外掛會在提示框的游標處插入 `@<path> `。Claude Code 會讀取以 @ 提及的影像檔案。
4. 按 Escape、沒有檔案或結束碼非零時，會顯示通知 `Snap cancelled`，而且不做任何變更。找不到 Spectacle 時會顯示 `Snap needs Spectacle (KDE)`。

外掛無法直接把影像附加到草稿（這些型別只描述已送出的提示所附的內容），所以這個外掛使用 @path 文字。

你有 2 分鐘可以拖出選取框。

## 需求

附有 Spectacle 的 KDE（`/usr/bin/spectacle`）。

## 開發

    claude plugin validate .
    tsc -p .
    claude plugin test .

## Install

```
claude plugin marketplace add 0xGondarxyz/claude-code-mods
claude plugin install snap
```

## Original README

# snap

A Claude Code mod. Type `/snap`, drag a box on the screen, and the screenshot goes into your next message.

## How it works

1. `/snap` runs Spectacle in region mode: `spectacle --region --background --nonotify --output <file>`.
2. The file lands in `~/.cache/claude-snaps/snap-<YYYYMMDD-HHMMSS>.png`.
3. The mod inserts `@<path> ` at the cursor in your prompt box. Claude Code reads an @-mentioned image file.
4. Escape, no file, or a non-zero exit shows the toast `Snap cancelled` and changes nothing. A missing Spectacle shows `Snap needs Spectacle (KDE)`.

A plugin cannot attach an image to the draft itself (the types only describe attachments of a prompt already sent), so the mod uses the @path text.

You have 2 minutes to drag the box.

## Requirements

KDE with Spectacle (`/usr/bin/spectacle`).

## Develop

    claude plugin validate .
    tsc -p .
    claude plugin test .
