diagnose
Skill35 starsChanged 44 days agoApache-2.0View on GitHub
Profile the job defined in contract.md, name the one thing it loses most time to, and propose a single fix with a measured number behind it. It stops at the first finding. optimize is this same work repeated until nothing worth doing is left.
193 other projects use a version of this.
Adopted by
Most recently taken up by
- agent-services-at/pluginstheir own version, first seen Nov 8, 2026
- Eclipter/agentstheir own version, first seen Nov 8, 2026
- venhdev/skillstheir own version, first seen Nov 8, 2026
- ishandutta2007/Awesome-Claude-Skillstheir own version, first seen Nov 8, 2026
- DeevsDeevs/agent-systemtheir own version, first seen Nov 8, 2026
- pedrohcgs/claude-code-my-workflowtheir own version, first seen Nov 8, 2026
Used with
Projects with it also use zoom-out, to-prd 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.
victorgarciaesgiSkillzoom-out
Tell the agent to zoom out and give broader context or a higher-level perspective. Use when you're unfamiliar with a section of code or need to understand how it fits into the bigger picture.
Also in 61 projects that use this
GoogleSkillto-prd
Turn the current conversation into a PRD and publish it to the project issue tracker — no interview, just synthesis of what you've already discussed.
Also in 56 projects that use this
GoogleSkillto-issues
Break a plan, spec, or PRD into independently-grabbable issues on the project issue tracker using tracer-bullet vertical slices.
Also in 53 projects that use this
simo97Skilledit-article
The user will invoke this skill to help them edit an article.
Also in 17 projects that use this
simo97Skillwrite-a-skill
Create new agent skills with proper structure, progressive disclosure, and bundled resources. Use when user wants to create, write, or build a new skill.
Also in 44 projects that use this
AnasX7Skillsetup-pre-commit
Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.
Also in 27 projects that use this
- +4 more from simo97
Other versions193 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 193
- github/awesome-copilot★ 41ksame name
- epicenter-md/epicenter★ 4.8ksame name
- EpicenterHQ/epicenter★ 4.8ksame name
- CherryHQ/cherry-studio-app★ 4.1ksame name
- pedrohcgs/claude-code-my-workflow★ 1.7ksame name
- formancehq/ledger★ 1.5ksame name
- getagentseal/founder-playbook★ 745same name
- victorgarciaesgi/regle★ 508same name
- amazingloft999-droid/mattpocock-skills★ 422same name
- openvetta/open-vetta★ 302same name
183 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository8 other files it gives its agents.
- clean-upSkill
- convert-to-benchmark-scriptSkill
- extract-computation-graphSkill
- initSkill
- optimizeSkill
- publish-prSkill
- setup-baselineSkill
- torch-profileSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 2 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 174 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 16
Use the setup-baseline skill.
- Very specific: line 26
Do not arm anything. The registry and the Claude Code watchdog keep a campaign turning for hours, and this is one pass.
- Distinctive: line 36
Read all five views before naming anything.
- Distinctive: line 41
Do not rank by kernel time.
- Very specific: line 67
Write latest-report.md for the reader named in contract.md, as short as you can, carrying a status: closed line of its own:
- Very specific: line 79
Write records/mistakes.md as you go, in the same turn you get something wrong.
“Common” is measured: kept by at least 6 in 10 of the 174 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.
Files
diagnose is a sequence of steps. Work through them one at a time and mark each one done as you go.
It stops after one finding, one fix and the measurement that proves it. The user
chose this over optimize because they want an answer in an hour rather than a
branch in a day, and a second finding they did not ask for costs them that hour.
Step 1: setup
Use the setup-baseline skill. It builds the worktree and the workspace, has
extract-computation-graph write records/computation_graph.json and
records/execution_schedule.json, then measures the base commit for speed, memory and
correctness, profiles it in full with torch-profile, and records it with
workspace.py add --verdict base. A workspace left in that shape is one
optimize can pick up later without profiling the base again.
The tolerance it derives is what step 3 reads the fix against. Without it a fix has no number for whether the job still computes the same thing.
Do not arm anything. The registry and the Claude Code
watchdog keep a campaign turning for hours, and this is one pass. They belong to
optimize.
Step 2: the one finding
setup-baseline left the traces under commits/<base sha>/trace/, the rendered
views beside them and the diagnosis at commits/<base sha>/report.md. This step
reads them and picks one.
Read all five views before naming anything. "The largest" is a claim about the other four, so ranking them is what earns it.
Take the top finding by what it costs in wall clock: the part not already hidden
behind other work, multiplied by its repeat count from records/computation_graph.json.
Do not rank by kernel time. A collective that is fully hidden costs nothing, and
a 2 ms stall on every one of forty blocks outranks a 60 ms one-off.
The finding carries everything torch-profile's ③ asks for. The code_anchor and
the cost ceiling are the two the user reads first.
Step 3: the one fix
Pick the fix by optimize's Tradeoffs: architecture, breadth, memory, precision.
Then prove it, on the same benchmark script and the same node:
- an interleaved timed pair against the base, so the two arms see the same machine
- the recorder's comparison against the baseline record, at the tolerance derived in step 1
Record it with workspace.py add, with the tradeoffs in the --why text.
A fix that does not hold still answers the question. The finding stands, the fix did not, and the number says by how much. Write that down rather than going after a second finding to rescue the run. Another fix for the same finding is in scope; the next finding is not.
Step 4: closing
Write latest-report.md for the reader named in contract.md, as short as you
can, carrying a status: closed line of its own:
- where the time goes, for the whole run and for one step
- the finding: what it is, its
code_anchor, what it costs as a ceiling - the fix, what it traded, and the before and after on the hardware it was measured on
- the correctness result, including any check that exceeded its tolerance
- what looked expensive and was not
- the rest of the ranked findings, one line each, and that
optimizeworks through them
Write records/mistakes.md as you go, in the same turn you get something wrong.
workspace.py finish is optimize's loop condition and this is not a loop, so
do not run it. Stop here. The user decides whether to run publish-pr for an
issue and a PR, or optimize to keep going.
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
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.

