spectre-sweep

spectre-sweep is a skill for Claude Code from joenandez/spectre. It costs 70 tokens per session (990 once invoked), scanned A, original, MIT.

A pre-commit cleanup process for changed files that reviews the diff, removes temporary problems, runs relevant checks, and creates conventional commits.

In plain words
What is it for?
Use it to prepare uncommitted work for commit by checking the working tree, cleaning changed files, running related verification, and making descriptive commits.
Why use it?
It catches stray logs, dead code, secrets, formatting problems, and affected test or lint failures before the changes are checked in.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions subagents.

Good fit Use it to prepare uncommitted work for commit by checking the working tree, cleaning changed files, running related verification, and making descriptive commits.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/joenandez/spectre/spectre-sweep
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add joenandez/spectre --skill spectre-sweep
Clone the repo
git clone --depth 1 https://github.com/joenandez/spectre

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for spectre-sweep

README.md
[![agentmods](https://agentmods.dev/badge/skills/joenandez/spectre/spectre-sweep/github.svg)](https://agentmods.dev/skills/joenandez/spectre/spectre-sweep)
Your own site
<a href="https://agentmods.dev/skills/joenandez/spectre/spectre-sweep"><img src="https://agentmods.dev/badge/skills/joenandez/spectre/spectre-sweep/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for spectre-sweep

Your own site · 80×15
<a href="https://agentmods.dev/skills/joenandez/spectre/spectre-sweep"><img src="https://agentmods.dev/badge/skills/joenandez/spectre/spectre-sweep.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 990 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 9
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00070 $0.00990
Opus 5 $0.00035 $0.00495
Sonnet 5 $0.00014 $0.00198
Haiku 4.5 $0.00007 $0.00099

Measured 2d ago against content hash 0341909815d0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

spectre-sweep scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/spectre-codex/skills/spectre-sweep/SKILL.md · 52 lines

How it starts

The opening of the file, as written. The whole thing — 52 lines — stays where its author put it; the contents beside it link to each section on GitHub.

sweep

Prepare uncommitted or recently-changed work for check-in: a fast, formulaic hygiene pass, then descriptive conventional commits. No subagents, no approval gates — execute each step and move on.

Inputs

  • $ARGUMENTS (optional scope/intent hint, compact Prune/Test check results, plus --orchestrated when a parent owns the next step). Read the live working tree at runtime (git status, git diff) — do not assume a prior phase ran.

Working Set

Changed files only. Opportunistic, not forensic — do not hunt beyond the diff.

Outputs + DONE

One or more conventional commits covering the changes. Sweep is the sole pre-rebase commit owner in orchestrated Ship/Clean mode. DONE when:

  • Diff reviewed: no unintended edits, no out-of-scope staged files, no secrets/keys/credentials/PII.
  • Debug/temp logging removed; intentional logs (errors, key state transitions) kept at production-appropriate levels.
  • Commented-out code, session-introduced TODO/FIXME/HACK, and hardcoded test values resolved or documented.
  • Lint passes with zero violations fixed by suppression — refactor structural issues, never eslint-disable or equivalent. .gitignore covers temp/build/IDE artifacts.
  • Stale/uncovered integrated lint/typecheck/build/related checks have no branch-caused failure; unrelated findings are recorded/routed.
  • Staging includes canonical specs/research/decisions/final reviews, bug-report.md, and required proof/proof.json + proof/proof.html, but excludes Execute evidence, verification reports, checkpoints, runs, markers, working-set/cleanup summaries, and local lifecycle state. Product/CI-consumed qualification artifacts belong at product-owned paths and may be staged.
  • Work committed as type(scope): description conventional commits, split by concern.

Method / guardrails

  1. Diff sanity and artifact tenancy — scan the full diff for accidental edits, stray staged files, secrets, and local lifecycle residue. Ensure local artifact patterns are ignored; never stage or commit them.
  2. Log + code hygiene — strip debug logging, commented-out code, leftover TODO/FIXME from this work, hardcoded test values; keep intentional logs.
  3. Opportunistic dead code (changed files only) — orphaned imports, unused vars/functions, debugger statements. No deep investigation.
  4. Strict lint — fix all violations by correcting code; YOU MUST NOT suppress or --no-verify. Refactor for size/complexity thresholds.
  5. Integrated verification — use received compact Prune/Test results to run only stale/uncovered lint/typecheck/build/related tests across demonstrated dependency boundaries. Never run a repository-wide baseline or full suite. A failure is repair or routing work, not a blocker: fix branch-caused failures and reverify; record/route unrelated failures and continue; reproduce only the failing check/test at the base SHA when attribution is indeterminate. Do NOT author new tests — this is a sweep, not a test pass.
  6. Commit — group by concern into conventional commits.
    • Types: feat · fix · refactor · test · chore · docs · style · perf.
    • Subject answers what changed and why; include scope (feat(auth): add token refresh on 401). Optional body for motivation/trade-offs.
    • One concern per commit — if it spans concerns, split it. Treat commits as durable context for future readers/LLMs; never fix: updates / refactor: clean up.

Read the full file on GitHub · 52 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago Changed · +7 lines 0341909815d0
  2. 7d ago Changed · -61 tokens per session 4b9a5a84a15c
  3. 12d ago First seen · 45 lines · 131 tokens per session scan A 01f3b4eec8dd

Subscribe to this mod's changes

spectre-sweep is a skill published in the GitHub repository joenandez/spectre (161 stars, last pushed 3d ago), licensed MIT. It adds 70 tokens to every session and 990 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

review-implement-phase

Implements triaged review actions, commits focused fixes, and posts Done plus resolves threads. Use when the user wants only the implementation phase of the review-framework workflow.

prisma/orm · 38 tokens

github-pr-workflow

Prepare a GitHub pull request from a feature branch — branch hygiene, commit shape, title/body, verification notes, screenshots for UI work, and replies to review comments.

paperclipai/paperclip · 39 tokens

github-automation

GitHub workflow automation, PR management, issue tracking, and code review coordination. Integrates with GitHub Actions and repository management. Use when: PR creation, code review, issue management, release automation, workflow setup. Skip when: local-only changes, non-GitHub repositories.

ruvnet/ruflo · 61 tokens

review-delta

Review only changes since last commit using impact analysis. Token-efficient delta review with automatic blast-radius detection.

tirth8205/code-review-graph · 24 tokens

work-unit-commits

Plan commits as reviewable work units. Trigger: implementation, commit splitting, chained PRs, or keeping tests and docs with code.

Gentleman-Programming/gentle-ai · 33 tokens

github-contributor

End-to-end playbook for shipping high-quality pull requests to open-source projects you don't maintain — discovery, CONTRIBUTING compliance, PR-size check, minimal-diff implementation, PR description with AI-assisted disclosure, conflict resolution, and post-submission maintainer interaction. Use whenever creating…

daymade/claude-code-skills · 133 tokens