archview

archview is a skill for Claude Code, Codex from LZZLHY/archview. It costs 55 tokens per session (7,194 once invoked), scanned A, original, MIT.

A skill that writes plain-language architectural summaries for code nodes in a workspace. A code node is a source-code part shown in ArchView, while the graph structure comes from automatic code analysis.

In plain words
What is it for?
Adding summaries and tags to workspace modules and other code nodes, including stale-only, limited, and preview-only updates.
Why use it?
It makes an architecture panel easier to understand than a display containing only file names, while leaving the detected structure unchanged.

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/lzzlhy/archview/skill
Any agent
npx skills add LZZLHY/archview --skill skill
Clone the repo
git clone --depth 1 https://github.com/LZZLHY/archview

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 archview

README.md
[![agentmods](https://agentmods.dev/badge/skills/lzzlhy/archview/skill.svg)](https://agentmods.dev/skills/lzzlhy/archview/skill)
Your own site
<a href="https://agentmods.dev/skills/lzzlhy/archview/skill"><img src="https://agentmods.dev/badge/skills/lzzlhy/archview/skill.svg" alt="Measured on agentmods" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,194 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.00055 $0.07194
Opus 5 $0.00028 $0.03597
Sonnet 5 $0.00011 $0.01439
Haiku 4.5 $0.00006 $0.00719

Measured 2d ago against content hash 00408a7967c2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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

The scan reads SKILL.md. This mod also ships 10 executable files (scripts/pack.mjs, src/assets.ts, src/bin/skill.ts, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

packages/skill/SKILL.md · 436 lines

How it starts

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

/archview

给指定工作区的代码节点写语义摘要,让 ArchView 面板从「一堆文件名」变成「能看懂的架构」。

这份提示词的结构参照 Understand-Anything 的 skills/understand/SKILL.md (MIT,见仓库 NOTICE),流程换成 ArchView 的。

和 UA 最根本的一处不同:UA 让 LLM 同时挖结构又写语义,所以它需要一堆修补脚本 擦屁股(规范化 ID、丢悬空边、翻转方向搞反的边)。ArchView 里结构是 CodeGraph 给的 确定性事实,你只写语义。因此本流程里没有任何一步让你产出节点或边 —— 如果你发现自己在写 JSON 里的 source/target/type,你已经跑偏了。

选项

$ARGUMENTS 可以包含:

  • 一个目录路径 —— 目标工作区根(默认当前工作目录)
  • --module <key> —— 只处理这一个模块(模块 key 见 AGENT-GUIDE.md 的模块表)
  • --stale-only —— 只重写 hash 失配的过期摘要,不碰缺失项
  • --limit <n> —— 本轮最多写 n 条(大工作区分批推进用)
  • --dry-run —— 只报告要写哪些节点,不落盘

铁律(读完再动手)

铁律 1 —— 你永远不写拓扑

节点和边只能由 CodeGraph 的 tree-sitter 输出派生。你能提供的字段只有两个: summarytags

具体禁止:

  • 绝不允许手写、修改、"修正" <workspace>/.archview/graph.json。它是派生物, 重建会整份重写。你的编辑不但会消失,在消失之前还会让面板显示假架构。
  • 不要动 .archview/meta.json.archview/briefs/ —— 同样是派生物。
  • 不要在摘要里把推断出来的 import / 调用 / 继承当事实写。这些关系简报里已经有了 (importsFrom / importedBy / renders / renderedBy),直接引用。
  • 发现拓扑不对(缺边、方向反、模块归属错),报告它,不要动手改图。 那是 builder 或 deriver 的 bug,改图只会掩盖它。

铁律 2 —— 每个节点的 summary 必须非空

没有 LLM 摘要时系统会填确定性兜底句(<名字> —— <路径> 中的 <kind>)。 那不是摘要,它只是为了不让校验器报警。简报里 summarySource 不是 "llm" 的每一条都是你的活(真实取值见阶段 2 那张表)。

铁律 3 —— 摘要的 key 必须是简报里的 nodeId 原文

节点 ID 方案是冻结的,摘要文件用它做 key。拼错的 key 不会报错,只会静默变成 孤儿摘要,在重建时被丢掉。复制,不要重新拼装。


进度汇报

每个阶段开始时打一行状态,写完一批报一次。工作区大的时候这一步不是礼貌,是让人知道 你还在动。

[阶段 N/6] <阶段名>…

例:[阶段 3/6] 写 entry 模块的摘要(83 个文件节点,缺 12 条)…


阶段 0 —— 摸清现场

  1. 确定 WORKSPACE$ARGUMENTS 里第一个不以 -- 开头的参数就是它;没有就用当前 工作目录。确认 <WORKSPACE>/.archview/ 存在。

  2. <WORKSPACE>/.archview/AGENT-GUIDE.md。这是唯一的必读文件。

    它是生成物,装着这个工作区此刻的实况:项目名与描述、模块清单(各自文件数)、 检测到的语言、摘要覆盖率、具体缺哪些节点、简报文件的确切路径、该读哪几份语言/ 框架指导、输出格式、MCP 配置片段、自检清单。

    • 文件不存在时,在 ArchView 仓库目录里跑 pnpm exec archview-skill guide --workspace <WORKSPACE> --write (或 node <仓库>/archview/packages/skill/dist/bin/skill.js guide --workspace <WORKSPACE> --write)生成。 不要用 npx archview-skill —— 这个包还没发布到 npm,npx 会去 registry 找它然后失败; 裸命令 archview-skill 也不在 PATH 里。跑不了就退回读 <WORKSPACE>/.archview/briefs/ 自己判断(信息少一些,但够干活)。
    • 文件在,但里面的数字看着与 .archview/ 的现状矛盾(比如它说缺 40 条、而 summaries 里已经有了),说明它是旧的:重新生成一次,别拿旧数字干活。

Read the full file on GitHub · 436 lines

Files

What ships with it

60 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2d ago First seen · 436 lines · 55 tokens per session scan A 00408a7967c2

Subscribe to this mod's changes

archview is a skill published in the GitHub repository LZZLHY/archview (0 stars, last pushed 10d ago), licensed MIT. It adds 55 tokens to every session and 7,194 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.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens

chat-perf

Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.

microsoft/vscode · 51 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens