dev-environment-roi-audit
Skill3 starsChanged 2 months agoMITView on GitHub
Audit a local coding-agent environment with real logs and controlled ablations, then make evidence-backed keep, narrow, on-demand, or remove decisions for MCP servers, skills, instruction files, plugins, commands, hooks, and memory. Use whenever the user asks to audit or slim a Claude, Codex, Grok, Cursor, or similar development setup; find unused tools; quantify context or startup tax; or clean agent configuration by ROI. Enforces discovered paths, per-file JSONL schema probes, OUT_DIR-only artifacts, secret-safe output, and item-by-item approval before mutations.
In this repository39 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- llms.txtllms.txt
- agent-symlink-initSkill
- code-inspector-initSkill
- commitSkill
- copywritingSkill
- css-tailwind-stylingSkill
- frontend-designSkill
- lingui-best-practicesSkill
- lingui-workflowSkill
- repo-skill-creatorSkill
- ui-ux-pro-maxSkill
- weekly-reportSkill
- agentic-review-handoffSkill
- agent-symlink-initSkill
- architecture-hardening-loopSkill
- ardot-mcpSkill
- branch-creatorSkill
- chrome-dev-mcpSkill
- code-inspector-initSkill
- code-plugin-architectureSkill
- commit-pushSkill
- commitSkill
- decision-first-technical-writingSkill
- desktop-agent-activitySkill
- figma-mcpSkill
- goal-gateSkill
- installed-app-feature-inventorySkill
- kimi-computer-useSkill
- lingui-workflowSkill
- local-web-surfaceSkill
- open-code-review-loopSkill
- review-prompt-composerSkill
- task-completion-loopSkill
- uxc-facadeSkill
- web-performance-auditSkill
- weekly-reportSkill
- workflow-gateSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
22 rules. About 0 are common, 14 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈14
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
Ask for or agree on an absolute OUT_DIR and analysis window before collecting data.
- Very specific: line 16
Keep source and configuration read-only during measurement.
- Distinctive: line 22
Read references/artifact-contract.md before starting.
- Very specific: line 26
Never print a complete config node when it may contain headers, env, credentials, cookies, or tokens.
- Distinctive: line 30
Treat tools that create orders, send messages, write repositories, manage credentials, or read personal/account data as write-capable or …
- Distinctive: line 34
Run the bundled initializer:
- Very specific: line 44
Write 00-capabilities.json.
- Distinctive: line 52
Prefer structured CLI/init interfaces over manually reconstructing config.
- Distinctive: line 56
Never equate an absent server in one config-layer list with absence from runtime init.
- Distinctive: line 69
Keep generated architecture prose, copied README material, directory trees, and project summaries only when measured evidence shows they …
- Very specific: line 71
Write 01-inventory.json as data only, without recommendations.
- Distinctive: line 84
Do not reuse an expected schema after one representative file.
- Very specific: line 88
Write 02-metrics.json and 02-metrics.md.
- Distinctive: line 92
Run only experiments supported by the installed CLI version:
- Very specific: line 99
Keep prompts, model/account, cwd, and timing boundaries identical.
- Very specific: line 101
Write 03-experiments.md with sanitized raw output.
- Distinctive: line 105
When the user requests blind review and at least two independent CLIs are available:
- Distinctive: line 107
Write the dispatch prompt before launching reviewers.
- Distinctive: line 124
After an approved mutation:
- Distinctive: line 128
Verify syntax, component count before/after, current runtime listing, and credential-field count without printing values.
- Distinctive: line 129
Update the report immediately.
- Distinctive: line 142
Use an exact validated target.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
Development Environment ROI Audit
Measure whether each coding-agent component saves more loop time than it taxes. Use local evidence instead of generic best practices.
Operating contract
- Ask for or agree on an absolute
OUT_DIRand analysis window before collecting data. Default to 90 days; if less data exists, report the actual window and session count. - Keep source and configuration read-only during measurement. Write only under
OUT_DIR. Git write operations are outside this workflow. - For each measurement step, state which numbers it should produce, and show the raw output a conclusion rests on before interpreting it.
- Attach at least one measured number to every conclusion. Put unsupported opinions under
UNVERIFIED; never blend them into findings. - Discover paths and wrappers from the machine. Do not assume home-directory layouts, project names, account aliases, or config inheritance.
- Require item-by-item approval before changing configuration, disabling components, moving files, or deleting anything. A completed audit is not blanket mutation authority.
Read references/artifact-contract.md before starting. Read references/metrics-and-decisions.md before calculating ROI or proposing a decision.
Security boundary
- Never print a complete config node when it may contain
headers,env, credentials, cookies, or tokens. Print keys, value types, and lengths instead. - Pass credentials internally from their existing config only when a read-only probe genuinely requires them. Never put secret values in commands, output files, recovery copies, or reports.
- Redact stdout and stderr before
tee. If a secret is accidentally displayed, stop repeating it, identify the affected filesystem copies without showing their contents, report their count, and request explicit approval to sanitize or remove them. Until approval, mark the audit blocked on credential residue and recommend server-side rotation. - Recovery artifacts must contain only the target component and must strip authentication fields. Do not back up an entire config to recover one entry.
- Treat tools that create orders, send messages, write repositories, manage credentials, or read personal/account data as write-capable or sensitive even if their server name sounds harmless.
Phase 0: initialize and probe capabilities
Run the bundled initializer:
python3 <skill-dir>/scripts/init_audit.py --out-dir "$OUT_DIR" --window-days 90It creates only the audit directory, records the chosen window, and copies helper scripts to $OUT_DIR/scripts/ for reproducibility.
Discover relevant hosts and utilities with version or command-resolution checks. Probe the requested agent CLIs plus jq, python3, and rg. Only inspect --help after a real command or flag fails.
Write 00-capabilities.json. Record wrapper/function provenance without printing function bodies that may contain credentials.
Phase 1: inventory the tax side
Inventory each host independently and retain its actual status vocabulary.
MCP and plugins
- Prefer structured CLI/init interfaces over manually reconstructing config.
- Record server status, tool count, schema bytes per tool, write-capable tools, sensitive-read tools, initialization time, and errors.
- Compare exact tool names and semantic capability overlap. Keep exact overlap and inferred semantic overlap separate.
- Mark servers configured on only one host. Distinguish active config, historical metadata cache, plugin-provided config, and compatibility imports.
- Never equate an absent server in one config-layer list with absence from runtime init; validate the runtime layer when the decision depends on it.
Skills
- Measure always-resident
name + descriptionseparately from on-demand body bytes. - Evaluate whether each description has a precise trigger, overlaps another skill, under-triggers, or matches almost everything.
- Usage count zero means “zero observed in this window,” not “never used.” Preserve the observation scope.
Instructions, commands, hooks, and memory
- Discover
CLAUDE.md,AGENTS.md, Cursor rules, host-global instructions, commands, agents, hooks, and memory files. - Classify instruction sections as effective, redundant, stale, or contradicted by code. Give an evidence path for every contradiction.
- Benchmark hooks with repeated samples. Report p50/p95 and event count; a no-op hook still pays process startup tax.
- Keep generated architecture prose, copied README material, directory trees, and project summaries only when measured evidence shows they reduce loop time.
Write 01-inventory.json as data only, without recommendations.
Phase 2: mine the benefit side
Discover all candidate session roots, including renamed projects, moved directories, worktrees, and account-specific homes. List candidates by mtime before assigning ownership.
For every JSONL file, inspect its first line before parsing that file:
python3 "$OUT_DIR/scripts/probe_jsonl_schema.py" <discovered-roots...> \
> "$OUT_DIR/raw/jsonl-schema-inventory.json"Do not reuse an expected schema after one representative file. A parser must validate each file's probed keys and skip or separately handle mismatches. Record every schema deviation.
Calculate M1-M8 exactly as defined in the metrics reference. Pay special attention to exposed tools with zero calls, wrapper calls whose actual MCP name is nested in serialized arguments, and failures hidden behind successful wrapper invocations.
Write 02-metrics.json and 02-metrics.md. Put parsing scripts in $OUT_DIR/scripts/.
Phase 3: run controlled experiments
Run only experiments supported by the installed CLI version:
- Baseline tax: same minimal prompt, bare/ignore-user-config floor, one-component variants, then full config.
- Skill trigger accuracy: replay representative redacted first prompts; calculate precision and recall.
- Feedback-loop latency: time build, full test, focused test, lint, and typecheck when the user has not excluded business repositories.
- MCP handshake: initialize and tools/list per server with isolated temp/cache paths under
OUT_DIR.
Keep prompts, model/account, cwd, and timing boundaries identical. Do not compare asynchronous or configuration-drifted runs as causal A/B. Label blocked experiments and missing API keys UNVERIFIED.
Write 03-experiments.md with sanitized raw output.
Phase 4: independent interpretation
When the user requests blind review and at least two independent CLIs are available:
- Write the dispatch prompt before launching reviewers.
- Give each reviewer only
01,02, and03data, never the orchestrator's conclusions or the other reviewer's output. - Set bounded turns/time/budget and keep reviewers read-only.
- Preserve disagreements. State the exact additional measurement needed to decide each one.
Skip this phase when independence cannot be established; record why.
Phase 5: decide component by component
Build one row per MCP server, skill, command, plugin, hook, or memory component:
| component | resident tokens | window calls | usage rate | error rate | ROI | decision |Apply the hard thresholds from the metrics reference without softening them. If the user wants interactive cleanup, present one component at a time with its numbers and wait for a clear retain/remove/disable decision.
After an approved mutation:
- Resolve the exact target with a read-only check.
- Make the smallest structured edit; do not rewrite unrelated config.
- Verify syntax, component count before/after, current runtime listing, and credential-field count without printing values.
- Update the report immediately. Keep historical metrics labeled historical.
Phase 6: safe artifact cleanup
Large runtime copies and dependency caches are audit waste once their evidence is embedded in reports. Before moving or deleting a candidate, report:
- real path and size
- file count and symlink count
- whether the target itself is a symlink
- Git metadata count
- report-reference count
- whether the artifact is reproducible
Use an exact validated target. Prefer moving one target to Trash over a broad permanent deletion. Never empty the user's whole Trash. If deletion is blocked by policy, report the block rather than bypassing it.
Phase 7: final report and integrity
Produce FINAL.md with:
- Component decisions and numeric evidence.
- Baseline tax before/after, window percentage, and formula.
- Instruction contradictions with evidence paths.
- Independent-review disagreements and required follow-up measurements.
- Proposed instruction files under
proposed/, never overwriting originals without approval. - Three to five regression guards.
- A separate
UNVERIFIEDlist.
Run:
python3 "$OUT_DIR/scripts/finalize_audit.py" --out-dir "$OUT_DIR"The finalizer refuses to create a manifest when non-runtime artifacts contain likely Authorization/Bearer values. It excludes reproducible runtime/**, writes MANIFEST.sha256, and reports the final artifact count and size.
Completion requires: zero pending user decisions in scope, all approved changes verified, credential residue count zero, core artifacts present, and manifest verification passing.
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.

