agentleFS
hosaypenghosaypeng/claude-skills/audit-paths/SKILL.md

audit-paths

Skill0 starsChanged 9 days agoMITView on GitHub

Scan CLAUDE.md, MEMORY.md, memory files, and LaunchAgent plists for dead file/directory paths. Use when user says 'audit paths', 'check for dead paths', 'stale references', or after restructuring files/directories.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After running the script, present results as a table:

    line 24
  2. Distinctive:

    If the path looks like a renamed file/dir, suggest the likely new path

    line 30
  3. Distinctive:

    If the path looks deleted, suggest removing the reference

    line 31
  4. Distinctive:

    If it's a LaunchAgent, suggest updating the plist or unloading the agent

    line 32
  5. Distinctive:

    If no dead paths are found, confirm all paths are valid.

    line 34

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

Audit Paths

Parse the argument to determine which mode to run:

  • all (or no argument) — scan memory/config files AND LaunchAgent plists
  • memory — only scan CLAUDE.md, MEMORY.md, and memory/*.md
  • launchagents — only scan ~/Library/LaunchAgents/*.plist

Execution

bash ~/.claude/skills/audit-paths/scripts/audit_paths.sh <mode>

Presenting Results

After running the script, present results as a table:

StatusSource FileDead Path

For each dead path found, suggest a specific fix:

  • If the path looks like a renamed file/dir, suggest the likely new path
  • If the path looks deleted, suggest removing the reference
  • If it's a LaunchAgent, suggest updating the plist or unloading the agent

If no dead paths are found, confirm all paths are valid.

Troubleshooting

  • Script exits with non-zero code: Exit code = number of dead paths found. This is expected — not an error.
  • False positives for relative paths: The script resolves relative paths against the vault root. If a path is relative to a different base, it may false-positive.
  • What it skips on purpose: lines containing a removal word (deleted, removed, uninstalled, retired, dropped, gone, stale, absent, left), because memory records name absent paths deliberately. It also skips globs and braces, <placeholders>, ..., $(…), /Volumes/ paths, and command strings whose first word is an existing executable. To mark a deliberately absent path, put one of those words on its line. Test changes with AUDIT_MEMORY_DIR=<fixture dir> bash scripts/audit_paths.sh memory.
  • LaunchAgent paths that look dead but work: a .log path counts as alive when its folder exists, since launchd creates it on first output. Other runtime paths (PID files) may still flag; verify before fixing.
  • Permission denied on LaunchAgents: iCloud-managed plists may have restricted permissions. Run with standard user permissions — don't sudo.

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.