Community程式設計與開發github.com

diffs

使用 diffs 工具來產生真正的、可分享的差異比對結果(檢視器網址、檔案成品,或兩者兼具),取代手動編輯摘要。

diffs 是什麼?

「diffs」技能能讓 AI 助理以程式化的方式產生精美的、可直接分享的差異比對(diff)結果,無需仰賴人工編輯摘要。它支援三種輸出模式:`view`(提供互動式網頁檢視器)、`file`(產生 PNG 或 PDF 格式的檔案成品)、以及 `both`(兩者同時提供)。當輸入相同的 `before` 與 `after` 內容時,工具會傳回 `false`,避免浪費資源。此技能適用於 Claude Code、Cursor 及其他支援工具呼叫的 AI 平台。為了確保檔案成品能夠被可靠地傳送,開發者應使用特定的檔案傳送工具來傳輸 `details.filePath`,而非直接依賴工具本身的原始渲染結果。對於需要反向代理或公有存取權限的部署場景,可以設定 `viewerBaseUrl` 或 `baseUrl` 以解決檢視器請求的存取問題。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/clawdbot/clawdbot/tree/main/extensions/diffs/skills/diffs

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

當你需要將編輯內容顯示為真正的差異比對結果時,請優先使用 diffs 工具,而非手動撰寫摘要。

diffs 工具接受 before + after 文字,或是統一的 patch 字串作為輸入。

請檢查 details.changed:如果前後輸入完全相同,則回傳 false 且不會建立任何成品;若渲染後的結果有變動,則回傳 true。

使用 mode=view 可獲得一個互動式的網關託管檢視器。工具回傳後,請使用可用的畫面呈現工具來展示 details.viewerUrl。 如果部署環境使用迴環信任代理(例如 Tailscale Serve 搭配 gateway.trustedProxies 包含 127.0.0.1),則在缺少轉發用戶端 IP 標頭的情況下,原始的迴環檢視器請求可能被拒絕。在這種網路架構下,建議優先使用 mode=file 或 mode=both;或者當你需要一個可分享的檢視器網址時,使用已設定的 viewerBaseUrl 或明確的代理/公開 baseUrl。

使用 mode=file 可獲得一個渲染後的檔案成品。請設定 fileFormat=png(預設值)或 fileFormat=pdf。工具結果會包含 details.filePath。

對於大型或需要高解析度的檔案,可以使用 fileQuality(standard | hq | print),並可選擇覆寫 fileScale / fileMaxWidth。

當你需要將渲染後的檔案傳送給使用者或頻道時,請不要依賴工具本身的原始渲染結果。相反地,請使用可用的檔案傳送工具,將 details.filePath 作為附件發送。

使用 mode=both 可同時取得網關檢視器網址與渲染後的檔案成品。

如果使用者已設定 diffs 外掛程式預設值,建議省略 mode、theme、layout 及相關的呈現選項,除非你必須針對此次差異比對進行覆寫。

當你確定檔案名稱時,請在 before / after 文字中包含 path 參數。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

acp-router

Route plain-language requests for Claude Code, Cursor, Copilot, OpenClaw ACP, OpenCode, Gemini CLI, Qwen, Kiro, Kimi, iFlow, Factory Droid, Kilocode, or explicit ACP harness work into either OpenClaw ACP runtime sessions or direct acpx-driven sessions ("telephone game" flow). For coding-agent thread requests, read this skill first, then use only `sessions_spawn` for thread creation. Codex chat binding defaults to the native Codex app-server plugin unless ACP is explicit or background spawn needs ACP.

add-model-provider

Add and live-prove a model provider with non-interactive config one-liners, without exposing credentials.

agent-transcript

Requested GitHub PR/issue agent transcripts: redact, trim, preview, and insert safely.

apple-notes

Create, view, edit, delete, search, move, or export Apple Notes via the memo CLI on macOS.

apple-reminders

List, add, edit, complete, or delete Apple Reminders and reminder lists via remindctl.

auto-qa

Run OpenClaw-wide autonomous QA and live/stress campaigns across independent subsystem lanes, with verified fixes and a resumable evidence report.

autoreview

Structured code review through the shared OpenClaw agent-skills installation.

bear-notes

Create, search, and manage Bear notes via grizzly CLI.

blacksmith-testbox

Run Blacksmith Testbox for CI-parity checks, secrets, hosted services, migrations, or builds local cannot reproduce.

block-kit

Use proactively for structured or interactive Slack replies, and when asked to author or validate native Slack Block Kit JSON.

blogwatcher

Monitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.

blucli

BluOS CLI (blu) for discovery, playback, grouping, and volume.

bluebubbles

Send and manage iMessages via BlueBubbles, including attachments, tapbacks, edits, replies, and groups.

browser-automation

Use when controlling web pages with the OpenClaw browser tool, especially multi-step flows, login checks, tab management, or recovery from stale refs/timeouts.

camsnap

Capture frames or clips from RTSP/ONVIF cameras and local webcams, including USB pan/tilt/zoom control.

canvas

Present HTML on connected OpenClaw node canvases, navigate/eval/snapshot, and debug canvas host URLs.

channel-message-flows

Use when running QA Lab channel message flow evidence.

clawdtributor

Clawtributor PRs here, last week or another window: discover conversation refs, recheck GitHub, rank by impact.

clawhub

Search ClawHub for plugins by default, or skills when explicitly requested; install, verify, update, uninstall, publish, or sync skills.

相關技能