pull

pull is a command for Claude Code from franciszhangkk/claude-obsidian-multi-repo-tracker. It costs 25 tokens per session (1,053 once invoked), scanned A, original, MIT.

A Git pull command that downloads remote changes, checks for conflicts, reviews new commits, and updates related project notes in an Obsidian vault. Obsidian is a note-taking app that stores plain-text Markdown files.

In plain words
What is it for?
Use it to pull the latest branch changes, inspect what arrived, and add those changes to the project’s Obsidian tracking notes.
Why use it?
It brings code and project documentation up to date together, while stopping before risky merges or conflict-heavy pulls.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

Good fit Use it to pull the latest branch changes, inspect what arrived, and add those changes to the project’s Obsidian tracking notes.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/franciszhangkk/claude-obsidian-multi-repo-tracker/pull
Install

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.

Clone the repo
git clone --depth 1 https://github.com/franciszhangkk/claude-obsidian-multi-repo-tracker

Made for: Claude Code.

Wrote 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.

agentmods badge for pull

README.md
[![agentmods](https://agentmods.dev/badge/commands/franciszhangkk/claude-obsidian-multi-repo-tracker/pull/github.svg)](https://agentmods.dev/commands/franciszhangkk/claude-obsidian-multi-repo-tracker/pull)
Your own site
<a href="https://agentmods.dev/commands/franciszhangkk/claude-obsidian-multi-repo-tracker/pull"><img src="https://agentmods.dev/badge/commands/franciszhangkk/claude-obsidian-multi-repo-tracker/pull/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.

agentmods 80×15 button for pull

Your own site · 80×15
<a href="https://agentmods.dev/commands/franciszhangkk/claude-obsidian-multi-repo-tracker/pull"><img src="https://agentmods.dev/badge/commands/franciszhangkk/claude-obsidian-multi-repo-tracker/pull.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,053 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00025 $0.01053
Opus 5 $0.00013 $0.00526
Sonnet 5 $0.00005 $0.00211
Haiku 4.5 $0.00003 $0.00105

Measured 11d ago against content hash ed8343ddfa11, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

pull scanned grade A with 0 findings 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 11d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/pull.md · 110 lines

How it starts

The opening of the file, as written. The whole thing — 110 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/pull — 智能拉取 + 文档同步

封装 git pull,拉取后分析新提交、调用 sync-docs 把所有新增提交批量同步到 Obsidian。

执行流程

1. 检查工作区干净

git status --short

如果有未提交的改动,停下来用 AskUserQuestion 问用户:

  • 暂存(git stash)后再 pull
  • 取消,让用户先 commit
  • 强制继续(不推荐,会触发 merge 冲突)

2. 记录拉取前位置

BEFORE_SHA=$(git rev-parse HEAD)
BRANCH=$(git branch --show-current)

3. 执行 pull

git pull --ff-only origin "$BRANCH" 2>&1

优先用 --ff-only 避免意外的 merge commit。如果失败(远端有不能 fast-forward 的提交),停下来报告:

⚠️ 远端有分叉提交,无法 fast-forward。
   选择:
   1. git pull --rebase origin <branch>(保持线性历史)
   2. git pull --no-ff origin <branch>(保留 merge commit)
   3. 取消,手工解决

用 AskUserQuestion 让用户选。

如果有冲突,报告冲突文件并停止,不做文档同步

4. 检查是否有更新

AFTER_SHA=$(git rev-parse HEAD)

如果 BEFORE_SHA == AFTER_SHA,输出"已是最新,无新提交"并退出。

5. 分析新增提交

git log --no-merges --reverse --format="%h|%s|%ai|%an" "$BEFORE_SHA..$AFTER_SHA"
git diff --name-only "$BEFORE_SHA..$AFTER_SHA"

--no-merges 跳过 merge commit,只记真实改动。

6. 检测架构变更

复用 sync-docs 第 4 步的文件模式匹配规则。命中任意一个就标记 arch_changed=true

7. 批量同步到 Obsidian

调用 sync-docs 的核心逻辑,但有两点不同:

  • 批量插入:把 BEFORE_SHA..AFTER_SHA 之间的所有非 merge 提交一次性写入 activeContext.md 的"最近改了什么",每条加 (pull) 后缀区分来源:

    - 2026-04-19 `a3f5c1d` 修复订单状态机的并发问题 (pull)
    
  • 裁剪:保留最新 5 条

  • 超过 5 条提示:如果新增提交数 > 5,只插入最近 5 条,输出附带提示:

    本次 pull 共 N 条提交,仅记录最新 5 条到 activeContext。
    完整列表见 git log。
    

8. 更新首页项目状态

sync-docs 第 6 步一样,把首页表格里当前项目的"状态"列刷成 进行中(YYYY-MM-DD)

9. 输出报告

✅ git pull 完成
   <BEFORE_SHA> → <AFTER_SHA>
   分支:<branch>
   新增提交:N 条(已同步最新 5 条到 activeContext)
   
✅ 文档已同步:<obsidian_project_path>
   ⚠️ 检测到架构变更:<file1>, <file2>
      建议手动检查 01-架构/ 文档

注意事项

  • 不要在 pull 失败时同步文档:冲突 / 网络问题 / fast-forward 失败都要停下来报告,不要带着脏状态去更新 vault
  • 跨仓库联动:pull 拉到了上游共享库(如 proto 仓库)的变更时,提示用户去下游项目的 activeContext.md 加"上游已变更,待联动验证"条
  • stash 恢复:如果第 1 步用了 git stash,pull 完成后自动 git stash pop,并在输出里说明

Read the full file on GitHub · 110 lines

Changes

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.

  1. 11d ago First seen · 110 lines · 25 tokens per session scan A ed8343ddfa11

Subscribe to this mod's changes

pull is a command published in the GitHub repository franciszhangkk/claude-obsidian-multi-repo-tracker (2 stars, last pushed 4mo ago), licensed MIT. It adds 25 tokens to every session and 1,053 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.