$npx -y skills add iurykrieger/claude-bedrock --skill syncRe-synchronizes the vault with external sources. In default mode, scans the sources field of all entities, deduplicates URLs, fetches updated content from each source (Confluence, GDocs, GitHub, Markdown), performs incremental diff and delegates writing to /bedrock:preserve. Wi
| 1 | # /bedrock:sync — Vault Synchronization |
| 2 | |
| 3 | ## Plugin Paths |
| 4 | |
| 5 | Entity definitions and templates are in the plugin directory, not in 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 sync. 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 and remove it from the arguments before parsing `--people` or `--github`. |
| 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. Store the resolved vault name as `VAULT_NAME`. |
| 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`. Store its name as `VAULT_NAME`. |
| 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`. Store its name as `VAULT_NAME`. |
| 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`, `git.strategy`, 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 | - Git operations: `git -C <VAULT_PATH> <command>` |
| 58 | - When delegating to `/bedrock:preserve`, pass `--vault <VAULT_NAME>` |
| 59 | |
| 60 | --- |
| 61 | |
| 62 | ## Overview |
| 63 | |
| 64 | This skill synchronizes the vault with external sources. It operates in three modes: |
| 65 | |
| 66 | | Mode | Flag | Description | |
| 67 | |---|---|---| |
| 68 | | **Sources (default)** | _(none)_ | Re-synchronizes entities with a populated `sources` field | |
| 69 | | **People** | `--people` | Scans actor repositories and identifies active contributors | |
| 70 | | **GitHub** | `--github` | Detects activity in repos and correlates PRs with topics/projects | |
| 71 | |
| 72 | --- |
| 73 | |
| 74 | ## Routing |
| 75 | |
| 76 | Analyze the argument passed by the user: |
| 77 | |
| 78 | 1. If argument contains `--people` → go to **Mode: Sync People** (below) |
| 79 | 2. If argument contains `--github` → go to **Mode: Sync GitHub** (below) |
| 80 | 3. Otherwise → go to **Mode: Sync Sources (default)** (below) |
| 81 | |
| 82 | > **Note:** If no argument is passed, or the argument does not contain recognized flags, |
| 83 | > execute the default mode (Sync Sources). |
| 84 | |
| 85 | --- |
| 86 | --- |
| 87 | |
| 88 | |
| 89 | # Mode: Sync Sources (default) |
| 90 | |
| 91 | |
| 92 | |
| 93 | |
| 94 | ## Overview |
| 95 | |
| 96 | This skill scans the `sources` field of all vault entities, deduplicates by URL, |
| 97 | fetches updated content from each external source, compares with existing entities |
| 98 | in the vault (incremental diff), and delegates all changes to `/bedrock:preserve` for centralized writing. |
| 99 | |
| 100 | `/bedrock:sync` **does NOT write entities directly** — all entity writing goes through `/bedrock:preserve`. |
| 101 | After re-sync, `/bedrock:preserve` updates `synced_at` in the `sources` field of affected entities. |
| 102 | |
| 103 | `/bedrock:sync` **does NOT ingest new sources** — for that, use `/bedrock:learn`. |
| 104 | |
| 105 | **You are an execution agent.** Follow the phases below in order, without skipping step |