agentleFS
MarkBoveeMarkBovee/agent-skills-kit/skills/ask-improve/SKILL.md

ask-improve

Skill1 starsChanged 4 months agoMITView on GitHub

Improve: Use for a codebase audit (correctness, security, performance, tech debt), audit-driven plans and their execution, or a focused refactor or cleanup.

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 5 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    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
  1. Distinctive:

    Audit: run category audits, including code-smell scanning and applicable hard coding/style rules.

    line 49
  2. Very specific:

    When an audit satisfies code-review debt, include review-generation, review-scope: final-diff, review-reference, review-completed-at, and …

    line 55
  3. Very specific:

    security: Start from a threat model.

    line 72
  4. Distinctive:

    Stop when the main complexity is gone.

    line 79
  5. Distinctive:

    Prefer deletion over indirection, extraction over rewrites.

    line 80
  6. Very specific:

    Every finding cites evidence (file:line).

    line 84
  7. Distinctive:

    STOP conditions are explicit.

    line 88
  8. Distinctive:

    Never copy secrets into plans or issues.

    line 89

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

ASK Improve

Structured, evidence-first codebase audit that produces executable implementation plans. Also covers focused refactoring and simplification passes. Runs once to audit and plan; re-invoke execute, reconcile, or next modes for follow-through.

When to use

Use when:

  • you want a structured audit (correctness, security, performance, tech debt, deps, DX, docs, direction, user-facing text language/locale consistency)
  • you have audit output and need executable implementation plans
  • you need to execute, reconcile, or publish those plans as issues
  • the user asks for a refactor, cleanup, simplification, or deduplication

Skip when:

  • the problem is a single known bug (use debugging)
  • you only need a quick code review (use code-review)

Audit flow

  1. Recon: detect repo layout, conventions, commands, existing docs/ADRs, intent signals (TODOs, flags, stubs, PRDs, roadmap)
  2. Audit: run category audits, including code-smell scanning and applicable hard coding/style rules. Inspect every function-like construct in scope for required intent comments and run the repository's source-comment check when available; each finding is evidence-grounded (file:line)
  3. Plan: convert findings into self-contained, executor-ready plans with drift checks, verification gates, hard boundaries, and escape hatches
  4. Follow-through: execute <plan>, reconcile, next, branch

For significant or release-sensitive work, act as the independent audit role: inspect callers and the complete diff, challenge ownership, ambiguity, fallbacks, determinism, compatibility, and test invariants. Return concrete evidence, not generic quality advice. Use ASK_WORKFLOW_PASS phase=AUDIT, ASK_WORKFLOW_FINDINGS phase=AUDIT, ASK_WORKFLOW_BLOCKED phase=AUDIT, or ASK_WORKFLOW_FAILED phase=AUDIT.

When an audit satisfies code-review debt, include review-generation, review-scope: final-diff, review-reference, review-completed-at, and review-result: PASS metadata, followed by terminal ASK_REVIEW_COMPLETE. An audit outside final diff scope must not clear review debt.

Modes

  • (bare): Full audit + plans (recon → audit → plan)
  • quick / deep: Audit depth modifier; quick keeps smell scanning focused on the relevant changed surface, while deep expands it across affected modules or the repository. Default to quick; escalate to deep only when the changed surface is unknown, cross-cutting, or a quick scan already surfaced evidence a bounded scan cannot reconcile.
  • security / perf / tests / deps / dx / docs / direction / tech-debt / text: Focus on one category. The perf and security modes carry standing behavior rules (below), not just a scan.
  • refactor: Focused simplification pass — not full audit
  • execute <plan>: Dispatch executor, review, verdict (APPROVE/REVISE/BLOCK)
  • reconcile: Refresh plan backlog, verify DONE, investigate BLOCKED
  • next / features / roadmap: Direction-only audit
  • branch: Diff-only audit of current branch vs default branch
  • --issues: Publish plans as GitHub issues

Focus rules

  • perf: Measure before optimizing. Neutral results are reverts, not keeps; log every attempt including the reverted ones so a discarded optimization stays discarded.
  • security: Start from a threat model. Trust follows who wrote a value, not which channel delivered it.

Refactoring pattern

  1. Find the actual pain point, not the most stylistically ugly code.
  2. Choose one high-leverage simplification in the smallest owning area.
  3. Implement the smallest coherent change set, then validate.
  4. Stop when the main complexity is gone.
  5. Prefer deletion over indirection, extraction over rewrites. If the best refactor is leaving code alone, leave it alone.

Rules

  • Every finding cites evidence (file:line). "Probably has N+1" is not a finding; orders/api.ts:142 issues one query per item is.
  • Smell-scan findings must state concrete impact, severity, and false-positive validation. Separate defects, maintainability risks, test gaps, and intentional trade-offs.
  • Hard coding and styling rules are pass/fail gates. Do not report a missing required comment as a low-priority nit, and do not mark an audit complete until the applicable automated checks passed.
  • Plans are self-contained: executor has zero context beyond the plan file. Every step ends with a verification command and expected result.
  • STOP conditions are explicit. Plans stamp the commit SHA they were written against for drift detection.
  • Never copy secrets into plans or issues.
  • Advisor never edits source code; execute dispatches a separate executor.

Use with

  • intake when the work scope is ambiguous
  • code-review for executor diffs or standalone PRs
  • debugging when audit finds a bug that needs tracing
  • verification to confirm preserved behavior or executed plans

Avoid

  • Full audit on every small change (use quick, branch, or focused category)
  • Broad rewrites because code "could be cleaner"
  • New abstractions for a single current use case
  • Style-only rewrites in untouched areas
  • Publishing sensitive findings as public issues without confirmation

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.