First 15 minutes
To see the vault and its checks work: do step 0 (git, Python, Obsidian), step 1, open agent/ as a vault (step 2, plugins can wait), then run python agent/scripts/find-orphans.py --check from the repo root.
You end with the linked graph open in Obsidian and a passing orphan check. The time is an estimate. Everything from step 3 on is optional until you want agents writing to the vault.
Prerequisites
| Tool | Why |
|---|---|
| Claude Code (desktop app or CLI) | Runs the agents, the local scheduled tasks and the skills |
| Obsidian | The viewer, plus the plugins that expose the vault to agents |
| git + gh (authenticated) | Transport between machines; routines open and merge PRs with gh |
| Python 3.11+ | The vault scripts (generator, link fixer, gates) |
PowerShell 7 (pwsh) | sync-repos.ps1 and bootstrap-stage0.ps1. Windows PowerShell 5.1 isn't enough |
| Docker Desktop | gitleaks in the pre-commit hook and CI, and the node/npm work the monthly patch routine does |
Clone, then switch on the guards
Clone next to the repos you want to track. The scripts assume every repo lives under one folder, e.g. ~/code/<repo>.
notes/, reports/, repos/), then edit projects/scope.md (step 4). The prompts reference the nitsuah account and paths in a few places, so search for nitsuah and C:\Users\ and replace them with your own.
git clone https://github.com/<you>/stash ~/code/stash
cd ~/code/stash
# pre-commit hook: gitleaks + pii-scan.sh on staged files
git config core.hooksPath .githooks
# keep Obsidian's settings churn out of git (.gitattributes already wires the filter)
git config filter.obsidian-json.clean "python agent/scripts/obsidian-json-clean.py %f"
Open agent/ as a vault and install the plugins
In Obsidian: Open folder as vault → ~/code/stash/agent. The tracked .obsidian/community-plugins.json already lists the plugins, but their binaries are gitignored, so install them once per machine from Settings → Community plugins:
| Plugin | Must-have? | Config |
|---|---|---|
| Local REST API | for MCP | Turn on Enable Non-Encrypted HTTP Server (port 27123, loopback). Copy the API key, but never commit it: it lives in plugins/*/data.json, which is gitignored |
| MCP Tools | for MCP | Serves /mcp/ on the REST API port |
| Templater | yes | Template folder: templates. Use Create new note from template for hand-written notes, so they get an up: parent |
| Front Matter Title | recommended | Graph and tabs show title: instead of the bare file name |
| Smart Connections (+ Lookup, Context) | optional | Builds local embeddings in .smart-env/ (gitignored). Needed only for suggest-links.py |
| Nexus, Excalidraw, Importer | optional | Workspace memory, diagrams, imports |
Start at VAULT-MAP.md. Bookmark it, and open vault-views.base for the live tables.
git check-ignore -v agent/.obsidian/plugins/<id>/data.json. An ignore rule doesn't untrack a file that's already committed. If it was ever committed, run git rm --cached on it.Give Claude the vault as an MCP server optional
For interactive sessions, so you can say "find every note about auth in kryptos" or "add this decision under the vigil hub". Keep the key in an environment variable, not in a file in the repo.
claude mcp add --transport http --scope user obsidian http://127.0.0.1:27123/mcp/ \
--header "Authorization: Bearer $OBSIDIAN_API_KEY"
claude mcp get obsidian # expect: Connected (Obsidian must be running)
It's loopback only, so cloud routines can't use it, and no scheduled routine depends on it: they all read and write the vault as plain files through git. agent/scripts/bootstrap-stage0.ps1 checks the port and starts Obsidian when a local session wants it:
pwsh agent/scripts/bootstrap-stage0.ps1
Write your repo registry
agent/projects/scope.md is the single list every routine reads. Its Tracked table drives the mirrors, the hubs and every per-repo report:
| Repo | Local path | GitHub URL | Org | Visibility |
|---------|---------------------|------------------------------------|------|-------------|
| my-app | `~/code/my-app` | https://github.com/you/my-app | you | public |
| billing | `~/code/billing` | https://github.com/you-org/billing | org | **private** |
- Private repos get a summary hub, never a doc mirror. Mark them before the next sync.
- Renamed a repo? Write "formerly
old-name" in the row. The generator adds aliases so old links keep resolving. - Forks and utility repos go in the Not tracked table, so routines skip them deliberately rather than by omission.
First manual run
Run the pipeline by hand once before scheduling anything, and read every diff.
cd ~/code/stash/agent
# 1. mirror merged docs of public repos (dry run first)
pwsh scripts/sync-repos.ps1 -DryRun
pwsh scripts/sync-repos.ps1 -Prune
# 2. link everything, fix links, verify the graph
python scripts/build-vault-indexes.py
python scripts/fix-doc-links.py --vault --write
python scripts/find-orphans.py --check # 0 orphans, 0 duplicate names
# 3. the same checks CI runs
bash scripts/pii-scan.sh
Commit on a branch, open a PR, and let CI (PII scan, gitleaks, vault graph check, ruff, PSScriptAnalyzer) go green. That's the same path every routine takes.
reports/<kind>-<repo>-<date>.md, notes/<YYYY-MM-DD>.md or projects/<Folder>/<doc>.md and the generator places it. Anything else gets up: "[[parent]]". The full table is in the vault README.Turn prompts into Claude skills optional
The specs in agent/prompts/ work as plain system prompts. Wrapping them as skills lets you call them by name (/pmo) or lets Claude pick them up when a request matches the description. A skill is a folder containing SKILL.md:
| Scope | Location | Use for |
|---|---|---|
| Personal | ~/.claude/skills/<name>/SKILL.md | Your own workflows, on every project |
| Project | <repo>/.claude/skills/<name>/SKILL.md | Committed with the repo, so everyone who clones it gets it. vigil and ats-fill ship theirs this way (skills/<name>/SKILL.md) |
| Plugin | a plugin marketplace | Bundling skills, agents, hooks and MCP servers to share with a team |
The pattern used here: keep the skill thin and point it at the versioned spec. The behaviour then lives in one reviewed file, and the skill, the scheduled task and the cloud routine all run the same thing.
---
name: pmo
description: Monthly portfolio audit. Use when asked to "run the PMO audit",
"audit my repos", or "update ROADMAP/TASKS across repos".
---
Read `~/code/stash/agent/prompts/PMO.md` in full and follow it exactly. It is the
canonical spec and wins over anything below. If it's missing, stop and say so.
Hard rules:
- The repo list is the Tracked table in `agent/projects/scope.md`. Don't hardcode one.
- stash is PUBLIC. Reports may contain counts, statuses, PR titles and public IDs only.
- Work on a branch and open a PR. Never push to main.
Good first skills to wrap:
/pmo
Audit repos, update ROADMAP/TASKS, fix doc links upstream.
/deliver
Runs the PMO → OPS → ENG → QA loop on one repo's next TASKS item, branch to PR.
/mini
Small, well-scoped tasks for a cheaper model.
/tire-kick
Evaluate a tool or library, or patch the vuln queue in Docker.
/loc
Lines-of-code report for a repo, chained into its hub.
/sotu
Weekly state of the union across every repo's TASKS.md.
Write the description as a list of trigger phrases. That's what Claude matches against when deciding to load a skill. To see what's loaded, ask Claude to list its skills, or type / in a session.
mcp__vigil__* tools, and its first step is to check the connection and tell you how to add it if it's missing. Copy that pattern: a skill that guesses when a tool is missing is worse than one that stops.Schedule them: local tasks and cloud routines optional
Pick the fleet by what the job needs to touch:
Needs your machine
Local clones, Docker, private repos, the Obsidian app, anything that must not leave the box. Runs while the machine is awake and the Claude desktop app is open, so a missed run needs a catch-up (here, ops-catchup reschedules them). Lives in ~/.claude/scheduled-tasks/<name>/SKILL.md.
Only needs GitHub
Runs on schedule with your machine off. Clones main fresh, so it only sees merged work. Create one at claude.ai/code/routines or with /schedule in Claude Code.
Local scheduled task. Same thin-wrapper shape as a skill. Ask Claude in the desktop app to "create a scheduled task that runs every day at 7am…", or write the file yourself:
---
name: daily-repo-sync
description: Daily git-pull sweep, doc mirror, repo hubs and daily note, per stash/agent/prompts/DAILY.md
---
You are running the daily repo-sync routine. Read `~/code/stash/agent/prompts/DAILY.md`
first; it is the canonical spec and wins over anything below.
- Never force, stash, switch branches or discard local work. A dirty or diverged repo
is SKIPPED and logged.
- Logs go to agent/logs/*.log (gitignored). Commit only by exact path onto
obn/daily-note-<date>, then open the PR.
- End with a one-paragraph summary.
Cloud routine. The prompt has to bootstrap itself, because there's no local state:
Sync stash: git clone -q https://github.com/<you>/stash ~/stash || true
cd ~/stash && git fetch -q origin main && git checkout -q -B main origin/main
Repo list: the Tracked table in agent/projects/scope.md (GitHub URL column).
Write ONLY: agent/reports/cloud/<routine>/<routine>-<date>.md
on a cloud-report/<routine>-<date> branch, then open a PR.
stash is PUBLIC: the report may contain counts, statuses and public advisory IDs only.
No sub-agents, no sleep loops; on a rate-limit error, stop.
Keep a public-safe copy of every routine so a machine rebuild or an accidental delete costs nothing:
python agent/scripts/export-routines.py # local tasks → agent/routines/
python agent/scripts/export-routines.py --check # exit 1 if a backup is stale
pii-scan.sh and the pre-commit hook · let a routine auto-merge only what check-generated-diff.py calls routine-owned · add a usage preflight to heavy routines so they print DEFERRED: instead of failing halfway.
Add another machine optional
Git carries the brain; each machine needs only its own setup:
git clone https://github.com/<you>/stash ~/code/stash
git -C ~/code/stash config core.hooksPath .githooks
git -C ~/code/stash config filter.obsidian-json.clean "python agent/scripts/obsidian-json-clean.py %f"
# Obsidian: open ~/code/stash/agent, reinstall the community plugins, new REST API key
# Claude: claude mcp add ... obsidian (step 3) · copy your personal ~/.claude/skills/
# Routines: only on the machine that owns them; restore from agent/routines/ backups
- Run local routines on one machine only. DAILY checks whether today's note already exists on
mainor in an open PR, so a second machine won't write a duplicate, but one owner per routine keeps the logs readable. - Other machines just
git pull. The graph, hubs, reports and Bases views are identical, because they're all files. - Embeddings (
.smart-env/) and plugin keys are per machine and never synced.
Done when
| ☐ | git config core.hooksPath prints .githooks, and committing a fake email in a report is blocked |
| ☐ | Opening Obsidian leaves git status clean |
| ☐ | claude mcp get obsidian says Connected |
| ☐ | find-orphans.py --check passes and VAULT-MAP lists every repo in scope.md |
| ☐ | No private repo has a folder under agent/repos/ |
| ☐ | One skill runs by name and one routine has opened a green PR |
| ☐ | export-routines.py --check exits 0 |