pm-arch

pm-arch is a skill for Claude Code, Codex 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 CodeCodex

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.

agentmods
npx agentmods add skills/wei63w/pm-manager/pm-arch
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, Codex.

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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.00010 $0.00950
Opus 5 $0.00005 $0.00475
Sonnet 5 $0.00002 $0.00190
Haiku 4.5 $0.00001 $0.00095

Measured 5d ago against content hash 79a32414b6c4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 5d 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. 5d 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 (99 stars, last pushed 5d ago), licensed MIT. It adds 10 tokens to every session and 950 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-30.

Related

Other skills, from other repositories

test-driven-development

Drives development with tests. Use when implementing any logic, fixing any bug, or changing any behavior. Use when you need to prove that code works, when a bug report arrives, or when you're about to modify existing functionality.

addyosmani/agent-skills · 50 tokens

documentation-and-adrs

Records decisions and documentation. Use when making architectural decisions, changing public APIs, shipping features, or when you need to record context that future engineers and agents will need to understand the codebase.

addyosmani/agent-skills · 43 tokens

idea-refine

Refines raw ideas into sharp, actionable concepts through structured divergent and convergent thinking. Use when an idea is still vague, when you need to stress-test assumptions before committing to a plan, or when you want to expand options before converging on one. Triggers on "ideate", "refine this idea", or…

addyosmani/agent-skills · 75 tokens

chinese-documentation

中文文档排版参考——中英文空格、全半角标点、术语保留、链接格式、中文文案排版指北约定。仅在用户显式 /chinese-documentation 时调用,不要根据上下文自动触发。.

jnMetaCode/superpowers-zh · 62 tokens

skillshare-implement-feature

Implement a feature from a spec file or description using TDD workflow. Use this skill whenever the user asks to: add a new CLI command, implement a feature from a spec, build new functionality, add a flag, create a new internal package, or write Go code for skillshare. This skill enforces test-first development…

runkids/skillshare · 114 tokens

skillshare-update-docs

Update website docs to match recent code changes, cross-validating every flag against source. Use this skill whenever the user asks to: update documentation, sync docs with code, document a new flag or command, fix stale docs, or update the README. This skill covers all website/docs/ categories (commands, reference…

runkids/skillshare · 123 tokens