04 Codebase VisualizerSAFE
This repository demonstrates how to use Claude Code to do real engineering work, not just writing code. 本项目是极客时间专栏 《Claude Code 工程化实战》 的官方配套示例仓库,目标就是: 👉 把 Claude Code 从“对话式编码工具”,变成 可设计、可复用、可治理的工程系统。
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
第 8 讲配套项目 —— 脚本进阶模式:可视化输出
核心理念
这个项目演示渐进式披露的极致形态:SKILL.md 只有 10 行指令,全部逻辑封装在 Python 脚本中。
Claude 不需要理解 HTML/CSS/JS 的实现细节(节省 2000+ tokens),只需要知道"运行什么命令"(~10 tokens)。
项目结构
06-codebase-visualizer/ ├── README.md # 本文件 ├── SKILL.md # 平铺展示(方便阅读) ├── scripts/ │ └── visualize.py # 平铺展示(方便阅读) └── .claude/skills/codebase-visualizer/ # 标准 Skill 部署结构 ├── SKILL.md └── scripts/ └── visualize.py
使用方式
直接运行脚本
cd 04-Skills/projects/06-codebase-visualizer python scripts/visualize.py ../../.. # 可视化整个课程仓库
生成 codebase-map.html,用浏览器打开即可看到交互式目录树。
通过 Claude Code 使用
将 .claude/skills/codebase-visualizer/ 复制到你的项目根目录下的 .claude/skills/,然后对 Claude 说:
"帮我可视化一下这个项目的代码结构"
Claude 会自动匹配 codebase-visualizer Skill 并执行脚本。
教学要点
- Token 极致节省:SKILL.md < 10 行,所有复杂逻辑在脚本中
- Skills × Tools 编排:Skill 告诉 Claude "运行什么",脚本负责"怎么运行"
- 可视化输出模式:脚本生成 HTML → 浏览器打开,适用于各种分析场景
- 零依赖:只用 Python 标准库,无需 pip install
f28f37d82954OBSERVED · 2026-10-12Host compatibility
What the documentation claims. We have not run a compatibility test.
| Host | Status | Notes |
|---|---|---|
| claude-code | mentioned |
What it tells the agent
The instruction file, verbatim from the audited commit — this is the text the model reads, and the surface the audit's instruction layer examines. Quoted here so you can judge it without cloning anything.
--- name: codebase-visualizer description: Generate an interactive tree visualization of your codebase. Use when exploring a new repo or understanding project structure. allowed-tools: - Bash(python *) --- Run the visualization script from your project root: ```bash python .claude/skills/codebase-visualizer/scripts/visualize.py . ``` This creates `codebase-map.html` and opens it in your default browser.
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- pinned
- Secrets in source
- none-found
Findings (1)
Gates applied: no_behavioural_pass, no_license.
f28f37d82954full audit observations/trust-audit/skill/huangjia2019__04-codebase-visualizer.json · Report an issue / request a re-scanAudit history
Every audit this skill has had.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-12 | f28f37d82954 | SAFE | B | 89 | first audit |
Questions
What does the 04 Codebase Visualizer skill do?
This repository demonstrates how to use Claude Code to do real engineering work, not just writing code. 本项目是极客时间专栏 《Claude Code 工程化实战》 的官方配套示例仓库,目标就是: 👉 把 Claude Code 从“对话式编码工具”,变成 可设计、可复用、可治理的工程系统。
Is 04 Codebase Visualizer safe to install?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean skill reads B.
What can 04 Codebase Visualizer access on my machine?
The audit observed no filesystem, network or shell use at all in its source.
Which assistants does 04 Codebase Visualizer work with?
Its documentation mentions claude-code. That is what the text claims, not a compatibility test we ran.
How current is this page?
The grade is for one exact copy of the source (f28f37d82954), read on 2026-10-12. The repository is watched, and a new audit runs when it changes — this is the first audit.