pm-arch

pm-arch is a skill for Claude Code from wei63w/pm-manager. It costs 10 tokens per session (950 once invoked), scanned A, original, MIT.

A project-management command that scans a codebase and creates architecture maps, directory notes, and Mermaid diagrams. Mermaid is a text format for drawing diagrams such as system layouts and request flows.

In plain words
What is it for?
Use it to map an initialized project, document its layers and services, and create diagrams for system context, dependencies, requests, and deployment.
Why use it?
It gives developers a structured view of a project's modules, important files, capabilities, and dependencies when the codebase is difficult to navigate.

Skill for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Good fit Use it to map an initialized project, document its layers and services, and create diagrams for system context, dependencies, requests, and deployment.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/wei63w/pm-manager/pm-arch
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.

Any agent
npx skills add wei63w/pm-manager --skill pm-arch
Clone the repo
git clone --depth 1 https://github.com/wei63w/pm-manager

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 pm-arch

README.md
[![agentmods](https://agentmods.dev/badge/skills/wei63w/pm-manager/pm-arch/github.svg)](https://agentmods.dev/skills/wei63w/pm-manager/pm-arch)
Your own site
<a href="https://agentmods.dev/skills/wei63w/pm-manager/pm-arch"><img src="https://agentmods.dev/badge/skills/wei63w/pm-manager/pm-arch/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 pm-arch

Your own site · 80×15
<a href="https://agentmods.dev/skills/wei63w/pm-manager/pm-arch"><img src="https://agentmods.dev/badge/skills/wei63w/pm-manager/pm-arch.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 10 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 950 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Prompt Injection · line 6
    Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
    Fix: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.
How audits are shown
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.00010 $0.00950
Opus 5.5 $0.00004 $0.00380
Sonnet 5.5 $0.00002 $0.00190
Haiku 4.5 $0.00001 $0.00095

Measured 1mo ago against content hash 79a32414b6c4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

pm-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 1mo 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.

adapters/cursor/skills/pm-arch/SKILL.md · 61 lines

How it starts

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

--- description: Scan project structure and generate Mermaid architecture diagrams + flowcharts under .pm/architecture/. handoffs:

  • label: Status agent: pm.status prompt: Summarize after architecture scan send: true

User Input

$ARGUMENTS

Outline

  1. Require .pm/ initialized; else recommend /pm-init.
  2. 若已有 map.json,先读它。定位文件用 pm map <关键词>,禁止无过滤全库递归。
  3. Run pm arch from 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
  4. If a valid map.json already exists and nothing changed, CLI reuses the map (timestamp only). Skip node_modules, build, logs, and scan.exclude_dirs.
  5. 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/nuxt in package.json deps): include .vue files; 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.
  6. Review diagrams: fix wrong edges, rename nodes, add missing externals. Prefer editing the .mmd files then refreshing the Mermaid blocks in overview.md.
  7. Optional charter compare: mark out-of-scope services or missing in-scope capabilities in architecture/findings.md (with confidence) only if charter is approved.
  8. Default: write only under .pm/architecture/. If the user asks to land diagrams in the application tree, show the draft and wait for confirm.
  9. Closing: _closing.md 完整档;只列已生成的架构文件。中文摘要。

Done When

  • map.json has path-based key_files and non-empty module paths; layer.mmd exists
  • Diagrams reflect this repo (not generic placeholders)
  • Ignore dirs were skipped; no secrets in diagram labels or findings

Read the full file on GitHub · 61 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. 1mo ago First seen · 61 lines · 10 tokens per session scan A 79a32414b6c4

Subscribe to this mod's changes

pm-arch is a skill published in the GitHub repository wei63w/pm-manager (87 stars, last pushed 1mo ago), licensed MIT. It adds 10 tokens to every session and 950 once invoked, about $0.0000 per session on Opus 5.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-30.