agentleFS
HAX-StudioHAX-Studio/mnemonica/skills/audit-light/SKILL.md

audit-light

Skill3 starsChanged 3 months agoMITView on GitHub

This skill should be used when the user asks to "run a mnemonica light audit", "check docs since last commit", "quick doc sync", "sync knowledge docs with recent commits", or wants a fast, incremental check that recent commits are reflected in the project's knowledge/ documentation without rescanning the whole codebase.

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. fernandoxavier02/Pipeline-Orchestrator★ 1same name
    2. path-to-ai-com/ptai-ecom-toolkit★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository7 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If the user's invocation includes extra wording beyond the trigger phrase, treat it as scoping or preference for this run — for example, …

    line 16
  2. Very specific:

    Read the module index in .claude/CLAUDE.md (the block inside MNEMONICA:BEGIN/END).

    line 58
  3. Very specific:

    If the matched modules span most or all of the project's modules at once (a broad, sweeping change), do not attempt to patch every module …

    line 66
  4. Distinctive:

    Read the actual current code at the paths that changed.

    line 78
  5. Distinctive:

    Read the module file's current content.

    line 79
  6. Very specific:

    If more than one module was matched, apply the cross-cutting rule: pick the module where the core logic actually lives as primary, give it …

    line 83
  7. Very specific:

    Run ${CLAUDE_PLUGIN_ROOT}/scripts/write-checkpoint.sh <project-root> light.

    line 92

≈ “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

Mnemonica: audit-light

Reconcile knowledge/ with only what changed since the last checkpoint — a cheap, targeted pass, not a full rescan. Read ${CLAUDE_PLUGIN_ROOT}/references/knowledge-conventions.md first; it defines the checkpoint file format, the module index format, and the update/cross-cutting rules this skill applies. This skill requires git (it has no concept of "since the last checkpoint" without commit history) and is always invoked directly by the user — never by a hook, and never automatically on commit or push.

If the user's invocation includes extra wording beyond the trigger phrase, treat it as scoping or preference for this run — for example, pointing out a companion tool to also consult, or which module they especially care about. It cannot skip the escalation in Step 3 when the diff is too broad, and it cannot make the checkpoint advance when this skill would otherwise not advance it.

Step 1: Get the change range

Run ${CLAUDE_PLUGIN_ROOT}/skills/audit-light/scripts/diff-since-checkpoint.sh <project-root>.

  • Exit 5 (NO_GIT_REPO): this project has no git repository. Tell the user audit-light needs git and cannot run here; suggest git init (no remote required) if they want incremental audits, and stop.
  • Exit 2 (NO_CHECKPOINT): there is no baseline to diff from yet. Tell the user to run mnemonica:audit-full first — it creates the checkpoint as part of its own run — and stop.
  • Exit 3 (STALE_CHECKPOINT): the recorded commit is not an ancestor of HEAD anymore (rebase, squash, or history rewrite — note that the old commit can still physically exist in the repository for a long time after this happens, so this is a real ancestry check, not a mere existence check). Tell the user the checkpoint is stale and recommend mnemonica:audit-full to re-baseline, and stop.
  • Exit 4 (CORRUPT_CHECKPOINT): the state file exists but couldn't be parsed. This should not happen through normal use (the checkpoint is always written by scripts/write-checkpoint.sh), so treat it as a sign the file was hand-edited. Recommend mnemonica:audit-full to re-baseline, and stop.
  • Success: the script prints the commit range, the new HEAD SHA, and the list of files changed across that range.

Step 2: Check index integrity

Run ${CLAUDE_PLUGIN_ROOT}/scripts/check-index-integrity.sh <project-root>.

  • Exit 1: one or more module files listed in the CLAUDE.md index are missing from disk (knowledge/ was edited or deleted outside of Mnemonica). Recreating a module from scratch is a bootstrap-style operation, not a targeted one — out of scope for a light audit. Note the missing files in the final report and recommend mnemonica:audit-full, but continue with Steps 3-5 for whatever modules do still exist; a few missing files elsewhere shouldn't block reconciling the ones that are present.
  • Exit 0 or 2: nothing to flag here — continue normally. (Exit 2, no MNEMONICA block at all, should not happen if setup ran, but isn't this skill's problem to fix.)

Step 3: Map changed files to modules

Read the module index in .claude/CLAUDE.md (the block inside MNEMONICA:BEGIN/END). Match each changed file path (from Step 1) against each module's owned-path glob(s). A file may match zero, one, or multiple modules.

  • Files matching no module: track them for the report (Step 6) rather than dropping them silently — they belong to no documented system yet, or to a system too new to have a module. Whether that's fine or worth flagging is the user's call, not this skill's; make sure they can see it happened.
  • If the matched modules span most or all of the project's modules at once (a broad, sweeping change), do not attempt to patch every module piecemeal — tell the user this looks broad enough that mnemonica:audit-full would be more reliable, and stop. Do not proceed to Step 5 (checkpoint update) in this case — the checkpoint must stay where it is so the range that was too broad for a light audit is still there for audit-full (or a future audit-light run) to actually reconcile. Advancing it here would make that range silently vanish from consideration.

Step 4: Reconcile the matched modules

For each matched module (this should normally be a small number):

  1. Read the actual current code at the paths that changed.
  2. Read the module file's current content.
  3. Correct anything the module says that the code no longer does, and add coverage for anything genuinely new — per the update rule in knowledge-conventions.md, this is not append-only.
  4. If more than one module was matched, apply the cross-cutting rule: pick the module where the core logic actually lives as primary, give it the full update, and give the other matched modules only a one-line See also: note pointing at the primary.

None of this requires asking the user — creating or editing module content is always a low-risk edit per knowledge-conventions.md.

Step 5: Update the checkpoint

Run ${CLAUDE_PLUGIN_ROOT}/scripts/write-checkpoint.sh <project-root> light. Only reach this step if Step 3 did not escalate to audit-full. It is fine to reach this step even if zero modules were matched (Step 3 legitimately found nothing relevant in range) — that is a completed review of the range, not a skipped one, and the checkpoint should advance. The one case that must never advance the checkpoint is the broad-diff escalation in Step 3.

Step 6: Report

Tell the user which modules were updated and why, in one or two sentences per module. If any module files were missing (Step 2), list them. If any changed files matched no module (Step 3), list them too, so nothing that happened is invisible. If nothing needed changing, say so plainly rather than fabricating an update.

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.