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.
npx agentmods add commands/wei63w/pm-manager/archgit clone --depth 1 https://github.com/wei63w/pm-managerWhat 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 | $0.00017 | $0.00930 |
| Opus 5 | $0.00009 | $0.00465 |
| Sonnet 5 | $0.00003 | $0.00186 |
| Haiku 4.5 | $0.00002 | $0.00093 |
Grade A, and why
arch 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 2d 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.
This is a copy
100% identical to pm-arch — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 56 lines — stays where its author put it; the contents beside it link to each section on GitHub.
User Input
$ARGUMENTS
Outline
- Require
.pm/initialized; else recommend/pm-init. - 若已有
map.json,先读它。定位文件用pm map <关键词>,禁止无过滤全库递归。 - Run
pm archfrom the project root (preferred). This writes:.pm/architecture/map.json— 导航地图(modules / key_files / capabilities / hotspots / lookup).pm/architecture/tree.md— 带注解目录树.pm/architecture/overview.md— 中文总览 + Mermaid.pm/architecture/layer.mmd— 分层架构.pm/architecture/system-context.mmd/service-dependencies.mmd/request-flow.mmd/deploy-flow.mmd.pm/architecture/scan.json
- If a valid
map.jsonalready exists and nothing changed, CLI reuses the map (timestamp only). Skipnode_modules, build, logs, andscan.exclude_dirs. - If CLI is unavailable, generate the same files yourself by scanning (still skip ignore dirs; isolate per-file read failures). If the repo is Vue (
vue/nuxtin package.json deps): include.vuefiles; draw Browser → Vue Router → Page → Component → API (not API Gateway); layer by pages/views, components, composables/stores, api. Non-Vue repos keep the existing heuristics. - Review diagrams: fix wrong edges, rename nodes, add missing externals. Prefer editing the
.mmdfiles then refreshing the Mermaid blocks inoverview.md. - Optional charter compare: mark out-of-scope services or missing in-scope capabilities in
architecture/findings.md(with confidence) only if charter is approved. - Default: write only under
.pm/architecture/. If the user asks to land diagrams in the application tree, show the draft and wait for confirm. - Closing:
_closing.md完整档;只列已生成的架构文件。中文摘要。
Done When
-
map.jsonhas path-basedkey_filesand non-empty module paths;layer.mmdexists - Diagrams reflect this repo (not generic placeholders)
- Ignore dirs were skipped; no secrets in diagram labels or findings
Shared Workflow (all /pm-* commands)
Follow this order when the command mutates .pm/ state:
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.
- 2d ago First seen · 56 lines · 17 tokens per session scan A 4834c881de17
arch is a command published in the GitHub repository wei63w/pm-manager (96 stars, last pushed 2d ago), licensed MIT. It adds 17 tokens to every session and 930 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to pm-arch, differing in 0 lines, and is treated as a copy.
Other commands, from other repositories
webperf
Run a web performance audit via the web-performance-auditor persona.
spec
Start spec-driven development — write a structured specification before writing code.
install
Add skills from GitHub repos, git URLs, or local paths.
audit-rules
Browse, enable, disable, and customize audit rules.
search
Discover and install skills from GitHub repositories.
index
Complete reference for all skillshare commands.