Skip to content
Development
Skill

/staleness-audit

Pre-commit audit. Invoke before every git commit. Diffs the staged change against the repo's "canaries" (README, decision log, roadmap, public API, doc comments, release notes, test discipline) and surfaces anything that's drifted out of sync. Updates the obvious drifts in

From plugin
agent-skills
1240 skills

Claude Code

$ npx -y skills add Flagrare/agent-skills --skill staleness-audit --agent claude-code

SKILL.md

staleness-audit.SKILL.md
name: staleness-audit
description: Pre-commit audit. Invoke before every git commit. Diffs the staged change against the repo's "canaries" (README, decision log, roadmap, public API, doc comments, release notes, test discipline) and surfaces anything that's drifted out of sync. Updates the obvious drifts in place; flags judgement calls for the operator.

Staleness audit

Run this before every commit. The goal is simple: **a commit should leave the docs, types, and roadmap in a state consistent with the code it ships**. Drift between code and its surrounding narrative is how projects rot.

Don't be lazy, actually run the checks. Each one is a `grep` or a `diff`. The whole audit should take under 30 seconds.

How to invoke

You (the model) invoke this skill yourself, before staging the final commit. The rule: *every commit goes through this checklist*. If you're amending or splitting commits, run it per commit.

Inputs

  • `git diff --staged --stat`, what's about to be committed
  • `git diff --staged`, the actual hunks (only read the ones you need)
  • `git status`, what's unstaged or untracked that might also be drift
  • The repo working tree for the canary files listed below

Procedure

Work through the checks in order. For each finding, either **fix it now** (if the fix is mechanical and in scope) or **note it explicitly** in the commit body / the response to the user (if it's a judgement call).

1. README staleness

The `README.md` is the project's storefront. After every commit, ask:

  • **Status line**: does `## Status` (or the equivalent line) still match reality? Words like "pre-alpha", "bootstrapping", "WIP", "coming soon", "not yet implemented" need to age out as features ship. If this commit moves the needle, update the status text.
  • **Roadmap checkboxes**: `- [ ] X` for things that *just shipped* in this commit (or earlier ones not yet ticked) should become `- [x] X`. Conversely, anything ticked that's been ripped out needs to be re-opened or removed.
  • **Code examples**: if a public-API signature changed, do the README code blocks still compile and reflect the new shape? Grep the README for the renamed/removed identifier.
  • **Badge accuracy**: if a CI workflow or license changed, the badges still point at the right thing.

2. Decision log integrity

If the project has a decision log (ADRs in `docs/decisions/`, RFCs, or equivalent), check:

  • Any new decision file that isn't in the index. Add it.
  • Any decision whose `Status:` says "Accepted" but is actually superseded by a later one, update status on both.
  • Cross-references that point at filenames that no longer exist.

If the project has no decision log, skip this check.

3. Public API sync

If the project has a single public entry point, verify exports are in sync after every commit touching source files. The entry point varies by language:

  • **TypeScript:** `src/index.ts` (or the barrel specified in `package.json#exports`)
  • **Python:** `<package>/__init__.py`
  • **Rust:** `src/lib.rs` (`pub use` re-exports)
  • **Go:** exported symbols in the package's public files

For every export newly added in non-entry source files, is it re-exported from the entry point? For every removed export, is the entry point cleaned up?

If the project has no single entry point (e.g. a CLI tool, not a library), skip or adapt this check.

4. Doc comment completeness on public symbols

For the project's documentation format, spot-check staged source files:

  • **TypeScript:** any new `export class / function / interface / type / const` without a leading `/** … */`?
  • **Python:** any new public function/class without a docstring?
  • **Rust:** any new `pub fn / pub struct / pub trait` without `///` doc comments?
  • **Other:** apply the language's equivalent convention.

Flag any new public symbol without documentation. Flag existing doc comments that still say `TODO` or `@todo`.

5. Release note for user-facing changes

If the commit touches source files, ask: is this user-observable?

  • If yes, verify it's captured in the project's changelog mechanism:
  • **Changesets:** a `.changeset/*.md` file (run `pnpm changeset` or `npx changeset` to draft)
  • **towncrier:** a `changelog.d/` fragment
  • **Manual CHANGELOG:** a new entry in `CHANGELOG.md`
  • **Conventional commits:** the commit message itself is the record, verify it's descriptive enough
  • If no (pure internal refactor / test / docs / tooling), no release note is needed, but note that explicitly.

6. Contributor guide hygiene

If the project has a `CONTRIBUTING.md` (or equivalent), after any commit that adds or removes tooling:

  • Search for references to tools that are no longer in the project's dependency manifest (`package.json`, `Cargo.toml`, `pyproject.toml`, `go.mod`, etc.).
  • If a workflow changed (CI job, hook, script), make sure the contributor guide reflects it.

7. Test name discipline

Test names should describe **behaviour**, not method names. Grep newly added/changed test files for:

  • `it("works")`, `test("test 1")`, `it("should work correctly")`, `it("returns the value")`, vague or method-centric. Flag.
  • Good names: `it("rejects an out-of-range index with a RangeError carrying the attempted value")`.

This applies regardless of framework (Jest, Vitest, pytest, RSpec, Go test, etc.).

8. Stale markers in new code

Grep the staged diff for tokens that shouldn't ship:

  • `TODO`, `FIXME`, `XXX`, `HACK`, `@todo`, fine if they reference an issue (`TODO(#42)`); not fine if naked.
  • `console.log`, `debugger`, `.only`, `.skip` in test files.
  • Leftover lint-suppression comments without an explanation.

9. Research catalog

If external research was conducted during this session (WebFetch, WebSearch, or Explore-agent fetches of URLs outside the repo) and the findings informed this commit:

  • Was `/flagrare:research-catalog` invoked before the synthesis was returned? If not, run it now before committing.
  • Does the consuming artifact (ADR
Read more
@flagrare
Ships withagent-skills

Thirty-eight skills that wrap around your development cycle in Claude Code. They turn tickets into ATDD plans, smoke-test features against a running app or service, hunt down bugs with runtime evidence, guard commits against doc drift, run seven-axis code

Stars on GitHub

Momentum

stars in total
12
Star history of Flagrare/agent-skills on GitHub, a chart by star-history.com

Other skills on agent-skills.

atdd-plan

atdd-plan

Produce an ATDD-first implementation plan in Claude Code's native plan mode, with named design patterns called out where they…

brag-doc

brag-doc

Generate a comprehensive, impact-framed brag-doc entry for a chosen time window (day, week, biweek, month, or custom). Pulls…

bug-bash

bug-bash

Programmatic bug bashing, ingest a prescribed test plan (Notion, markdown, pasted spec), drive a real running system (browser via…

career

career

Run the career skills that are due, in one pass, and return one short combined digest plus an updated board. It reads timestamps…

codebase-explore

codebase-explore

Explore the codebase to map conventions, reusable utilities, analogous features, and data flows relevant to a planned change.…

daily-code-review

daily-code-review

Generate a daily code review report showing stale PRs, items needing your attention, and active work for your team. Use whenever…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills10d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc12d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react1d252k
@facebook@facebookInstall Skill

Questions about staleness-audit.

Which coding agents can use staleness-audit?
staleness-audit installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.