measure-before-theorize
Skill3 starsChanged 3 days agoApache-2.0View on GitHub
Use when about to optimize a suspected performance bottleneck, when a timeout or polling loop is assumed to be slow, or when planning a code change based on timing assumptions without measurement data
In this repository37 other files it gives its agents.
- docs/manual/agents.mdAGENTS.md
- ablate-combined-changesSkill
- agent-supervisor-methodologySkill
- benchmark-comparisonSkill
- browser-vlm-acceptanceSkill
- claim-verificationSkill
- claude-code-best-practicesSkill
- code-attributionSkill
- comms-connectSkill
- condition-based-waitingSkill
- conference-intelligenceSkill
- deep-research-methodologySkill
- defense-in-depthSkill
- detect-deployment-thrashingSkill
- directory-cross-examinationSkill
- doc-freshness-auditorSkill
- eval-harnessSkill
- github-comment-managerSkill
- github-deep-researchSkill
- github-issue-responseSkill
- harness-setupSkill
- issue-closure-strategistSkill
- issue-quality-assessmentSkill
- k8s-configmap-runtime-patchSkill
- k8s-config-persistence-trapSkill
- maintainer-profilingSkill
- multi-phase-optimization-campaignSkill
- phase-trackerSkill
- pptx-slide-creationSkill
- pr-issue-scannerSkill
- public-root-reproducibilitySkill
- repo-organizerSkill
- root-cause-tracingSkill
- technique-versioning-workflowSkill
- wrong-layer-debuggingSkill
- wrong-theory-cascade-preventionSkill
- youtube-transcriberSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
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
- Distinctive: line 9
Never optimize a suspected bottleneck without first measuring whether it actually fires.
- Distinctive: line 19
Add counter/diagnostic: "How many times does this timeout fire?"
- Distinctive: line 21
If count > 0: optimize the timeout
- Distinctive: line 22
If count == 0: the bottleneck is elsewhere
≈ “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
Measure Before Theorize
Core Principle
Never optimize a suspected bottleneck without first measuring whether it actually fires. A function with a 100ms timeout that never triggers costs 0ms, not 100ms.
The Anti-Pattern
- See code with large timeout (100ms sentinel poll)
- Assume: "256 tokens × 100ms = 25.6s — that's our 30s!"
- Reduce timeout to 1ms
- Result: ZERO effect (timeout was never hitting)
- Wasted: 1 hour implementing + deploying + testing
The Pattern
- Add counter/diagnostic: "How many times does this timeout fire?"
- Run benchmark
- If count > 0: optimize the timeout
- If count == 0: the bottleneck is elsewhere
Quick Diagnostic
// BEFORE optimizing: measure if it fires
static __device__ int timeout_count = 0;
if (timed_out) {
atomicAdd(&timeout_count, 1);
printf("TIMEOUT #%d at line %d\n", timeout_count, __LINE__);
}Real-World Impact
- Sentinel timeout reduction (100ms→1ms): ZERO effect on 30s dispatch
- The 30s was from CPU proxy round-trip (200ms × 128 batches), not sentinel polling
- Measurement would have revealed this in 5 minutes instead of 1 hour
<!-- imported on 2026-10-31 by tools/import-skills.py from a native Claude Code instance's skill library; the source site's names, ids, hosts and paths are scrubbed to <placeholders>; its other files were not copied -->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.

