$npx -y skills add iurykrieger/claude-bedrock --skill healthcheckRead-only vault health diagnostic. Generates a report without modifying any files. Checks: graphify-out integrity, setup verification, orphan entities, dangling content, old content (>15 days). Safe to run at any frequency. Use when: "bedrock healthcheck", "bedrock-healthcheck",
| 1 | # /bedrock:healthcheck — Vault Health Report |
| 2 | |
| 3 | ## Plugin Paths |
| 4 | |
| 5 | Entity definitions and templates are in the plugin directory, not the vault root. |
| 6 | Use the "Base directory for this skill" provided at invocation to resolve paths: |
| 7 | |
| 8 | - Entity definitions: `<base_dir>/../../entities/` |
| 9 | - Templates: `<base_dir>/../../templates/{type}/_template.md` |
| 10 | - Plugin CLAUDE.md: `<base_dir>/../../CLAUDE.md` (already injected automatically into context) |
| 11 | |
| 12 | Where `<base_dir>` is the path provided in "Base directory for this skill". |
| 13 | |
| 14 | --- |
| 15 | |
| 16 | ## Vault Resolution |
| 17 | |
| 18 | Resolve which vault to diagnose. This skill can be invoked from any directory. |
| 19 | |
| 20 | **Step 1 — Parse `--vault` flag:** |
| 21 | Check if the input arguments include `--vault <name>`. If found, extract the vault name. |
| 22 | |
| 23 | **Step 2 — Resolve vault path:** |
| 24 | |
| 25 | 1. **If `--vault <name>` was provided:** |
| 26 | Read the vault registry at `<base_dir>/../../vaults.json`. Find the entry matching the name. |
| 27 | If not found: error — "Vault `<name>` is not registered. Run `/bedrock:vaults` to see available vaults." |
| 28 | If found: set `VAULT_PATH` to the entry's `path` value. |
| 29 | |
| 30 | 2. **If no `--vault` flag — CWD detection:** |
| 31 | Read `<base_dir>/../../vaults.json`. Check if the current working directory is inside any registered vault path |
| 32 | (CWD starts with a registered vault's absolute path). If multiple match, use the longest path (most specific). |
| 33 | If found: set `VAULT_PATH` to the matching vault's `path`. |
| 34 | |
| 35 | 3. **If CWD detection fails — default vault:** |
| 36 | From the registry, find the vault with `"default": true`. |
| 37 | If found: set `VAULT_PATH` to the default vault's `path`. |
| 38 | |
| 39 | 4. **If no resolution:** |
| 40 | Error — "No vault resolved. Available vaults:" followed by the registry listing. |
| 41 | "Use `--vault <name>` to specify, or run `/bedrock:setup` to register a vault." |
| 42 | |
| 43 | **Step 3 — Validate vault path:** |
| 44 | ```bash |
| 45 | test -d "<VAULT_PATH>" && echo "exists" || echo "missing" |
| 46 | ``` |
| 47 | If missing: error — "Vault path `<VAULT_PATH>` does not exist on disk. Run `/bedrock:setup` to re-register." |
| 48 | |
| 49 | **Step 4 — Read vault config:** |
| 50 | ```bash |
| 51 | cat <VAULT_PATH>/.bedrock/config.json 2>/dev/null |
| 52 | ``` |
| 53 | Extract `language` and other relevant fields for use in later phases. |
| 54 | |
| 55 | **From this point forward, ALL vault file operations use `<VAULT_PATH>` as the root.** |
| 56 | - Entity directories: `<VAULT_PATH>/actors/`, `<VAULT_PATH>/people/`, etc. |
| 57 | - Graphify output: `<VAULT_PATH>/graphify-out/` |
| 58 | |
| 59 | --- |
| 60 | |
| 61 | ## Overview |
| 62 | |
| 63 | This skill produces a diagnostic report of vault health without modifying any files. |
| 64 | It scans the vault once, runs 5 checks against the scan data, and prints the results. |
| 65 | |
| 66 | **You are a read-only agent.** You do NOT write files, commit, push, invoke other skills, |
| 67 | or spawn subagents. Your only output is the diagnostic report printed to the terminal. |
| 68 | |
| 69 | ### Five health checks |
| 70 | |
| 71 | | # | Check | What it verifies | |
| 72 | |---|---|---| |
| 73 | | 1 | graphify-out | Graph.json exists, is valid, is fresh | |
| 74 | | 2 | Setup | Directories, templates, entity definitions, plugin manifest | |
| 75 | | 3 | Orphan entities | Entities with zero inbound wikilinks | |
| 76 | | 4 | Dangling content | Entities fully disconnected (no inbound, no outbound, no relations) | |
| 77 | | 5 | Old content | Entities with `updated_at` older than 15 days | |
| 78 | |
| 79 | ### Status values |
| 80 | |
| 81 | Each check reports one of: |
| 82 | - **OK** — no issues found |
| 83 | - **WARN** — issues found (with details) |
| 84 | - **MISSING** — prerequisite not met (e.g., graphify-out absent) |
| 85 | |
| 86 | --- |
| 87 | |
| 88 | ## Phase 1 — Scan the Vault |
| 89 | |
| 90 | Read all entity files once and store the data for use across all 5 checks. |
| 91 | |
| 92 | ### 1.1 Enumerate entity files |
| 93 | |
| 94 | For each entity directory (`<VAULT_PATH>/actors/`, `<VAULT_PATH>/people/`, `<VAULT_PATH>/teams/`, `<VAULT_PATH>/concepts/`, `<VAULT_PATH>/topics/`, `<VAULT_PATH>/discussions/`, `<VAULT_PATH>/projects/`, `<VAULT_PATH>/fleeting/`): |
| 95 | |
| 96 | 1. List all `.md` files using Glob, **excluding `_template.md` and `_template_node.md`** |
| 97 | - For actors: include both `<VAULT_PATH>/actors/*.md` (flat) and `<VAULT_PATH>/actors/*/*.md` (folder) |
| 98 | - Include code entities: `<VAULT_PATH>/actors/*/nodes/*.md` |
| 99 | 2. Record the directory and filename for each entity |
| 100 | |
| 101 | ### 1.2 Read entity data |
| 102 | |
| 103 | For each entity file found in 1.1: |
| 104 | |
| 105 | 1. Read the file |
| 106 | 2. Extract from frontmatter: |
| 107 | - `type` |
| 108 | - `name` (or derive from filename) |
| 109 | - `aliases` (array) |
| 110 | - `updated_at` (date string) |
| 111 | - All frontmatter array fields that contain wikilinks (e.g., `actors`, `people`, `teams`, `related_to`, etc.) |
| 112 | 3. Extract from body: |
| 113 | - All wikilinks `[[target]]` (regex: `\[\[([^\]]+)\]\]`) |
| 114 | 4. Compute: |
| 115 | - `outbound_wikilinks`: union of all wikilinks from body + frontmatter arr |