Audit Code logo

Audit Code

Community
danielvm-git
audit-code

Self-review checklist for the coding agent to run before dispatching a reviewer. Checks CONVENTIONS.md compliance, Boy Scout Rule, test coverage, types, and SOLID. Produces a pass/fail checklist. Use before request-review, before committing, or when user asks for a code quality check.

Overview

Publisherdanielvm-git
Repositorybigpowers
Skill nameaudit-code
Stars
206
Forks
18
Bundled files
1
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by danielvm-git on GitHub. Read the source before you install it.

Installation

Install the Audit Code AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/danielvm-git/bigpowers.git /tmp/bigpowers
mkdir -p .claude/skills
cp -r /tmp/bigpowers/skills/audit-code .claude/skills/audit-code
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Audit Code in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Audit Code on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Audit Code is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Audit Code

HARD GATEHARD GATE — Audit must check for: bugs (correctness), security, performance, and clarity. Do NOT skip security review if the code touches user data, auth, or external APIs.

Run this self-review before asking anyone else to look at the code. The goal is to catch everything that is clearly wrong or missing — so the reviewer can focus on design and architecture, not hygiene.

Distinct from request-review: This is the coding agent checking its own work. No second agent is involved. Run this first; run request-review after this passes.

Look-here-first (churn heuristic)

Before the checklist, rank changed files by git churn and review high-churn hotspots first — they carry the most latent risk regardless of diff size.

bash
bash scripts/bp-churn-rank.sh --since 90.days --limit 15

Apply the full checklist to churn-ranked files in descending order. Files with zero recent commits but large diffs still get reviewed; churn only sets priority, not scope.

Modes

  • Default: full checklist
  • --quick: Run only Supply Chain and Test Coverage. Use for changes under 50 LOC.
  • --gate: Non-interactive mode for automated CI gating (used by build-epic step 6). Exit with non-zero status code (exit 1) on ANY checklist failure; exit 0 only if ALL items pass. Produces a compact pass/fail summary to stderr. On failure, list every ✗ item with reason.
  • --parallel: Run checklist sections in isolated git worktrees (e45s18) so concurrent checks cannot corrupt each other's working tree:
bash
bash scripts/lib/parallel-review-worktrees.sh audit-code

Checklist

Supply Chain & Security

  • slopcheck run for new dependencies; packages tagged in plan-work: [OK], [SUS], or [SLOP]
  • No [SLOP] packages without documented human approval
  • No secrets in diff (sk-, ghp_, AKIA, .env values) — see guard-git patterns
  • OWASP Top 10 spot-check: injection, broken auth, sensitive data exposure, misconfiguration (see docs/references/security-threats.md)
  • Security: diff scanned — no unaddressed HIGH findings (or deviations documented in specs/security/EXCEPTIONS.md)

Provenance & Metadata

  • New plan artefacts include type: and context: metadata
  • Implementation steps reference ADR or commit SHA where decisions were made

Law of Demeter

  • No method chains through unrelated objects (e.g. a.getB().getC().doX())
  • Collaborators talk to immediate neighbors only; law violations need explicit justification

CONVENTIONS.md Compliance

  • All output files are in specs/ (no docs written to project root)
  • No gh issue create calls anywhere in new/modified skills or scripts
  • gh used only for PRs and repo clone operations
  • No GitHub REST API called directly (no curl/fetch to api.github.com)

Scope

  • Changes are limited to what was asked — nothing extra refactored or reorganized
  • No speculative features added
  • No files touched outside the stated scope
  • Discovered defects: Reproducible gate failures (Preflight, CI, golden suite) require fix-or-log — quick-fix or fix-bug — even when "outside" the story scope. Scope-minimization does not waive Always Green.
  • Boy Scout Rule applies to files opened to fix a gate failure; it does not excuse skipping red Preflight

Boy Scout Rule

  • Every file I touched is cleaner than when I found it
  • No dead code left behind
  • No commented-out code blocks

Types and Safety

  • No any types introduced (TypeScript) or untyped public functions (Python/Go/etc.)
  • No @ts-ignore or // eslint-disable added
  • No as unknown as X casts that bypass type safety

Test Coverage

  • Every new function has at least one test
  • Every bug fix has a regression test
  • Tests verify behavior through public interfaces (not implementation details)
  • Tests are F.I.R.S.T compliant (per CONVENTIONS.md §Tests; use enforce-first if unsure)

SOLID and Heuristics

  • Single Responsibility: no function or module doing two unrelated things
  • Open/Closed: extended through interfaces, not by modifying stable code
  • Dependency Inversion: dependencies injected, not imported globally where avoidable
  • Chapter 17 Heuristics: Code is free of smells documented in audit-code/HEURISTICS.md (G, N, C, T)

Refactoring Smells (Fowler)

Explicitly name any detected smells: Mysterious Name, Duplicated Code, Feature Envy, Data Clumps, Primitive Obsession, Message Chains, Middle Man.

Code Style (CONVENTIONS.md)

  • Functions: 4–20 lines; split if longer
  • Functions: descend exactly one level of abstraction (The Stepdown Rule / G34)
  • Files: under 300 lines (ideally 200–300)
  • Names: specific and unique (grep returns < 5 hits for each name)
  • No duplication — shared logic extracted (DRY / G5)
  • Early returns over nested ifs; max 2 levels of indentation
  • Conditionals: expressed as positives (G29)
  • Comments explain WHY, not WHAT

Red Flags

Before reporting, name any rationalization you caught yourself making for skipping a checklist item. Silence is not acceptable — if you skipped an item, state the reason explicitly.

Output

Report the checklist with ✓ / ✗ per item. For each ✗, describe what needs to be fixed.

If all items pass: suggest running request-review for an independent second opinion. If any items fail: fix them before proceeding.

In --gate mode, print one summary line per checklist section (PASS Supply Chain / FAIL Provenance (2 items)). Exit 0 only if all PASS. Write full report to specs/verifications/AUDIT-<epic>-<story>.md.

Verify

→ verify: test -f CONVENTIONS.md && test -d skills/enforce-first && test -d skills/request-review

Handoff

Gate: READY -> next: commit-message Writes: state.yaml handoff.next_skill = commit-message

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Audit Code AI skill do?

Self-review checklist for the coding agent to run before dispatching a reviewer. Checks CONVENTIONS.md compliance, Boy Scout Rule, test coverage, types, and SOLID. Produces a pass/fail checklist. Use before request-review, before committing, or when user asks for a code quality check.

Why use Audit Code on TypingMind?

Because you install it once and use it with any model. Audit Code is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Audit Code in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/danielvm-git/bigpowers/tree/main/skills/audit-code. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Audit Code?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Audit Code?

As many as you like. As long as a model supports skills, you can use Audit Code with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Audit Code AI skill free?

Yes. It is published on GitHub by danielvm-git under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇