agentleFS
ngreenwallngreenwall/claude-skills/qa-audit/SKILL.md

qa-audit

Skill2 starsChanged 4 months agoMITView on GitHub

Static-analysis QA pass over instruction/config files (SKILL.md, CLAUDE.md, your global context file, command files), not code. Spawns an Opus subagent per file to check for contradictions, dead logic, unstated dependencies, and style violations, then proposes fixes for confirmation before applying. Use when the user says "QA this skill," "audit this file," "run a QA pass on X," "QA SKILL.md," "audit CLAUDE.md," "QA this command," or "check this file for consistency issues." Do NOT use for live-session drift (use drift-check), skill output grading (skill-creator eval), or code diffs (/code-review); this skill never touches code, only instruction/config prose.

  • Reads credentials

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

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

    If the extension is .md/.mdc and the path is one of the recognized instruction/config locations (a SKILL.md inside a skills folder, …

    line 28
  2. Distinctive:

    If the target carries YAML frontmatter, append a 6th check item to the prompt, using the checklist for its file type:

    line 62
  3. Distinctive:

    If the edited file is managed by a sync tool that generates copies elsewhere (see Step 1), rerun that tool's generate/sync command so the …

    line 89

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

SKILL: QA Audit

A static-analysis QA pass over instruction and config prose. Recognized targets: SKILL.md files, CLAUDE.md, your global context file (the standing instructions your AI tool loads every session, e.g. ~/.claude/CLAUDE.md), README.md, slash command files (.claude/commands/*.md), and other instruction/config prose files. It never executes or evaluates the target against real prompts, it reads it and reasons about it.

See the frontmatter above for what this is NOT (drift-check, skill-creator's eval feature, /code-review). Closest neighbor: token-audit reduces load cost (rewrite/split/merge for token bloat); this skill checks correctness (contradictions, dead logic, unstated dependencies).

PROTOCOL

Step 1: Resolve target(s) and guard against code

Identify the file(s) to QA.

Before doing anything else, check whether the target looks like code: it's a code file if the extension is a recognized code/data extension (e.g. .ts, .tsx, .js, .jsx, .py, .rb, .go, .rs, .java, .c, .cpp, .sh, .sql). If so, stop immediately, don't spawn any agent, and tell the user in one line: "That's a code file, not instruction/config prose, use /code-review for that."

If the extension is .md/.mdc and the path is one of the recognized instruction/config locations (a SKILL.md inside a skills folder, CLAUDE.md, your global context file, README.md, .claude/commands/*.md), proceed directly.

For anything else, an unrecognized .md location, .json, .yaml, .toml, .env, or similar config file, don't auto-reject it as code, ask the user to confirm it's instruction/config prose before proceeding.

If the file is managed by a sync tool that generates copies elsewhere (e.g. a tool that regenerates .claude/ or .cursor/ files from a single source of truth), always resolve to that source file, never a generated copy, editing a generated copy gets silently overwritten on the next sync run. Skip this check if you don't use such a tool, most projects edit SKILL.md/CLAUDE.md directly.

Step 2: Gather context

Gather just enough context so the subagent doesn't misflag deliberate, documented choices as bugs: check your project's decision log (if one exists) for entries matching the target file/skill's name, and check sibling skills only if the target references them by name. Skip a full README read unless the target file directly references it.

Step 3: Spawn QA agents

Launch one Agent tool call per target file, model: "opus", using the prompt template below with placeholders filled in for that file. Launch all calls in the same message so they run in parallel.

If auditing 4+ files at once (e.g. a full-library audit), batch small files (SKILL.md files under ~100 lines) 2-3 per agent call instead of 1:1, listing each file's path and purpose in the same prompt and asking for findings grouped by file. Keep larger or higher-risk files (your global context file, CLAUDE.md, any file over ~100 lines) on their own agent call.

QA prompt template (fill in placeholders per file):

You're QAing [file] in [repo/location]. Purpose: [what it's supposed to do].

Don't trust any line numbers given, find the real match by content first.

Check for:
1. Unstated dependencies, a step/section that assumes something exists or was already read/produced, but nothing upstream actually does that.
2. Internal contradictions, one part assumes X, another assumes not-X.
3. Dead or unreachable logic, steps that can never trigger, or reference something renamed/removed.
4. Style violations, [house style rules, e.g. no em dashes, no vague hedge words].
5. Cross-file consistency, if multiple files reference each other, confirm paths/claims/section names still match.

Read [related docs, e.g. README, decision log] for context so deliberate, documented choices aren't flagged as bugs.

Output one finding per issue: location, quoted text, why it's a problem, proposed fix. Don't apply fixes, just report. Keep each finding to 2-3 sentences, no preamble or restated reasoning. Rank by likelihood of causing real bad behavior vs. just reading oddly. End with a summary count by severity.

If the target carries YAML frontmatter, append a 6th check item to the prompt, using the checklist for its file type:

  • SKILL.md, or a global/rule source file:
    6. Frontmatter/convention violations: kebab-case name (for skills), pushy description with named trigger phrases, negative triggers present if the skill is narrow or heavy, all required frontmatter fields present (name, description).
  • .claude/commands/*.md:
    6. Frontmatter/convention violations: no `name` field expected (commands don't use one, don't flag it as missing), description is one sentence describing what the command does, all required fields present.

Step 4: Compile findings

Merge results across all target files into one list, ranked by severity (likelihood of causing real bad behavior vs. just reading oddly). Keep the merged report compact, one line of context plus the proposed fix per finding, don't restate each subagent's reasoning. End with a summary count by severity.

On a full-library run (4+ files), run /compact here before Step 5, the raw agent transcripts are no longer needed once findings are compiled.

Step 5: Propose fixes, wait for confirmation

Show the proposed fix for each finding. Wait for explicit user confirmation before editing anything.

Step 6: Apply fixes

On confirmation, apply the fixes using the current session's running model, no need to re-invoke Opus for mechanical edits.

Step 7: Regenerate if sync-managed

If the edited file is managed by a sync tool that generates copies elsewhere (see Step 1), rerun that tool's generate/sync command so the copies pick up the change. Skip this step entirely if the file isn't sync-managed, that's the common case.

Step 8: Commit

Single-contributor repo convention: commit (and push, if this repo is push-direct-to-main). For a shared or multi-contributor repo, propose a branch and PR instead.

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.