audit

audit is a command for Claude Code from reluctantfuturist/loyal-wingman. It costs 17 tokens per session (878 once invoked), scanned A, original, MIT.

A file and folder review command for fiction projects that checks content, metadata, links, references, and recent changes.

In plain words
What is it for?
It audits files or folders, reports frontmatter and word counts, checks internal links, and finds projects or scenes that refer to the selected material.
Why use it?
It helps find outdated material, broken links, unused entries, and cleanup opportunities without checking every project file by hand.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the loyal-wingman plugin — 12 skills, 7 commands shipped together

Good fit It audits files or folders, reports frontmatter and word counts, checks internal links, and finds projects or scenes that refer to the selected material.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/reluctantfuturist/loyal-wingman/audit
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/reluctantfuturist/loyal-wingman

Made for: Claude Code.

Or install loyal-wingman, the plugin that ships this one along with the rest of its 12 skills, 7 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for audit

README.md
[![agentmods](https://agentmods.dev/badge/commands/reluctantfuturist/loyal-wingman/audit/github.svg)](https://agentmods.dev/commands/reluctantfuturist/loyal-wingman/audit)
Your own site
<a href="https://agentmods.dev/commands/reluctantfuturist/loyal-wingman/audit"><img src="https://agentmods.dev/badge/commands/reluctantfuturist/loyal-wingman/audit/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for audit

Your own site · 80×15
<a href="https://agentmods.dev/commands/reluctantfuturist/loyal-wingman/audit"><img src="https://agentmods.dev/badge/commands/reluctantfuturist/loyal-wingman/audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 878 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00017 $0.00878
Opus 5 $0.00009 $0.00439
Sonnet 5 $0.00003 $0.00176
Haiku 4.5 $0.00002 $0.00088

Measured 10d ago against content hash ff6a17970034, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

audit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/audit.md · 154 lines

How it starts

The opening of the file, as written. The whole thing — 154 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/audit

Analyze a specific file or folder for staleness, broken links, and cleanup opportunities.

Usage

/audit 01_Meta/Templates/
/audit 02_World/Characters/[Character Name].md
/audit 10_Projects/[ProjectName]/
/audit --recent                    # Audit recently modified files

Process - File Audit

Step 1: Read File

  • Full content
  • Frontmatter fields
  • Last modified date
  • Word count

Step 2: Validate Links

REQUIRED SUB-SKILL: Invoke validate-links for this file

Validate-links will check:

  • All outgoing [[wikilinks]] resolve
  • Incoming links from other files
  • Bidirectional linking compliance

Step 3: Query Usage Context

REQUIRED SUB-SKILL: Invoke query-context to find:

  • Which projects/scenes reference this file
  • Related entries in world bible
  • Research backing (if applicable)

Step 4: Report

## Audit: [Filename]

**Type:** [Character|Location|Equipment|etc.]
**Location:** [full path]
**Last modified:** [date] ([age])
**Word count:** [count]

### Frontmatter
- status: [value]
- [other fields]

### Link Analysis (from validate-links)
**Outgoing Links ([count]):**
- [[Link 1]] ✓
- [[Link 2]] ✓
- [[Missing Link]] ✗ BROKEN

**Incoming Links ([count]):**
- [File 1]
- [File 2]

**Bidirectional Status:** [OK|Issues found]

### Usage Context (from query-context)
- **Appears in projects:** [list]
- **Related world entries:** [list]
- **Research backing:** [list]

### Assessment
**Value:** [Essential|Useful|Redundant|Obsolete]
**Recommendation:** [Keep|Update|Archive|Delete]
**Reason:** [explanation]

### Suggested Actions
- [ ] Fix broken links (validate-links)
- [ ] Update stale content
- [ ] Add missing backlinks

Process - Folder Audit

Step 1: List Contents

  • All files with ages
  • Subdirectory structure

Step 2: Validate All Links

REQUIRED SUB-SKILL: Invoke validate-links for folder scope

Step 3: Query Context for Each File

REQUIRED SUB-SKILL: Invoke query-context to assess usage

Read the full file on GitHub · 154 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 154 lines · 17 tokens per session scan A ff6a17970034

Subscribe to this mod's changes

audit is a command published in the GitHub repository reluctantfuturist/loyal-wingman (7 stars, last pushed 8mo ago), licensed MIT. It adds 17 tokens to every session and 878 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.