Index of every page on this site: llms.txt
All skills
khoahyh avatar

/scope-prune

@fb2abb3
Run it yourself

Prune a completed implementation or PR back to the minimum durable change for its agreed problem. Use when asked what went beyond scope, whether the diff is too large, or to cut speculative behavior and tests after implementation.

Use this Skill: https://skilld.dev/gh/khoahyh/skills/scope-prune

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈61 tokens for metadata: the name and description. ≈1k when used: this file.

Description uses 3.0% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈244 characters, or 3.0%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Scope Prune

Start with the problem, not the patch. The target is the smallest durable implementation of the agreed outcome, not the fewest lines and not a general cleanup of nearby code.

1. Recover the boundary

Recover the accepted user outcome and later explicit decisions from the conversation and linked context. Use a Feature Contract, plan, or PR as evidence, not as independent authority to enlarge that outcome. Separate agreed behavior from suggested mechanisms, and record the in-scope failure path, non-goals, real compatibility obligations, and proof needed to know the problem stays solved. If the boundary is missing or contradictory, ask for the decision that would change what can be removed; do not infer product intent from the implementation or its tests.

Establish the requested diff baseline before judging size. For a PR or branch, include commits since the intended base plus staged, unstaged, and relevant untracked work; distinguish inherited and unrelated changes. For a narrower target, follow the user's range. Use subtract's Change Scopes to protect the index and history when editing staged or committed work.

2. Challenge the entire diff

Inspect every changed surface, including production code, tests, fixtures, docs, configuration, and generated output. Trace additions through their callers and the accepted failure path. For each coherent change, classify it as:

  • Essential: directly delivers the agreed result.
  • Necessary support: required for that result to work safely in a realistic supported path, including a named compatibility, security, or data-integrity obligation.
  • Extra: adjacent feature, speculative guard or fallback, generalized abstraction, redundant representation, broad refactor, or test that proves only an extra behavior or mirrors code without closing a risk.
  • Uncertain: removal depends on missing contract or consumer evidence.

Put the burden on additions: what concrete failure of the agreed outcome would removing this introduce? A passing test, an imaginable edge case, or “while we're here” is not an answer. Trace coupled extras as a group: deleting an unneeded behavior may also delete its validator, branch, fixture, test, and documentation. Conversely, preserve the smallest mechanism that satisfies a real obligation; do not turn scope control into a brittle fix.

3. Cut and prove

An explicit request to scope the implementation down authorizes the supported edits. Otherwise return the ranked cuts and their evidence before changing code. Delete extra behavior and its dependent artifacts first, then collapse or narrow remaining machinery. Keep unrelated work intact; make follow-up suggestions instead of implementing them. If an uncertain item changes the product contract or risk posture, leave it intact and ask the smallest necessary question.

Treat every added test as part of the diff to justify. Keep it when it detects a meaningful regression in the agreed outcome or a distinct, realistic failure that existing tests would miss. Remove tests for behavior being cut, duplicated coverage, speculative permutations, and reversible, low-impact edits where the test merely mirrors the implementation. A passing test does not justify keeping either the test or the behavior it asserts. Run focused tests appropriate to the surviving change and complete required checks. Broaden or repeat testing only when a new edit, failure, or unresolved risk invalidates that evidence. Inspect the complete final diff and status; passing checks cannot substitute for the scope judgment.

Finish with a concise accounting: agreed outcome, baseline, cuts made or proposed, why each retained non-obvious addition is necessary, before/after footprint by meaningful surfaces, verification, and unresolved boundary decisions. Stop when every changed surface has a disposition, the agreed behavior has evidence, and unrelated work is untouched. If no cut is justified, say why the size is necessary.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts1mo3 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    The skill provides instructional guidelines for minimizing code changes to meet specific goals. It contains no executable code or signs of malicious behavior.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: LOW · No issues

Signed by skilld at fb2abb3. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 days ago.

Activeupdated 2 months ago

README badge

README badge for khoahyh/skills/scope-prune