agentleFS
cogotemartinezcogotemartinez/ai-second-brain-template/.claude/skills/audit-brain/SKILL.md

audit-brain

Skill9 starsChanged 9 months agoMITView on GitHub

Check your second brain for structural issues, stale content, memory cleanup, and inconsistencies

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. Seraght/claude-skills★ 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 repository6 other files it gives its agents.

The file

Show its rules and text

We split this skill into the rules it gives an agent

20 rules. About 0 are common, 18 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈18

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every domain (except _template) must have both files.

    line 47
  2. Distinctive:

    Every domain folder appears in the routing table

    line 61
  3. Distinctive:

    Every routing entry has a matching folder

    line 62
  4. Distinctive:

    Every skill folder appears in the skills table

    line 70
  5. Distinctive:

    Every user-invocable skill must appear in all 3 locations.

    line 80
  6. Distinctive:

    Verify every listed file actually exists in that domain folder.

    line 88
  7. Very specific:

    Verify each /skill-name referenced exists in .claude/skills/

    line 93
  8. Distinctive:

    Verify income/expense numbers match across files

    line 116
  9. Distinctive:

    Verify margin calculation is correct (income - expenses = margin)

    line 117
  10. Distinctive:

    Verify runway calculation makes sense (net worth / monthly expenses)

    line 118
  11. Distinctive:

    Verify paths and URLs are filled in (not still placeholders).

    line 125
  12. Distinctive:

    NEVER execute cleanup automatically

    line 161
  13. Distinctive:

    ALWAYS show dry-run first

    line 162
  14. Distinctive:

    ALWAYS ask for approval item by item

    line 163
  15. Distinctive:

    NEVER delete — only archive

    line 164
  16. Very specific:

    Verify each domain has an archive.md file.

    line 168
  17. Distinctive:

    If memory.md has old content but no archive.md exists, suggest creating one.

    line 169
  18. Distinctive:

    Check git status — must be clean (no uncommitted changes)

    line 198
  19. Distinctive:

    If dirty → STOP, ask user to commit first

    line 199
  20. Distinctive:

    Update relevant memory.md if significant findings

    line 287

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

/audit-brain

Systematic audit of your second brain. Run monthly or after significant changes.

Usage

/audit-brain           # Full audit (includes memory cleanup suggestions)
/audit-brain quick     # Structure + consistency only (fast)

Full audit includes:

  • Structural checks (1-7)
  • Dynamic checks (8-10)
  • Memory cleanup suggestions (11-13)

Quick audit only:

  • Domain structure, skill structure, routing consistency

Execution Model

For full audits, launch up to 3 parallel Task agents to speed up checks:

  • Agent 1: Structural checks (1-5)
  • Agent 2: Dynamic checks (6-10)
  • Agent 3: Memory cleanup analysis (11-13)

For quick audits, run checks sequentially (no agents needed).


Checks

Structural (always run)

1. Domain Structure

Glob: domains/*/CLAUDE.md
Glob: domains/*/memory.md

Every domain (except _template) must have both files.

2. Skill Structure

Glob: .claude/skills/*/SKILL.md

Each must have frontmatter: description, user-invocable

3. Routing Table Consistency

Read: CLAUDE.md routing table
Glob: domains/*/
  • Domain count in routing table matches actual domain folders
  • Every domain folder appears in the routing table
  • Every routing entry has a matching folder

4. Skills Table Consistency

Read: CLAUDE.md skills table
Glob: .claude/skills/*/SKILL.md
  • Skills listed in CLAUDE.md match actual skill folders
  • Every skill folder appears in the skills table

5. Documentation Sync

Cross-reference skills and features across documentation:

1. .claude/skills/*/SKILL.md (source of truth)
2. CLAUDE.md "Available Skills" table
3. README.md features table

Every user-invocable skill must appear in all 3 locations.

Dynamic (detect real issues)

6. Broken References

Read: each domain's CLAUDE.md "Files in This Domain" section

Verify every listed file actually exists in that domain folder.

Grep: skill names referenced in CLAUDE.md

Verify each /skill-name referenced exists in .claude/skills/

7. Orphan Files

Glob: domains/*/*.md
Read: each domain's CLAUDE.md "Files in This Domain"

Detect .md files that exist but aren't referenced in their domain's CLAUDE.md.

8. Memory Freshness

Read: each memory.md, find most recent date
  • < 30 days: OK
  • 30-60 days: STALE (warning)
  • 60 days: VERY_STALE (issue)

9. Financial Consistency (finances domain only)

Read: domains/finances/CLAUDE.md
Read: domains/finances/situation.md
Read: domains/finances/memory.md
  • Verify income/expense numbers match across files
  • Verify margin calculation is correct (income - expenses = margin)
  • Verify runway calculation makes sense (net worth / monthly expenses)
  • Flag any number that appears in multiple files with different values

10. Cross-Reference resources.md

Read: resources.md

Verify paths and URLs are filled in (not still placeholders). Flag any connected tool without an MCP configured.


Memory Cleanup (full audit only)

11. Memory Content Analysis

For each domains/*/memory.md:

Read: domains/{domain}/memory.md
Analyze:
  - Entries with dates > 60 days old
  - Completed checkboxes [x] > 30 days old
  - Repetitive entries (similar content on different days)
  - Very long entries (>20 lines for a single item)

Rules:

ContentThresholdSuggested Action
Old entries> 60 daysArchive to archive.md
Completed checkboxes> 30 daysMove to History section
Repetitive entries> 30 daysConsolidate into summary
Very long entries> 20 linesSuggest summarizing

Per-domain sensitivity:

  • finances: Conservative (historical numbers useful for comparison)
  • health: Conservative (medical history is critical)
  • career/projects: Normal
  • learning/relationships: Normal

IMPORTANT:

  • NEVER execute cleanup automatically
  • ALWAYS show dry-run first
  • ALWAYS ask for approval item by item
  • NEVER delete — only archive

12. Archive Management

Verify each domain has an archive.md file. If memory.md has old content but no archive.md exists, suggest creating one.

Expected archive.md structure:

# Archive - [Domain Name]

Historical content moved from memory.md

---

## [Year]

### Q[n] [Year]
[Archived content with original dates preserved]

13. Orphan Domain Files

Glob: domains/*/*.md
Read: each domain's CLAUDE.md

Detect files that exist in domain folders but aren't listed in "Files in This Domain".


Cleanup Workflow

Prerequisites:

  1. Check git status — must be clean (no uncommitted changes)
  2. If dirty → STOP, ask user to commit first

Process:

1. Analyze all memory.md files
2. Generate DRY-RUN report (no modifications)
3. Show each proposed change with:
   - Lines affected
   - Current content
   - Proposed action
   - Reason
4. Ask for approval (all / some / none)
5. If approved:
   - Execute only approved changes
   - Show diff
   - Offer to commit with descriptive message

Dry-run output format:

## Cleanup Preview (DRY RUN - nothing modified)

### [domain]/memory.md
| Lines | Content | Action | Reason |
|-------|---------|--------|--------|
| 45-52 | Old entries from Nov | Archive | >60 days |
| 80-85 | Completed todos | Archive | >30 days done |

**Estimated reduction:** ~XX lines

Approve? (a=all / n=none / 1,2,3=specific items)

Output Format

# Audit Report - [date]
**Status:** CLEAN | ISSUES_FOUND

## Summary
- Domains: X
- Skills: X
- Issues: X
- Warnings: X

## Issues (must fix)
| # | Issue | Location | Fix |
|---|-------|----------|-----|

## Warnings (should fix)
| # | Warning | Location |
|---|---------|----------|

## Passed Checks
- [x] Domain structure OK
- [x] Skill structure OK
- [x] Routing table consistent
- [x] No broken references
- [x] No orphan files
- [x] Memory files fresh
- [x] Financial numbers consistent
- [x] Documentation in sync

Want me to fix the issues and commit?

Quick Audit

For /audit-brain quick, only run checks 1-5 (structural + consistency).

# Quick Audit - [date]
- Domains: X (OK | issues)
- Skills: X (OK | issues)
- Routing: OK | mismatches
- Docs: OK | out of sync

Post-Audit Actions

  1. Fix simple issues immediately if user approves
  2. Offer to commit changes with descriptive message
  3. Update relevant memory.md if significant findings

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.