add-project

add-project is a command for Claude Code from franciszhangkk/claude-obsidian-multi-repo-tracker. It costs 50 tokens per session (2,225 once invoked), scanned A, original, MIT.

A command that adds a code project to an Obsidian vault, which is a folder of linked notes. It can initialize the vault, analyze the project's structure, create project notes, and write CLAUDE.md with project context.

In plain words
What is it for?
Use /add-project with a project name and repository path to create a tracked project area containing overview, context, progress, architecture, and testing notes.
Why use it?
It removes the need to manually set up project notes and copy basic architecture details when starting work on a repository.

Command for Claude Code

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

Good fit Use /add-project with a project name and repository path to create a tracked project area containing overview, context, progress, architecture, and testing notes.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/franciszhangkk/claude-obsidian-multi-repo-tracker/add-project
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 add-project

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/franciszhangkk/claude-obsidian-multi-repo-tracker/add-project"><img src="https://agentmods.dev/badge/commands/franciszhangkk/claude-obsidian-multi-repo-tracker/add-project.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,225 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.00050 $0.02225
Opus 5 $0.00025 $0.01112
Sonnet 5 $0.00010 $0.00445
Haiku 4.5 $0.00005 $0.00222

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

Security

Grade A, and why

add-project 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/add-project.md · 224 lines

How it starts

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

/add-project — 添加项目到 vault(含代码分析)

用法:/add-project <项目名> <代码仓库路径>

例如:/add-project ai-agents ~/code/ai-agents

这是新建项目时唯一需要调的命令。Vault 不存在会自动初始化,代码结构会自动分析生成架构草稿。

执行流程

1. 解析参数

  • 项目名:用户传的第一个参数。没传则 AskUserQuestion
  • 代码路径:用户传的第二个参数。没传则 AskUserQuestion,给出常见候选:
    • ~/code/<项目名> / ~/go/src/<项目名> / ~/projects/<项目名> / 自定义

校验:

  • 项目名不能含 / 或空格
  • 代码路径必须存在且是目录([ -d "$path" ]

2. 检测 vault,不存在则 inline 初始化

VAULT_PATH="${OBSIDIAN_VAULT_PATH:-}"

情况 A:vault 路径已配置且存在 → 直接继续

情况 B:vault 路径未配置 / 不存在 → 用 AskUserQuestion 问:

未找到 Obsidian vault。选择:
  [1] 指定 vault 路径(已有 vault)
  [2] 新建 vault(我会帮你初始化基础结构)
  [3] 取消

选 2 时:直接执行 /init-vault 的全部流程(步骤 1-7),然后继续当前流程。用户无需退出重来。

3. 找到 skill 模板

SKILL_DIR="$HOME/.claude/skills/claude-obsidian-multi-repo-tracker"
TEMPLATE_DIR="$SKILL_DIR/templates/project"

4. 检查目标项目目录

PROJECT_DIR="$VAULT_PATH/项目/<项目名>"
  • 已存在 → AskUserQuestion:覆盖 / 换名字 / 取消
  • 不存在 → 创建

5. 复制项目模板

复制 templates/project/<vault>/项目/<项目名>/概览.md / activeContext.md / progress.md / 01-架构 ~ 05-测试与调试 各目录

6. 检测语言和依赖

# 语言检测(优先级顺序)
[ -f go.mod ]           → Go,读 go.mod require 取主要依赖
[ -f package.json ]     → Node.js/TypeScript,读 dependencies
[ -f pyproject.toml ]   → Python,读 [tool.poetry.dependencies] 或 [project]
[ -f requirements.txt ] → Python,读前 5 行
[ -f Cargo.toml ]       → Rust,读 [dependencies]
都没有                  → "TODO: 待填写"

7. 扫描代码结构,生成架构草稿

目标:自动填充 概览.md 的"架构速览"和"关键模块",让用户拿到手就有内容可改,而不是空白占位符。

7a. 扫目录树
find "$CODE_ROOT" -maxdepth 3 -type d \
  ! -path "*/.*" \
  ! -path "*/node_modules/*" \
  ! -path "*/__pycache__/*" \
  ! -path "*/vendor/*" \
  | sort
7b. 按语言识别关键模块

Go

# 识别有意义的包目录(含 .go 文件)
find "$CODE_ROOT" -maxdepth 3 -name "*.go" | xargs dirname | sort -u
# 读每个主目录下第一个 .go 文件的 package 注释

重点看:cmd/ biz/ pkg/ internal/ api/ service/ handler/

Python

# 找主文件
ls "$CODE_ROOT"/*.py 2>/dev/null
# 找子包
find "$CODE_ROOT" -name "__init__.py" -maxdepth 3 | xargs dirname

重点看:app.py main.py server.py cli.py

Read the full file on GitHub · 224 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 · 224 lines · 50 tokens per session scan A d79f68774906

Subscribe to this mod's changes

add-project is a command published in the GitHub repository franciszhangkk/claude-obsidian-multi-repo-tracker (2 stars, last pushed 4mo ago), licensed MIT. It adds 50 tokens to every session and 2,225 once invoked, about $0.0003 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.