Logo Sweep

Sweep

Cộng đồng
iamneilroberts
sweep

Use when work may have been dropped between sessions — after a crash, a lockup, parallel-session churn, or on a "did we drop anything?" hunch. Crawls worktrees, local AND remote branches, stashes, deploy targets, and intent docs (handoffs, checklists, plans, coordination journals); triages every item against ground truth (patch-id merge equivalence vs fetched origin/main, live BUILD_SHA/bundle provenance, PR state); presents a ranked loose-end ledger for ONE batch approval; then methodically recovers approved items via playbooks (adopt stray WIP, resume handoffs, rebase→test→push→PR). Never deploys, merges to main, force-pushes, or prunes autonomously. Complements /sitrep (read-only state-of-union) and a live project-board skill if you have one (e.g. /pm); triggers on /sweep, "sweep for dropped work", "what did we lose in the crash", "find stranded work", "recover dropped work", "loose ends sweep".

Tổng quan

Nhà phát hànhiamneilroberts
Kho mãclaude-skills
Tên kỹ năngsweep
Sao
37
Bản fork
6
Tệp đi kèm
3
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 3 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được iamneilroberts công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Sweep trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/iamneilroberts/claude-skills/tree/main/skills/sweep
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/iamneilroberts/claude-skills.git /tmp/claude-skills
mkdir -p .claude/skills
cp -r /tmp/claude-skills/skills/sweep .claude/skills/sweep
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Sweep trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Sweep ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Sweep với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

/sweep — dropped-work sweep & recovery

Find work stranded between "exists on disk" and "merged + deployed"; recover it methodically after one batch approval. Born from a real multi-session crash recovery (2026-07-09) — every detection below corresponds to a failure mode that actually happened.

Invocation & scope

  • /sweep — current repo + every git worktree list entry of it (default).
  • /sweep all — every repo in the Config table below.
  • /sweep <path> — a named repo (+ its worktrees).

Config (edit this table for your repos — this is a template)

RepoPolicyDeploy provenance
~/dev/my-appnormalBUILD_SHA via /version endpoint (see Provenance notes)
~/dev/my-app-webnormalweb bundle hash → commit mapping (see Provenance notes)
~/dev/my-app-legacyreport_onlydeprecated; findings report-only / port-out

Provenance notes (exact commands live here, NOT in the table — markdown tables mangle pipes):

bash
# my-app: prod + staging stamp BUILD_SHA
curl -s https://<your-worker>/version   # {"sha":...,"env":"production"}
curl -s https://<your-staging-host>/version               # {"sha":...,"env":"staging"}
# arbiter when HTTP is ambiguous: npx wrangler deployments list (or your platform's equivalent)

# my-app-web: bundle hash, mapped to a commit READ-ONLY
curl -s https://<your-app>/ | grep -o 'index-[^"]*\.js'
# map via `git log --oneline -- web/` history + your deploy tool's release list.
# NEVER run a local build during discovery/triage (a local build writes build
# artifacts — violates the non-destructive rule). Unmappable read-only →
# report "DATA GAP: bundle-hash unmapped".

# a repo with no SHA endpoint: /health proves liveness only — there is NO deployed-SHA source.
curl -s https://<your-app>/health
# Deploy-surface comparison for this repo is BY DESIGN a stated limitation, not an
# error: record "deploy provenance: liveness-only (no SHA endpoint)" in the ledger's
# completeness section. Do not hunt for a SHA; do not mark it DATA GAP.

Coordination journals: your coordination/worktree journal (plus any handoffs/ directory it references). In-repo docs/worktree-journal.md may be a tombstone pointing elsewhere — ALWAYS follow the pointer (the active journal is the one that counts for staleness/heartbeats).

Policy semantics: in a report_only repo the only dispositions allowed are report-only and port-out (recover content INTO a normal repo); Phase 4 refuses to execute any mutation inside the repo — enforced at execution time, not just proposal time. Discovery skips git fetch there (use existing refs; note their fetch age).

Ground rules (non-negotiable)

  1. Machinery state is not ground truth. Journal/handoff/memory lines saying "SHIPPED" or "PENDING" are claims. Verify every claim against the real artifact: git containment, live BUILD_SHA/bundle hash, an HTTP read, gh pr list.
  2. Discovery/triage are non-destructive. Exactly three writes are permitted in Phases 1–3: (a) git fetch in normal repos (remote-tracking refs only — never checkout/pull/working-tree); (b) the ledger file; (c) nothing else. Use git fsck --unreachable --no-reflogs, NEVER --lost-found (it writes).
  3. One batch gate; individual re-asks on top. Recovery runs only after the user approves the ledger. Even inside an approved batch, ALWAYS re-ask individually: prod/staging deploys, ANY push to a shared/protected branch (fast-forward included), merges to main, --force-with-lease, branch/worktree deletion, discarding any diff. Recovery stops at PR-opened; deploys are recommendations with the exact gated command, never executed.
  4. Respect other sessions. Uncommitted WIP you didn't create belongs to someone else until proven stale (file mtimes + ACTIVE journal heartbeats + live sessions — the orphaned-wip-adopter staleness test if you have it — otherwise apply the staleness test inline: file mtimes + journal heartbeats + live sessions — but read the ACTIVE journal per Config, overriding that skill's own docs/worktree-journal.md reference). Active work is leave-active / DO-NOT-TOUCH: never staged, stashed, or built on.
  5. Zero findings in a category is stated explicitly (silence reads as "not checked"). A source that errors is a DATA GAP — report it, never invent.

Phase 1 — Discover (read-only)

Dispatch one subagent per repo (Agent tool, model: sonnet pinned), each prompted: "Read ~/.claude/skills/sweep/references/discovery-protocol.md. Sweep (policy: ). Deploy-provenance hints: <the repo's full Config-table row + Provenance notes>. Coordination journal: . Return the finding list only." The dispatcher COPIES the config context into the prompt — the subagent cannot see this SKILL.md. Dispatch all repos in one message for /sweep all.

Phase 2 — Triage

For each finding, run the checks in ~/.claude/skills/sweep/references/triage-rules.md (main session, or one sonnet subagent per repo for large sweeps — a triage subagent's prompt must ALSO carry the repo's Config row and resolved journal path, since it cannot see this SKILL.md; supersession judgment calls may use model: opus). Every surviving item carries: evidence command + output (REDACTED per triage-rules), the claim it contradicts (if any), one-line proposed fix, proposed disposition.

Phase 3 — Ledger + the single gate

Write the ledger (template below) to docs/digests/YYYY-MM-DD-sweep.md in the repo /sweep was invoked from — never into a report_only repo; if the invoking directory is report_only or not a repo, write ~/.claude/coordination/sweep/YYYY-MM-DD-<repo>-sweep.md instead. No-clobber: if the filename already exists (same-day re-sweep), NEVER overwrite — the existing Recovery log is the checkpoint record of what already executed. Write YYYY-MM-DD-sweep-2.md (-3, …), link the prior ledger at the top, and carry its executed/blocked items forward so nothing re-runs. Present the compact table in-chat and ask the user to approve/edit/veto the batch — ONE question, listing each item's id, category, one-liner, and proposed disposition.

Ledger template

markdown
# /sweep — YYYY-MM-DD (<scope>)

**Status:** COMPLETE | DATA GAPS: <list>
**Baseline:** origin/main = <sha> · prod = <sha/provenance> · staging = <sha> (per repo)

## 1. LOSS-RISK (would vanish on disk death)
- [ ] SW-1 <worktree/branch> — <uncommitted diff / unpushed commits / stash> ·
      evidence: `<cmd>` → `<output>` · fix: <one-liner> · proposed: <disposition>
## 2. NEEDS MERGE
## 3. NEEDS DEPLOY (commands given, never run)
## 4. NEEDS RECONCILE
## 5. SUSPECT ARTIFACTS
## 6. UNFINISHED INTENT
## 7. HYGIENE

(each category: items as above, or "None found — checked.")

## Recovery log   <!-- Phase 4 appends here; checkpoint after EVERY item -->
- [ ] SW-<n>: <outcome line>

Phase 4 — Recover (only after approval)

Execute approved items in category order, one at a time, via the matching playbook in ~/.claude/skills/sweep/references/recovery-playbooks.md. After EVERY item update the ledger's Recovery log (- [x] + outcome) — a second crash mid-sweep must itself be sweepable. Re-ask individually per ground rule 3. report_only repos: refuse in-repo mutation; port-out only.

Non-goals

Not a daily-driver digest skill (if you have one), not a live project board (if you have one, e.g. /pm), no issue-tracker sweep (if you have one), no memory/chat-history mining lane (/sitrep's historical lane covers that here, if present). Never merges to main, deploys, force-pushes, or prunes autonomously.

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Sweep làm được gì?

Use when work may have been dropped between sessions — after a crash, a lockup, parallel-session churn, or on a "did we drop anything?" hunch. Crawls worktrees, local AND remote branches, stashes, deploy targets, and intent docs (handoffs, checklists, plans, coordination journals); triages every item against ground truth (patch-id merge equivalence vs fetched origin/main, live BUILD_SHA/bundle provenance, PR state); presents a ranked loose-end ledger for ONE batch approval; then methodically recovers approved items via playbooks (adopt stray WIP, resume handoffs, rebase→test→push→PR). Never...

Vì sao nên dùng Sweep trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Sweep là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Sweep trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/iamneilroberts/claude-skills/tree/main/skills/sweep. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Sweep?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Sweep với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Sweep với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Sweep có miễn phí không?

Kỹ năng này được iamneilroberts phát hành trên GitHub. Hãy xem điều khoản giấy phép trong kho mã. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇