Back to Skills

mem-audit

verified

Scan the knowledge base for structural issues like broken links, orphan notes, missing indexes, and optionally AI-powered content staleness detection.

View on GitHub

Marketplace

cc-obsidian-mem

Z-M-Huang/cc-obsidian-mem

Plugin

cc-obsidian-mem

Repository

Z-M-Huang/cc-obsidian-mem
8stars

plugin/skills/mem-audit/SKILL.md

Last Verified

January 24, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/Z-M-Huang/cc-obsidian-mem/blob/main/plugin/skills/mem-audit/SKILL.md -a claude-code --skill mem-audit

Installation paths:

Claude
.claude/skills/mem-audit/
Powered by add-skill CLI

Instructions

# Memory Audit Skill

Audit your Claude Code knowledge base to identify structural issues and content staleness.

## When to Use

- Checking health of your knowledge base
- Finding broken links between notes
- Identifying orphan notes not connected to the hierarchy
- Detecting missing category indexes
- Finding notes with invalid frontmatter
- Optionally: AI-powered detection of stale content

## Usage

The skill can run with or without a project specified:

```
/mem-audit
/mem-audit project:my-project
/mem-audit includeContentValidation:true
```

## Workflow

1. **Detect Project**
   - If no project specified and only one exists, use it automatically
   - If multiple projects exist, list them and ask the user to specify

2. **Run Audit**
   - Call `mem_audit` with appropriate options
   - Structural checks run by default (fast, no AI)
   - Content validation is optional and uses AI (slower)

3. **Present Results**
   - Show summary of issues by severity (errors, warnings, info)
   - Group issues by category
   - Show suggested fixes and whether they're auto-fixable
   - Recommend using `/mem-fix` for auto-fixable issues

## Issue Categories

### Structural (Fast, No AI)
- `broken_link`: Wikilinks pointing to non-existent notes
- `orphan_note`: Notes without parent links (not connected to hierarchy)
- `missing_index`: Category folders missing their index file
- `supersession_inconsistent`: Supersession links not properly set up
- `index_stale`: JSON index out of sync with note files
- `invalid_frontmatter`: Missing required frontmatter fields

### Content (AI-Powered, Slower)
- Stale content detection by comparing notes to current code
- Only runs when `includeContentValidation: true`

## Output Format

```markdown
# Audit Results: project-name

**Scanned**: 42 notes in 156ms

## Summary

- **Errors**: 2
- **Warnings**: 5
- **Info**: 3

## Broken Link (3)

- [!] `research/2024-01-15_api-design.md`: Broken link: [[old-decision]]
  - Fix: Remove broken link [[old-deci

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
2290 chars