agentleFS
luisgui1757luisgui1757/sentinel/skills/untangle/SKILL.md

untangle

Skill0 starsChanged 9 days agoMITView on GitHub

Finds the parts of a repository, or of one area, that its objective does not need, and removes them only with proof that behavior and numeric results stay the same. Use only when the user asks to untangle, reduce complexity, or find what to cut or delete. Not for the review of one diff.

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

18 rules. 0 are common, 18 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 18

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not start subagents or other reviewers, unless the user asks.

    line 19
  2. Distinctive:

    If the check pass finds a material proposal, report it and stop.

    line 21
  3. Distinctive:

    Read the README, the public interfaces, the persisted formats, the tests of public behavior and the CI gate.

    line 26
  4. Distinctive:

    Use references, imports, call sites, CI configuration and links as evidence.

    line 49
  5. Distinctive:

    Do not judge a part by its name.

    line 50
  6. Distinctive:

    Add each matching part, even when it never becomes a removal proposal.

    line 53
  7. Distinctive:

    If you do not know why a part exists, read its history with git log first.

    line 72
  8. Distinctive:

    Keep the part if the reason still applies.

    line 73
  9. Distinctive:

    No contract item depends on the part.

    line 83
  10. Distinctive:

    If you cannot get this evidence, keep the part and give the reason.

    line 90
  11. Distinctive:

    Start with "Already minimal", or the number of material proposals and whether you applied them.

    line 101
  12. Distinctive:

    Use this format before changes and after approved changes.

    line 105
  13. Distinctive:

    After changes, state which proposals you applied.

    line 115
  14. Distinctive:

    Add other rejected candidates with their reasons.

    line 130
  15. Distinctive:

    Write "None found" for an empty group only after checking it.

    line 131
  16. Distinctive:

    Before changes, give the planned checks and output comparisons.

    line 136
  17. Distinctive:

    After changes, give the actual results before and after each cut.

    line 137
  18. Distinctive:

    After the last proposal, run steps 2 to 4 again as the check pass.

    line 152

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Untangle

Find the parts of a codebase that do not serve its objective. Remove or merge them only with proof. "Already minimal" is a correct and complete result. Do not make a change to show progress.

This skill changes no files until the user approves a list of proposals. Apply a proposal only when the user asks.

Budget

  • A run has two passes at most: the analysis in steps 1 to 5, and one check pass in step 6. Never start a third pass.
  • Do not start subagents or other reviewers, unless the user asks. One agent keeps the full map, so that a second run gives the same result.
  • If the check pass finds a material proposal, report it and stop. Start a new run only when the user asks.

1. Write the contract

Read the README, the public interfaces, the persisted formats, the tests of public behavior and the CI gate. Then write the contract:

  • The objective of the repository, in one or two sentences.
  • Each behavior that a user or a caller needs. Include commands, interfaces, file formats, outputs and supported platforms.
  • Each numeric output, with the tolerance that the project states. If the project states no tolerance, the output must stay byte-equal.
  • The gate: the commands that must pass.

Give the source of each item. Show the contract to the user and wait for approval. If the evidence does not give a contract, stop and ask.

A feature that the user keeps on purpose belongs in the contract. If the README does not name it, propose one README line for it. Conventional behavior, such as --help or exit codes, and files that a tool reads, such as .editorconfig, need no README line. Do not keep a file of rejected proposals.

2. Map each part to the contract

List files, modules, functions, dependencies, configuration, CI jobs, scripts, tests and documents. Find the contract item that each part serves. Use references, imports, call sites, CI configuration and links as evidence. Do not judge a part by its name.

Build the Kept list now, with the three groups in step 5. Add each matching part, even when it never becomes a removal proposal. Record its exact name, the reason to keep it and the evidence.

3. Find candidates

A part is a candidate when it has one of these problems:

  • Dead: nothing calls, imports, runs or links to it.
  • Duplicate: two parts give the same behavior.
  • Speculative: an option, host, mode or layer that no user or caller uses.
  • Defensive: a guard for a state that the contract, the types or the callers exclude.
  • Ceremony: a check, a document or a step that only verifies another check, document or step.
  • Frozen: a test that locks wording, file layout or a private helper, and no behavior of the contract.
  • Tangled: a layer with one caller and no boundary, or a dependency in the wrong direction.

If you do not know why a part exists, read its history with git log first. Keep the part if the reason still applies.

A candidate is material when its removal takes away a whole part. Examples are a file, a dependency, a CI job, an option, a layer or a code path. Other candidates are nits, such as one guard condition or one assertion.

4. Apply the gate

Each proposal needs all of this evidence:

  • No contract item depends on the part. Show the search that proves it.
  • Each behavior that moves has a new place, and you name it.
  • A plan to compare before and after: the gate passes, and the observable outputs stay equal. For numeric code, use the fixtures of the project and representative inputs. Compare the results byte for byte, or within the stated tolerance.

If you cannot get this evidence, keep the part and give the reason. Do not propose to remove these parts:

  • A part that the contract names.
  • A security boundary or the validation of external input.
  • A migration, or a reader for an old persisted format that is still in use.
  • A license, a notice or a credit.
  • The only test of a contract behavior.

5. Report

Start with "Already minimal", or the number of material proposals and whether you applied them. "Already minimal" means that no material proposal passes the gate.

Use this format before changes and after approved changes.

Contract

Give the objective, needed behavior, numeric tolerance and gate, with sources.

Cuts

List proposals with the largest gain first. For each, give the part, problem, evidence, change and size. After changes, state which proposals you applied.

Kept

Copy the list from step 2. Give each part its own line with its exact name, reason and evidence. Use these groups:

  • Public interfaces: parts that external callers need, even without internal callers.
  • Runtime selection: functions or files selected through names built at runtime. Name the selected parts and the code that selects them.
  • Compatibility: readers for older data and branches for supported modes or external settings.

Add other rejected candidates with their reasons. Write "None found" for an empty group only after checking it. A contract statement does not replace an entry in this list.

Proof

Before changes, give the planned checks and output comparisons. After changes, give the actual results before and after each cut. State the check-pass result and each check that did not run.

Nits

Give one line for each nit. Apply a nit only when the user asks.

6. Apply, when the user asks

Apply one proposal in each commit. Capture the outputs before the change. Make the change, run the gate and compare the outputs again. If a result differs, revert that proposal and report it. Do not change behavior to make a comparison pass.

After the last proposal, run steps 2 to 4 again as the check pass. It must find no new material proposal from the same evidence. If it finds one, report it as a gap in the first run. Do not apply it.

Finish with the report from step 5, including every retained entry in Kept.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.