agentleFS
mycelium-hqmycelium-hq/ai-brain-starter/skills/diagnose/SKILL.md

diagnose

Skill50 starsChanged 7 months agoMITView on GitHub

Use when an AI Brain vault needs a health check or something feels off: Claude ignores CLAUDE.md, journal entries missing from /weekly, hooks not firing, something broke after a git pull, a friend''s install misbehaves, Obsidian crashes or pegs the CPU, a .claude/worktrees folder appeared, Granola/WhatsApp/Slack/Gmail notes stopped arriving, or Windows .ps1 scripts error. Also after major /setup-brain upgrades. Not for debugging code; audits the vault install only.

  • Installs packages

193 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use zoom-out, to-prd and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • victorgarciaesgiSkill

    zoom-out

    Tell the agent to zoom out and give broader context or a higher-level perspective. Use when you're unfamiliar with a section of code or need to understand how it fits into the bigger picture.

    Also in 61 projects that use this

  • GoogleSkill

    to-prd

    Turn the current conversation into a PRD and publish it to the project issue tracker — no interview, just synthesis of what you've already discussed.

    Also in 56 projects that use this

  • GoogleSkill

    to-issues

    Break a plan, spec, or PRD into independently-grabbable issues on the project issue tracker using tracer-bullet vertical slices.

    Also in 53 projects that use this

  • simo97Skill

    edit-article

    The user will invoke this skill to help them edit an article.

    Also in 17 projects that use this

  • simo97Skill

    write-a-skill

    Create new agent skills with proper structure, progressive disclosure, and bundled resources. Use when user wants to create, write, or build a new skill.

    Also in 44 projects that use this

  • AnasX7Skill

    setup-pre-commit

    Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.

    Also in 27 projects that use this

  • +4 more from simo97

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 174 edited versions we read keep these.

  • 4

    Distinctive

    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:

    Run it. Pick the right one for the platform:

    line 54
  2. Distinctive:

    Read the output to the user in plain language.

    line 72
  3. Distinctive:

    After every major upgrade prompt during /setup-brain

    line 109
  4. Distinctive:

    Don't run any of the FAIL fixes without confirming first.

    line 115
  5. Very specific:

    Don't pipe /diagnose output into a gh issue or anywhere public — it includes home directory paths.

    line 116
  6. Very specific:

    Don't treat a WARN about ai-brain-starter being behind as urgent.

    line 117

“Common” is measured: kept by at least 6 in 10 of the 174 edited versions of this file we could read. “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

/diagnose

{SKILL_DIR} = this skill's own folder (locally: the directory this SKILL.md lives in; a served brain substitutes the real absolute path before you read this). Shared starter files live at the repo root two levels up: {SKILL_DIR}/../... If a path does not resolve, name the missing file and stop — never guess another location.

Tells you whether your second brain is healthy.

Why

Most "Claude is broken" reports trace to one of:

  • CLAUDE.md missing or has no Vault Map
  • Hooks not registered, so no auto context-loading
  • journal-index.json stale or malformed, so insights find nothing
  • .ps1 files lost their UTF-8 BOM, so Windows PowerShell crashes
  • ai-brain-starter is many commits behind, so the user is on stale logic

/diagnose checks all of these in ~5 seconds. It writes nothing, sends no network requests beyond a single git fetch, and exits with a status code so it can be wired into CI or cron.

What to do

  1. Find the script: {SKILL_DIR}/../../scripts/diagnose.sh (the starter repo root sits two levels above this skill's folder on every install shape).
  2. Run it. Pick the right one for the platform:

    Mac / Linux:

    bash "{SKILL_DIR}/../../scripts/diagnose.sh"
    # or pass an explicit vault:
    bash "{SKILL_DIR}/../../scripts/diagnose.sh" "/path/to/vault"

    Windows:

    pwsh "{SKILL_DIR}/../../scripts/diagnose.ps1"
    # or:
    pwsh "{SKILL_DIR}/../../scripts/diagnose.ps1" -Vault "C:\path\to\vault"

    By default it uses $VAULT_PATH if set, else the current directory.

  3. Read the output to the user in plain language. Don't dump the raw report unless they ask. Translate:

    • All green: "Your vault is healthy. Nothing to do."
    • Only WARNs: "Working, but $N things to clean up. Want me to fix them?" Then offer to fix the specific WARNs (re-build journal index, add Vault Map to CLAUDE.md, pull latest ai-brain-starter, etc).
    • At least one FAIL: "Something is broken: [name the FAIL in one sentence]. I can fix it: [propose the fix]." Wait for confirmation, then fix.

What each check means

#CheckIf FAILIf WARN
1CLAUDE.md present + has Vault MapRe-run /setup-brain Phase 4Add the Vault Map section by hand
2⚙️ Meta/ + scripts/ + rules/ presentRe-run /setup-brain Phase 3Create the missing subfolder
3ai-brain-starter + daily-journal skills installedRe-run bootstrapA missing daily-journal is usually a STALLED INSTALL, not a missing skill. That skill is built in Phase 10a, so its absence means setup stopped before Phase 10 and every later phase never ran. Do not tell them to install one skill — that leaves the rest of the install missing. Point them at docs/RESUME_INSTALL.md and offer to resume. Only treat it as a genuinely missing skill if the vault also shows Phase 18+ artifacts (⚙️ Meta/journal-index.json), which would mean the install DID get past 10
4Hooks registered + graph-context-hook parsesPhase 5 wires hooks; bash -n the script-
5journal-index.json valid + freshDelete and rebuild via build-journal-index.pyRe-run /weekly to refresh
6git, python3 (jq optional) on PATHbrew install / winget installOptional tools missing
7Vault is a git repo-Recommend git init for snapshot history
8All .ps1 have BOM, no em dashes, parse cleanFix the parser errorAdd BOM and strip em dashes (see SKILL.md notes)
9MCP config valid JSONFix the JSONNo MCPs registered (fine if intentional)
10ai-brain-starter up to date with origin/mainRe-clonegit pull in the starter root ({SKILL_DIR}/../..)
10bNo scheduled-task name collides with a skill; cron-only tasks _-prefixed-Rename per docs/MAINTENANCE.md
11Vault on a local disk, not a consumer cloud-sync rootMove it local (docs/CLOUD_SYNC.md)Could not evaluate the path
12Vault has an off-machine backupSet one up: bash scripts/vault-backup.sh setup (docs/BACKUP.md)Backup configured but no snapshot yet
13No repeated Obsidian renderer crashes (macOS; skips elsewhere)-Heavy indexer likely OOM-ing the renderer on a large vault: restricted mode -> Dataview only -> add others one at a time (see the obsidian-plugins rule, "Large-vault plugin posture")
14bIngest connectors still producing data (the silent-empty 0-vs-0 gap)-A connector exited 0 but returned 0 items (a vendor changed a surface): check its auth/permissions, re-run its ingest skill, confirm it pulls >0 items
17No git worktree living inside the Obsidian-watched vault tree-The Desktop per-session worktree checkbox dropped a checkout under .claude/worktrees/ inside the vault -> renderer OOM/crash. Relocation is dead; the flag does NOT gate it. Relaunch the vault PLAIN with the worktree box UNCHECKED (cd <vault> && claude). See docs/VAULT_WORKTREE_MELT.md

When to suggest /diagnose proactively

  • User says "Claude isn't reading my CLAUDE.md anymore"
  • User says "the journal entries aren't showing up in /weekly"
  • User says "I just did a git pull and something feels off"
  • User says "my friend installed it but it's broken"
  • User says "I never got the interview" / "setup said it was done but nothing happened" / "my CLAUDE.md is empty" / "nunca llegué a la entrevista" (a STALLED INSTALL — setup stopped partway and reported success. Do not diagnose it as N separate missing pieces; send them to docs/RESUME_INSTALL.md and resume from where the vault says they stopped)
  • User says "Obsidian keeps crashing when I open it" / "Obsidian won't open" (likely a heavy-indexer renderer OOM on a large vault - check 13)
  • User says "my brain feels stale" / "I haven't seen any new Granola/WhatsApp/Slack/Gmail notes in a while" / "<source> stopped showing up" (likely a silently-empty connector - check 14b)
  • User says "Obsidian melted / pegged the CPU after I opened a Claude Desktop session" / "the vault doubled itself" / "there's a .claude/worktrees folder full of copies of my vault" (likely a worktree-on-vault checkout - check 17; relaunch PLAIN with the worktree box unchecked)
  • After every major upgrade prompt during /setup-brain

Do NOT use /diagnose as an email-capture surface. If ~/.claude/.ai-brain-starter-email-on-file is missing, that is fine and never a finding — the email is optional, and the only places it is ever asked are the setup interview (Phase 24.4) and the once-per-update post-pull nudge. Never tell the user to fetch or paste a token.

Don't

  • Don't run any of the FAIL fixes without confirming first.
  • Don't pipe /diagnose output into a gh issue or anywhere public — it includes home directory paths.
  • Don't treat a WARN about ai-brain-starter being behind as urgent. Default cadence is fine.

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.