agentleFS
MammadovEshginMammadovEshgin/clean-code-skill/skills/interrogate/SKILL.md

interrogate

Skill1 starsChanged 2 months agoMITView on GitHub

Challenge a finished change from first principles before calling it done. Delete, then simplify, then stop. Target is a path or git range; default is the uncommitted diff.

73 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use ketchup-video, principle-explain-the-number and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • tristanphvnSkill

    ketchup-video

    Catch the user up like /keel:ketchup, with a short silent video of slides for what happened and the waiting calls as text under it. Use for /keel:ketchup-video.

    Also in 14 projects that use this

  • ianclearySkill

    principle-explain-the-number

    Apply before you trust, report, or act on a number you measured: a speedup, a regression, a throughput, a latency, or an eval result. Find what limits it, and rule out that it measured something other than the work you think.

    Also in 29 projects that use this

  • eryzerzSkill

    make-bot-ui

    Use when building a custom UI (page, dashboard, buttons) that should wake a Grok Bot over a webhook, when the user must provide a webhook sender key, or when exposing that UI on Tailscale.

    Also in 20 projects that use this

  • bnemaSkill

    setup-pstack

    Configure which Pi models pstack uses per role. Detects available provider/model specs and writes pstack's user configuration. Use for /setup-pstack, "configure pstack models", or changing pstack model choices.

    Also in 25 projects that use this

  • ianclearySkill

    poteto-help

    Guides users through pstack setup, /poteto-mode, and picking the skill, playbook, or principle for a task. Type /poteto-help with a question.

    Also in 14 projects that use this

  • Xia-AtaraxiaSkill

    benchmark-checklist

    Vets performance measurements for the limiter, tuning, physical limits, errors, repeatability, relevance, and proof that timed work happened. It applies to 'check this benchmark', 'report this speedup', measured regressions, and choosing a library or configuration from numbers. It reports spread and gaps before drawing a conclusion. Not for general testing policy or choosing test oracles - use principle-testing.

    Also in 37 projects that use this

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 73 edited versions we read keep these.

  • 1

    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:

    Run typecheck and the focused tests after the cuts.

    line 32

“Common” is measured: kept by at least 6 in 10 of the 73 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

Interrogate

Think from first principles about what the change is trying to achieve, then interrogate what was built before calling it done.

Target: $ARGUMENTS. Empty means the uncommitted diff (git diff HEAD); a ref means the diff since its merge-base.

Questions

Answer each in a line or two, against the actual diff, before touching anything. When a caller hands over a change record, its purpose line answers the first question.

  1. What is this change for? One sentence, from the user's point of view, without reference to the implementation.
  2. What is unnecessary, over-complicated, or resting on a weak assumption? Challenge each assumption: is it true, and is it needed?
  3. What can be deleted entirely? Files, functions, parameters, options, branches, tests, comments. Apply the deletion test: would removing it lose behaviour or information the user asked for?
  4. What becomes simpler once the deleted pieces are gone? A helper with two callers may now have one; a parameter may now have one value; a layer may now only forward.

Order of preference

Deleting over simplifying. Simplifying over optimizing. Optimizing over automating.

A cut lower on this list is only considered after the cuts above it are exhausted.

Act

  • Make the cuts, smallest edit first. Keep each cut independently reviewable.
  • Run typecheck and the focused tests after the cuts; run the full suite once at the end.
  • A cut that changes observable behaviour is reverted and reported.
  • It might already be done. There is no obligation to change anything: when the answers to the questions are "nothing", say so and leave the change alone.

Report

## Interrogation
Target    <range> · <N files>
Purpose   <one sentence>
Deleted   <list: what and why, or "nothing">
Simplified <list, or "nothing">
Diff      +<added> / -<removed> lines · net <±n>   (scripts/diff-stats.sh in the clean-code skill folder)
Gates     typecheck <pass|fail> · tests <passed>/<total>
Verdict   <done | done after cuts | needs decision: ...>

Under ten lines. No cut is listed without the verification that followed it.

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.