scope-guard

A final scope check for code changes before calling them finished or committing them. It checks whether the work matches the request, specification, or agreed task and whether unrelated code or unnecessary flexibility was added.

In plain words
What is it for?
Use it before declaring substantial work done or committing it to review the diff, remove unrelated refactors, confirm safety requirements, and record deliberate deferrals in the project's debt tracking.
Why use it?
Automated checks can pass even when a change includes unrequested work or weakens safety protections. This review helps keep the change focused and catches issues such as missing authorization, data-loss handling, or unmarked shortcuts.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/tradebaas/groundwork/scope-guard
Any agent
npx skills add Tradebaas/Groundwork --skill scope-guard
Clone the repo
git clone --depth 1 https://github.com/Tradebaas/Groundwork

Made for: Claude Code, Codex.

Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 504 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00055 $0.00504
Opus 5 $0.00028 $0.00252
Sonnet 5 $0.00011 $0.00101
Haiku 4.5 $0.00006 $0.00050

Measured 2d ago against content hash 79af7e41c62d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

scope-guard 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.

.agents/skills/scope-guard/SKILL.md · 32 lines

What it actually says

scope-guard: before you say "done"

The gates (checks/check.mjs, typecheck, lint, tests) are the floor and must be green. This checklist catches what they can't see. Answer honestly; the point is the answers, not the ritual.

  1. Trace. Does every part of this diff trace to a spec, an SC-item in BRIEF.md, or an explicit request? Anything that doesn't → out of the diff, into INTAKE.md.
  2. Ladder. Did something get built that already existed: in the repo, the platform, or a dependency? Rebuilt-in-disguise counts.
  3. Minimum. Is there code here for cases nobody asked for: options, abstractions, "flexibility"? Deletion is still cheap now; a month from now it's archaeology.
  4. While-I-was-here. Any refactors, renames, or cleanups outside the task? Revert them or split them into their own proposed change; never smuggle them along.
  5. Safety floor intact? Validation at trust boundaries, authorization, data-loss error handling, no silently swallowed failures, secrets, accessibility: none simplified away (AGENTS.md hard rule).
  6. Deferrals marked. Every deliberate simplification has a defer: marker with a ceiling and an upgrade trigger, and a DEBT.md row if it will outlive this change.
  7. Done means verified. Has verify actually been run on this change, behavior exercised, not just green tools? If not, that's the next step, not this one.
  8. Good is good. Now that it passes: stop. List improvement ideas in INTAKE.md if they're worth keeping; build none of them unasked.

Then update what the change touched: STATE.md (always), the spec status, DEBT.md, stale docs (retired wording → denylist). Report the check's outcome in one or two lines: findings and what you did about them, or "clean". ⚓

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 First seen · 32 lines · 55 tokens per session scan A 79af7e41c62d

Subscribe to this mod's changes

scope-guard is a skill published in the GitHub repository Tradebaas/Groundwork (2 stars, last pushed 7d ago), licensed MIT. It adds 55 tokens to every session and 504 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-31.

Related

Other skills, from other repositories

conventional-commit

Draft a Conventional Commit message when the user requests a commit or message. Formats only; does not authorize Git operations.

bnet47/codexicon · 28 tokens

keel-autopilot

Gated autonomy for one session — advance phases back-to-back with the full /keel-phase-review run at every gate, auto-commit at phase ends, batch pushes for ONE approval. Stops on gate FAIL, UNCERTAIN decisions, architecture surprises, or security-adjacent changes. Push is never automatic. Solo sessions or an agent…

muratsilahtaroglu/claude-code-starter-kit · 103 tokens

merge-to-dev

Squash-merge the feature commits into dev, regenerate docstrings, and verify the whole suite plus whole-suite stubtest are clean.

nullhack/temple8 · 31 tokens

ship-unit

Commit the built unit as one logical change with a descriptive imperative message.

nullhack/temple8 · 17 tokens

git-precommit

Orchestrate pre-commit workflow including Memory Bank sync, README/CHANGELOG/ROADMAP updates. Triggers: GIT, gc, push, commit, 提交, 準備 commit, 要提交了, git commit, pre-commit, 推送, stage, 暫存, checkin, 簽入, submit, save, 準備發布, ready to commit, 要推了.

u9401066/template-is-all-you-need · 92 tokens

git-doc-updater

Auto-check and update key documentation before Git commits to keep docs in sync with code. Triggers: docs, 文檔, 更新文檔, sync docs, release, 發布, documentation, 同步文件, 文件檢查, doc check, 發布前, before release, 準備發布.

u9401066/template-is-all-you-need · 71 tokens