visualize-repo
它能做什么
这项技能为代码仓库搭建本地可视化文档层。它把代码的某些部分,例如 API、组件和数据模型,转化为保存在版本控制中的可视化文档。适合希望为代码保留持久可视化文档的团队。
适用场景
- ✓当你想为代码仓库中的 API、组件或数据模型制作可视化文档的时候。
- ✓当团队希望在编码智能体做出修改之前,对仓库文档发表评论的时候。
- ✓当你希望一个由版本控制管理文件的可视化仓库查看器的时候。
技能链接
https://github.com/BuilderIO/agent-native/blob/main/.agents/plugins/agent-native-visual-plans/skills/visualize-repo/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“你能为我的代码仓库搭建一个可视化文档视图,让我的团队可以浏览主要的 API 和组件吗?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体在代码仓库中运行一条命令,创建一组入门的可视化文档文件,并在本地查看器中打开它们。源文件仍保存在项目中。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Visualize Repo
/visualize-repo opens a local, source-controlled visual documentation layer
for a repository. It is for durable repo understanding, not a one-off plan:
components can have wireframes, APIs can have specs, models can have schema
views, and reviewers can comment on those docs before sending work to a coding
agent.
Default Command
Run the Agent-Native CLI from the repo root:
npx @agent-native/core@latest visualize-repo --open
Useful variants:
npx @agent-native/core@latest visualize-repo init
npx @agent-native/core@latest visualize-repo --target actions --target server/db/schema.ts
npx @agent-native/core@latest visualize-repo check
npx @agent-native/core@latest visualize-repo verify
npx @agent-native/core@latest visualize-repo --no-open
The command writes or updates agent-native.json with an
apps.visualize-repo local-files section, creates a starter MDX folder at
.agent-native/visual-docs/repo-overview, then serves it through the Plan
local bridge. The hosted Plan UI can render the review surface, but the plan
source stays in local files and bridge comments stay in comments.json.
When There Is No Manifest
If agent-native.json does not exist, let the CLI bootstrap one. It scans for
high-value starting points such as actions/, app/components/,
app/pages/, server/db/schema.ts, src/, packages/, templates/,
docs/, and content/. Keep the first run targeted. Prefer 5-20 visualized
nodes over a generated wall of repo prose.
Use explicit targets when the user already knows the important surface:
npx @agent-native/core@latest visualize-repo \
--target actions/webhooks.ts \
--target server/db/schema.ts \
--target app/components/PromptComposer.tsx
Agent Workflow
- Inspect
agent-native.jsonand the generatedplan.mdx. - Read the source anchors listed for each target before changing the visual docs.
- Add only the visual blocks that earn their keep:
api-endpointfor stable APIs,data-modelfor durable schema,wireframefor user-facing components/flows,diagramfor architecture, andannotated-codefor load-bearing implementation. - Run
npx @agent-native/core@latest visualize-repo checkafter editing MDX. - Use
verifybefore handoff when renderer correctness matters.
When acting on comments, treat local comments.json as the feedback inbox.
Agent-targeted comments should become code changes plus matching MDX updates so
the visual docs and executable code stay in sync.
Privacy Boundary
visualize-repo check is local/offline lint. visualize-repo --open starts a
localhost bridge and opens the Plan UI against local files; it does not publish
the plan to hosted storage and performs no hosted Plan database writes.
visualize-repo verify may send the MDX folder to the Plan app's public
validation action so the real renderer schema can check it. For no hosted
content egress, pass --app-url pointing at a local Plan app or skip
verify and rely on check.
Do not call hosted Plan write tools for this workflow unless the user explicitly
asks to publish or share the docs. Avoid create-visual-plan,
update-visual-plan, import-visual-plan-source, patch-visual-plan-source,
and get-plan-feedback for local repo docs; edit the MDX files directly and
use the local bridge.
常见问题
文档保存在哪里?
它们以本地 MDX 文件的形式保存在代码仓库中,因此可以用 git 进行跟踪。
审阅者可以留下评论吗?
可以。评论会保存在本地文件中,之后可以变成供编码智能体执行的修改。
它需要已有的配置文件吗?
不需要。如果仓库没有清单文件,该命令会通过扫描关键文件夹来创建一个。
详情
作者的原始描述
Open or create a repo-native visual documentation workspace backed by local Plan MDX files. Use when the user asks to visualize a repository, create durable visual docs for APIs/components/models/flows, launch a visual repo viewer, review repo docs like a visual IDE, or collect Plan comments that should become coding-agent changes.
repo: BuilderIO/agent-native
热度
- GitHub 星标
- 7.6k
- 排名
- #13126
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …