agentleFS
benmartebenmarte/autoimprove/skills/audit/SKILL.md

audit

Skill5 starsChanged 9 months agoMITView on GitHub

Scan the codebase for deficiencies, generate a prioritized report ranked by efficiency (points per iteration), and optionally transition into focused improve loops area-by-area until the user stops or the score hits 100.

164 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use overdrive, delight 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.
  • nikafastovets-langSkill

    overdrive

    Push interfaces past conventional limits with technically ambitious implementations. Whether that's a shader, a 60fps virtual table, spring physics on a dialog, or scroll-driven reveals — make users ask "how did they do that?

    Also in 12 projects that use this

  • mtctSkill

    delight

    Add moments of joy, personality, and unexpected touches that make interfaces memorable and enjoyable to use. Elevates functional to delightful.

    Also in 18 projects that use this

  • mtctSkill

    teach-impeccable

    One-time setup that gathers design context for your project and saves it to your AI config file. Run once to establish persistent design guidelines.

    Also in 12 projects that use this

  • nikafastovets-langSkill

    arrange

    Improve layout, spacing, and visual rhythm. Fixes monotonous grids, inconsistent spacing, and weak visual hierarchy to create intentional compositions.

    Also in 6 projects that use this

  • zwy123zwySkill

    normalize

    将用户随意输入的提示词规范化为结构清晰、便于大模型执行的标准化提示词。适用于需要整理、统一提示词格式时调用。

    Also in 10 projects that use this

  • tdiminoSkill

    shape

    Plan the UX and UI for a feature before writing code. Run a structured discovery interview, then produce a design brief (.design-context.md) that guides implementation. Establishes design direction, constraints, and strategy before any code is written. Triggers on plan the design, design brief, shape the UX, before we build, design discovery.

    Also in 8 projects that use this

  • +4 more from mtct
  • +1 more from nikafastovets-lang

The file

We split this skill into the rules it gives an agent

11 rules. 0 are common, 6 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 147 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Check .claude/autoimprove/config.md exists.

    line 9
  2. Distinctive:

    Check git is available and working tree is clean.

    line 10
  3. Distinctive:

    Run the measure skill to get the composite score and per-metric breakdown.

    line 14
  4. Very specific:

    Run the command (e.g., tsc --noEmit 2>&1, pnpm test 2>&1, pnpm lint 2>&1)

    line 17
  5. Very specific:

    Read weights dynamically from .claude/autoimprove/config.md.

    line 44
  6. Very specific:

    Check for interrupted session first: If .claude/autoimprove/log.md exists and the last session has IN_PROGRESS status, show: "↩️ You have …

    line 83
  7. Very specific:

    If no: Stop. User can run /autoimprove:improve manually.

    line 91
  8. Distinctive:

    If the user picks a number, use that area's estimate.

    line 100
  9. Distinctive:

    If no: Stop. Print final score.

    line 140
  10. Distinctive:

    If the improve loop finishes its estimated iterations but the area isn't maxed yet, show actual results:

    line 146
  11. Distinctive:

    If yes, run more iterations (re-estimate based on remaining gap).

    line 153

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

Audit Skill

Pre-flight

  1. Check .claude/autoimprove/config.md exists. If not, stop: "Run /autoimprove:setup first."
  2. Check git is available and working tree is clean.

Step 1: Run Measurement Suite

Run the measure skill to get the composite score and per-metric breakdown. Capture both the scores AND the raw command output for each metric.

For each metric defined in the config:

  • Run the command (e.g., tsc --noEmit 2>&1, pnpm test 2>&1, pnpm lint 2>&1)
  • Record the score (using the measure skill's scoring logic)
  • Also capture the raw output for deficiency counting

Step 2: Count Individual Deficiencies

Parse the raw output from each command to count specific issues:

  • Type errors: Count lines matching error patterns (e.g., error TS for TypeScript, error: for Rust). Group by file.
  • Build: Pass/fail only — no granular count. If build fails, it becomes top priority.
  • Tests: Count passing vs total from test runner output. Identify failing test names if any.
  • Lint: Count warning/error lines from linter output. Group by rule if possible.

Step 3: Calculate Efficiency

For each metric with a gap (score < max):

  1. Point gap = max_weight - current_score
  2. Estimated iterations = ceil(issue_count / issues_per_iteration) using these heuristics:
    • Type errors: ~3 per iteration (clustered in files)
    • Lint warnings: ~2.5 per iteration
    • Tests (new): ~1 per iteration
    • Build fix: ~1-2 iterations
    • These are initial estimates — actual results will vary
  3. Efficiency = point_gap / estimated_iterations
  4. Estimated tokens = estimated_iterations × 22000 (rough average per iteration)

Read weights dynamically from .claude/autoimprove/config.md. If a metric is not applicable, skip it and redistribute weight as the measure skill already handles.

Sort areas by efficiency (highest pts/iteration first).

Step 4: Display Report

Print the audit report:

━━━ Codebase Audit ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Current Score: XX/100

  [Metric 1]:  XX/WW  [progress bar]  (gap pts to max) or ✓ maxed
  [Metric 2]:  XX/WW  [progress bar]  (gap pts to max) or ✓ maxed
  [Metric 3]:  XX/WW  [progress bar]  (gap pts to max) or ✓ maxed
  [Metric 4]:  XX/WW  [progress bar]  (gap pts to max) or ✓ maxed

━━━ Fastest Path to 100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  #  Area          Gap    Issues  Est. iterations  Efficiency
  1  [best area]   Xpts   N items  M iterations    X.X pts/iter ← best
  2  [next area]   Xpts   N items  M iterations    X.X pts/iter
  ...

  Total: ~N iterations to reach 100/100
  ⚡ Estimated token usage: ~XXXK tokens (rough estimate, actual usage varies)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The progress bar uses filled blocks (█) and empty blocks (░), scaled to 10 characters per metric.

If score is 100/100: Still print the full report (progress bars, efficiency table with all zeroes, and token estimate of ~0K tokens) so the output format is always consistent. After the report, print "Nothing to improve." and stop — do not prompt for the interactive fix loop.

If build fails: Show build as #1 priority with a note: "⚠️ Build is failing — other metrics may be unreliable. Fix the build first."

If only one area has a gap: Skip the selection prompt. Just ask: "Fix [area]? (~N iterations, ~XXXK tokens) (Y/n)"

Step 5: Interactive Fix Loop

Check for interrupted session first: If .claude/autoimprove/log.md exists and the last session has IN_PROGRESS status, show: "↩️ You have an interrupted session. Use /autoimprove:continue to resume, or continue with this audit for a fresh start."

Prompt the user:

Would you like to start fixing? (Y/n)

If no: Stop. User can run /autoimprove:improve manually.

If yes:

Which area? (Enter number, or press Enter for #1 — [area name], ~N iterations)
>

If the user picks a number, use that area's estimate. If they press Enter, use the most efficient area.

Starting the improve loop

Count all **Branch:** autoimprove/experiment- entries in .claude/autoimprove/log.md (if it exists) to determine the experiment offset.

Invoke the improve-loop skill directly with:

  • iterations: The estimated count for the selected area
  • focus: Generated focus string for that area:
    • Type safety → "Fix type errors"
    • Build → "Fix build errors"
    • Tests → "Add unit tests for untested functions"
    • Lint → "Fix lint warnings"
  • session_mode: new
  • baseline_score: The score just measured
  • start_iteration: 1
  • total_iterations: Same as iterations
  • experiment_offset: Count of existing experiments

After area completes

Re-run the measurement suite (Step 1-3) to get updated scores. Then show:

━━━ Area Complete: [area name] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Score: XX → YY/100 (+delta)
  [area]:  WW/WW  ██████████  ✓ maxed

Remaining work:
  #  Area     Gap    Est. iterations  Efficiency
  1  [next]   Xpts   M iterations     X.X pts/iter
  ...

  Remaining: ~N iterations (~XXXK tokens)

Continue to next area? (Y/n)

If yes: Repeat the selection prompt (or auto-select if only one area left). Start a new improve-loop session for that area.

If no: Stop. Print final score.

If all areas maxed: "🎉 Codebase score: 100/100. All areas maxed!"

If area doesn't fully improve

If the improve loop finishes its estimated iterations but the area isn't maxed yet, show actual results:

Area [name] partially improved: XX → YY (expected ZZ)
Run more iterations on this area? (Y/n)

If yes, run more iterations (re-estimate based on remaining gap). If no, move to the next area.

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.