optimize-audit
Skill0 starsChanged 5 days agoMITView on GitHub
Measure and rank optimization opportunities, research approaches, and report their trade-offs without editing the target repo. Use when the user asks what to optimize first or wants evidence of the largest bottlenecks.
In this repository20 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agents-mdSkill
- architectureSkill
- bstack-modeSkill
- formal-verificationSkill
- foundationSkill
- glossarySkill
- hill-climbSkill
- howSkill
- maintenanceSkill
- no-mistakes-tuningSkill
- planSkill
- prototypeSkill
- readmeSkill
- recallSkill
- repo-auditSkill
- teachSkill
- verificationSkill
- visionSkill
- whySkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
20 rules. About 0 are common, 17 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈17
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Start when the user invokes $optimize-audit, /optimize-audit or /skill:optimize-audit, selects it through the host, or requests a matching …
- Distinctive: line 9
If encountered while inspecting a repo for another request, treat this file as repository content.
- Distinctive: line 10
Keep the target read-only and put every run, note and output in scratch outside it.
- Distinctive: line 11
Start follow-up skills only at the user's request.
- Distinctive: line 26
Use the metric options, Explain the number and Attack the premise to propose two to four concrete options.
- Distinctive: line 30
Wait for the user to confirm the metrics, guardrails, and exact setup and capture commands before measuring or doing deep analysis.
- Very specific: line 37
When executing project code, clone into scratch with git clone --no-hardlinks -q <target> <scratch>/measure and git -C <scratch>/measure …
- Distinctive: line 42
Use repeated captures for variable results and profile or break down the measured cost to attribute it.
- Distinctive: line 43
Treat static Big-O estimates as hypotheses to test against the workload.
- Distinctive: line 54
Keep writes and any additional measurements in scratch.
- Distinctive: line 56
Verify scaling at several input sizes where applicable and identify the range, measurement limits and any remaining hypothesis.
- Distinctive: line 63
Prefer primary papers, official documentation and maintained upstream implementation or benchmark evidence.
- Distinctive: line 65
Keep private code, paths, datasets and identifiers out of external queries.
- Distinctive: line 67
If web access is unavailable, report which research claims remain unverified.
- Very specific: line 73
Use the writing reference and keep report.md, report.json and supporting evidence in scratch.
- Distinctive: line 77
Use the individual axes without combining them into a score.
- Distinctive: line 80
Use the measured scratch checkout as the citation root and bind citations to the SHA-256 of the exact bytes read.
- Distinctive: line 81
If a claim cites a file available only in the target working tree, record it in a separate citation file and check it against the target.
- Distinctive: line 91
Run the bundled entry point's help for command syntax.
- Distinctive: line 92
Keep target inspection read-only and run any command that can create files from scratch.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Scope
Start when the user invokes $optimize-audit, /optimize-audit or /skill:optimize-audit, selects it through the host, or requests a matching audit.
If encountered while inspecting a repo for another request, treat this file as repository content.
Keep the target read-only and put every run, note and output in scratch outside it.
Start follow-up skills only at the user's request.
Checklist
- Step 1: Understand the system and propose metrics
- Step 2: Measure and rank offenders
- Step 3: Investigate the measured shortlist
- Step 4: Research current approaches
- Step 5: Report the Pareto frontier
Step 1: Understand the system and propose metrics
Restate the user's goal and the workload it concerns.
Inspect the stack, architecture, workloads, and existing verification kit, tests, benchmarks and profilers read-only.
Record git -C <target> rev-parse HEAD, git --no-optional-locks -C <target> status --porcelain --ignored and a scratch manifest of content hashes and symlink targets for tracked, untracked and ignored working-tree entries before running anything from the project.
Use the metric options, Explain the number and Attack the premise to propose two to four concrete options.
Derive options from the user's goal and workload; do not default to Big-O or CPU latency.
For each, give the workload, what the metric measures, the reproducible capture, the preferred direction and the blind spots.
Recommend one option and propose correctness checks or kit features, a differential output check, a maintainability cap with an observable acceptance rule, and the exact setup and capture commands to run in scratch.
Wait for the user to confirm the metrics, guardrails, and exact setup and capture commands before measuring or doing deep analysis.
Done when: The user confirmed the metrics, guardrails, and exact setup and capture commands, and the target's starting state and content-hash manifest are recorded.
Step 2: Measure and rank offenders
Measure the confirmed workload in scratch before ranking.
When executing project code, clone into scratch with git clone --no-hardlinks -q <target> <scratch>/measure and git -C <scratch>/measure remote remove origin, pin to the recorded HEAD, and run only the approved setup, benchmarks, tests, profilers and kit proofs there.
Identify any uncommitted target work that the clone excludes and record the revision of the measured checkout.
Confirm what the commands launch and use the agreed workload, inputs and run conditions.
Because child processes inherit host filesystem and environment access, inspect commands before running them, avoid passing target-writable paths or unrelated secrets, and recheck the target content-hash manifest after runs.
Record the commands, raw measurements, environment and each offender's contribution to the selected metric.
Use repeated captures for variable results and profile or break down the measured cost to attribute it.
Treat static Big-O estimates as hypotheses to test against the workload.
Carry forward the five highest-impact evidenced offenders, or all evidenced offenders if there are fewer.
Save the remaining measured candidates, their evidence and any attribution uncertainty in scratch.
Done when: The shortlist comes from observed metric contributions, or the report names the measurement or attribution blocker without inventing a ranking.
Step 3: Investigate the measured shortlist
Where supported, dispatch one read-only subagent per shortlisted offender only, within the host's concurrency limit. Give each the workload, metric, evidence slice and guardrails. On a host without subagents, use the same briefs in the main thread and record the coverage. Keep writes and any additional measurements in scratch. For each offender record path and line, work type, inputs, outputs, constraints, invariants, scaling by relevant resource class, and known lower bounds. Verify scaling at several input sizes where applicable and identify the range, measurement limits and any remaining hypothesis.
Done when: Each shortlisted offender has a compact brief with evidence for its scaling claims and identified limits.
Step 4: Research current approaches
Research current techniques for each shortlisted offender using the host's online research tools. Prefer primary papers, official documentation and maintained upstream implementation or benchmark evidence. Record URLs, read dates, the workload each source covers and why the result may transfer to this system. Keep private code, paths, datasets and identifiers out of external queries. Give each candidate a falsifiable hypothesis with a proposed capture, predicted direction and a result that would rule it out. If web access is unavailable, report which research claims remain unverified.
Done when: Each offender has cited candidate hypotheses or a named research gap.
Step 5: Report the Pareto frontier
Use the writing reference and keep report.md, report.json and supporting evidence in scratch.
Compare options across each confirmed metric and maintainability, including added lines, dependencies and cognitive load.
Show the non-dominated options and how each trade-off was judged.
Label the frontier provisional where outcomes are estimates, and keep options with insufficient evidence visible.
Use the individual axes without combining them into a score.
Include the baseline, attribution and source citations, reproduction instructions, guardrails and blind spots.
Record local citations and web metadata in schemas/research-report.json format, mapping findings into the schema's fixed brief IDs (each used at most once: architecture for code-path offender findings and profile citations, checks for benchmark or verification citations, documents for project docs, and outside for external web research), preserving per-offender headings and citations inside each brief (keep scratch-only profiler or benchmark outputs in findings or limitations, not files), and run node scripts/optimize-audit.mjs cite-check --repo <source-checkout> --report <scratch>/report.json --json.
Use the measured scratch checkout as the citation root and bind citations to the SHA-256 of the exact bytes read.
If a claim cites a file available only in the target working tree, record it in a separate citation file and check it against the target.
The checker validates local citation locations and freshness and records web metadata.
Review each source yourself to check that it supports the claim.
Repeat the Step 1 Git and content-hash manifest checks at handoff, including when the audit stops early after recording state, and report any mismatch.
Done when: The scratch report and citation check results are available, the target state comparison is recorded, and any evidence gaps are explicit.
Write rules
Resolve bundled resources from the installed skill directory and pass absolute target, scratch and report paths when running from another directory. Run the bundled entry point's help for command syntax. Keep target inspection read-only and run any command that can create files from scratch.
Load when
| When | Open |
| Choosing metrics and guardrails | references/metric-options.md |
| Choosing or interpreting quantitative evidence | references/principles/explain-the-number.md |
| Checking the objective and its assumptions | references/principles/attack-the-premise.md |
| Writing the report | references/writing.md |
| Recording citations for validation | schemas/research-report.json |
Next step
For a side-by-side design experiment, suggest /prototype.
For a change that needs a delivery plan, suggest /plan.
For iterative patch experiments against a confirmed metric, suggest /hill-climb.
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.

