Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/franciszhangkk/claude-obsidian-multi-repo-trackerWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/franciszhangkk/claude-obsidian-multi-repo-tracker/sync-docs)<a href="https://agentmods.dev/commands/franciszhangkk/claude-obsidian-multi-repo-tracker/sync-docs"><img src="https://agentmods.dev/badge/commands/franciszhangkk/claude-obsidian-multi-repo-tracker/sync-docs/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/franciszhangkk/claude-obsidian-multi-repo-tracker/sync-docs"><img src="https://agentmods.dev/badge/commands/franciszhangkk/claude-obsidian-multi-repo-tracker/sync-docs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00034 | $0.01714 |
| Opus 5 | $0.00017 | $0.00857 |
| Sonnet 5 | $0.00007 | $0.00343 |
| Haiku 4.5 | $0.00003 | $0.00171 |
Grade B, and why
sync-docs scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
- 在 ~/.claude/settings.json 的 env 里设置 OBSIDIAN_VAULT_PATH,或 How it starts
The opening of the file, as written. The whole thing — 134 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/sync-docs — 项目文档同步
把当前 git 仓库的最近变更同步到对应 Obsidian 项目的 activeContext.md,并刷新 首页.md 的项目活跃状态。
执行流程
1. 解析 vault 路径
按优先级取:
-
命令参数
$ARGUMENTS(如/sync-docs ~/Documents/MyVault) -
环境变量
$OBSIDIAN_VAULT_PATH -
都没有 → 报错并提示用户配置:
未找到 Obsidian vault。请: - 在 ~/.claude/settings.json 的 env 里设置 OBSIDIAN_VAULT_PATH,或 - 直接传参:/sync-docs <vault 路径>不要随便猜默认路径。
2. 匹配当前项目
git rev-parse --show-toplevel # CODE_ROOT
读取 $VAULT_PATH/CLAUDE.md,解析"项目 ↔ 代码仓库映射"表(markdown 表格),找到 代码路径 列等于 CODE_ROOT(或 CODE_ROOT 是其前缀展开)的那一行,取出 Obsidian 路径(形如 项目/<name>/)。
匹配不到就用 AskUserQuestion 让用户从已存在的项目列表里选,或者提示用 /add-project 先注册。
3. 收集最近一次提交
git log -1 --format="%h|%s|%ai|%an"
git diff HEAD~1 --name-only
如果是首次提交(没有 HEAD~1),用 git show --name-only HEAD 取文件列表。
4. 检测架构变更
把变更文件名跟以下模式做匹配(语言无关,覆盖大多数项目):
*.proto*_proto.***/architecture/***/arch/***/middleware/*- 项目根的
MakefileDockerfilego.modpackage.jsonpyproject.tomlCargo.tomlpom.xml **/SKILL.md.claude/skills/**config*.yamlconfig*.yml
命中任何一个就标记 arch_changed=true。
5. 更新 Obsidian activeContext.md
打开 $VAULT_PATH/<obsidian_project_path>/activeContext.md,在 ## 最近改了什么(最近 1-2 次会话) 区域顶部插入一行:
- <YYYY-MM-DD> `<short_sha>` <commit_message>
规则:
- 该区域只保留最新 5 条,更早的删掉
- 如果最新 sha 已存在,跳过(防重复)
- 如果区域不存在,提示用户文件结构异常,让其检查模板
6. 更新首页项目活跃状态
打开 $VAULT_PATH/首页.md,找到"项目列表"表格里 obsidian 路径匹配当前项目的那一行,把"状态"列更新为:
进行中(YYYY-MM-DD)
只动这一个 cell,不要改其他列。如果该列原本是「维护中」「已暂停」等用户手填状态,跳过更新(人工设置优先)—— 仅当原值是「进行中」或为空时才覆盖。
7. 检查 CLAUDE.md 是否有需要迁移的旧结构
v0.5 以后,"最近变更"由 activeContext.md 承载,CLAUDE.md 不再有此段。
- 如果
$CODE_ROOT/CLAUDE.md仍包含## 最近变更段 → 输出提醒:
并继续向旧⚠️ 检测到旧版 CLAUDE.md 结构(含"最近变更"段)。 建议用 /update-memory 迁移到 v0.5 新骨架,将"最近变更"移到 activeContext.md。 本次 /sync-docs 仍会更新该段,但后续请迁移。## 最近变更写入(向下兼容,防已有文件断更) - 如果没有
## 最近变更段(已是 v0.5 结构)→ 跳过,什么都不写
8. 刷新 CLAUDE.md 的"Obsidian 文档地图"段
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 12d ago First seen · 134 lines · 34 tokens per session scan B 64e92dd59147
sync-docs is a command published in the GitHub repository franciszhangkk/claude-obsidian-multi-repo-tracker (2 stars, last pushed 4mo ago), licensed MIT. It adds 34 tokens to every session and 1,714 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
update-github
Commit changes with Conventional Commits format and push to GitHub remote repository.
quick-commit
A quick Git command for committing and pushing a small code change. Git is the tool that records code versions and sends them to a shared repository.
git
The pre-finish status: branch, hygiene findings, message checks, workflow lint, template state.
fest-commit
Commit changes with festival traceability metadata.
session-report
Capture what changed this session and why, scoped to the current branch. Read by ship verbs when synthesizing the commit message; deleted after a successful commit.
commit
Stage, commit, and optionally ship further. Pass an escalation token (push, pr, merge, squash, squash merge) to skip the prompt. With no token, commits then asks how far to ship. Delegates message format to the atomic-git-discipline skill.