agentleFS
iice257iice257/Skills-quickstarter/.claude/skills/deep-think/SKILL.md

deep-think

Skill1 starsChanged 8 days agoMITView on GitHub

Pressure-test a design, plan or codebase from first principles before committing to it. Use when the user types /deep-think or asks to "think deeply", "first principles", "pressure-test", "what would an architect rewrite", or "find the implicit state machines / invariants"; or automatically during PLANNING for an expensive-to-reverse decision (new system, data model or schema, public API, cross-module refactor or migration, state/sync/concurrency design, a bug that survived two fix attempts). Do NOT use for executing an agreed plan, single-file edits, UI polish, copy, questions, or ops.

14 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use ecosystem-reference, fractal-delegation 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.
  • naman10parikhSkill

    ecosystem-reference

    Quick-access directory of Claude Code ecosystem repos, skills, plugins, MCPs, and patterns. Use when improving the harness.

    Also in 5 projects that use this

  • naman10parikhSkill

    fractal-delegation

    Also in 5 projects that use this

  • KirchliveSkill

    skill-routing

    Decides which of the installed skills a task needs and loads them before the work starts. This skill should be used at the beginning of any multi-step task — build, fix, refactor, migrate, review, plan, release, research, write, design, video — and again at every phase change, after context compaction, and when work moves into a different part of the codebase. Use it for requests like "let's build X", "fix this bug", "refactor Y", "plan the migration", "review this", and also when the user asks which skill applies, why a skill did not fire, or asks to check what is available.

    Also in 5 projects that use this

  • sublimotionSkill

    agent-runtime

    Launch and manage detached agent runs on EKS via the agent-runner CLI. Use when the user says "launch an agent run", "agent runtime", "agent-runner", "run this spec on the cluster", "check run status", "agent run logs", or "stop a run". Do NOT use for writing the agent-runner code itself (edit the sibling ../agent-runner repo), Terraform of the foundation (use terraform-automation), or GPU serving deployments (use infra-deployer).

    Also in 5 projects that use this

  • GoZippySkill

    repo-scout

    Also in 5 projects that use this

  • BenjaminGSkill

    harness-review

    Turn one PR's review comments into harness fixes — classify each cause by the most solid place it can live (codebase, lint, rules, skill), then draft the fixes in a separate PR.

    Also in 5 projects that use this

  • +6 more from naman10parikh

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 13 edited versions we read keep these.

  • 7

    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 only if one is true:

    line 12
  2. Distinctive:

    If the automatic gate opened, say so in one line ("Running deep-think: this sets the data model") and continue.

    line 16
  3. Distinctive:

    Read the actual code, spec or plan before theorizing.

    line 20
  4. Distinctive:

    When asked to "find the implicit state machines" (or invariants) in an app:

    line 32
  5. Distinctive:

    Use an Explore subagent to sweep large codebases.

    line 36
  6. Distinctive:

    Keep it tight. One short section per lens (bullets, not essays), then:

    line 40
  7. Distinctive:

    Verdict: keep / adjust / rethink, in one sentence.

    line 42

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

Deep Think

Five lenses, run in order, each building on the last. The goal is a better decision, not a longer answer: every lens must change or confirm something concrete.

Gate (check first)

Run only if one is true:

  1. The user invoked it explicitly (command or trigger phrase).
  2. We are in planning (nothing agreed yet) AND the decision is expensive to reverse: new system/app, data model, public API/protocol, cross-module refactor/migration, state/sync/concurrency design, or a bug that has survived two fixes.

If the automatic gate opened, say so in one line ("Running deep-think: this sets the data model") and continue; the user can say "skip". If neither is true, don't run it.

Ground first

Read the actual code, spec or plan before theorizing. Name the 3-6 files, modules or documents that matter. Abstract thinking about code you haven't read is guessing.

The five lenses

  1. Irreducible constraints. Strip the problem to what must be true: inputs, outputs, invariants, hard limits (latency, cost, platform, data size, people). Mark each as physics (can't change) or choice (inherited and changeable). Most bad designs treat choices as physics.
  2. Rebuild from zero. Using only the physics constraints, sketch the simplest design that satisfies them, as if nothing existed. Compare it with the current or proposed design: where do they differ, and is each difference justified?
  3. The principal architect's first rewrite. What would a senior architect change before starting? Name 1-3 rewrites, each with the cost of not doing it. Usual suspects: wrong source of truth, state duplicated in two places, a boundary in the wrong spot, a missing abstraction, a premature one.
  4. The day-one breaking test. Design the single most damaging realistic test: concrete input/sequence, expected vs. actual. Prefer races, retries, partial failure, empty/huge input, clock or ordering issues, a second user, offline/reconnect. If it can be written as a real test now, write it.
  5. The disappearing abstraction. What higher-level concept would make this whole class of problem go away (a state machine, an event log, a declarative config, an existing library or platform feature, deleting the feature)? Say honestly whether it is worth it here or overkill.

Audit mode: implicit state machines

When asked to "find the implicit state machines" (or invariants) in an app:

  • Hunt for clusters of booleans/enums/nullable fields that together encode a state (isLoading + error + data, status strings, step counters, flags toggled in effects, timers, retry counters, websocket/connection status, auth/session, multi-step forms, upload/playback/queue lifecycles).
  • For each: file:line, the states actually reachable, the transitions and who triggers them, and impossible-but-representable states (e.g. loading and error at once) plus missing transitions (cancel, retry, timeout, unmount).
  • Rank by risk (bugs plausible today first). For the top ones, propose an explicit model (discriminated union, reducer, XState/statechart, DB status column with allowed transitions) and the smallest migration path.
  • Use an Explore subagent to sweep large codebases; verify each finding by reading the code before reporting it.

Output

Keep it tight. One short section per lens (bullets, not essays), then:

Verdict: keep / adjust / rethink, in one sentence. Changes to the plan: a numbered list of concrete edits, or "none". Breaking test: the one from lens 4, ready to paste.

Then return to the normal flow: in planning, fold the verdict into the plan and keep interviewing; never start building on the strength of a deep-think alone.

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.