mcpbeat Sign in

Anchor Viz Agent Skill

Draw a faithful architecture or structure diagram of a real codebase or project by scanning the actual repo, never guessing. Use for system architecture, request lifecycle, data model, state transitions, type structure, draw the architecture, map this project, 画架构图.

1.4k tokens
context cost
SKILL.md, read when the skill is used
14
files
ships runnable scripts
0
copies elsewhere
how many repositories repackaged it
104
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/lynxlangya/techne --skill anchor-viz

What comes with it

3 456 703 bytes besides the instruction
README-CN.md
README.md
eval.md
reference.md
scripts/build_viewer.py
scripts/package.json
scripts/store_viz.py
scripts/validate-mermaid.mjs
scripts/viewer/.gitattributes
scripts/viewer/VENDOR-LICENSES.txt
scripts/viewer/mermaid.min.js
scripts/viewer/svg-pan-zoom.min.js
scripts/viewer/template.html

The instruction itself

5 sections, as written by the author

anchor-viz

Investigate by diagramming. The diagram is the byproduct; the value is forcing

real investigation before drawing.

Forced Procedure

  • Route the request. Choose one diagramKind from the table below. If the

user's intent fits multiple kinds, ask one short clarification instead of

guessing.

  • Find evidence for that kind. For architecture, enumerate roots,

manifests, workspace/build/native/container/edge/infra/source-only signals.

For other kinds, find the bounded entrypoint, schema, state enum, workflow,

or module/type namespace before drawing.

  • Classify shape or scope. For architecture, state one project shape and

cite evidence: single-frontend, single-backend, coupled-fullstack,

monorepo, library, native, native+edge, source-only code, or

non-code. For other kinds, state the bounded scope and the files that prove

it.

  • Apply the non-code decision. Never declare non-code only because manifests

are absent. First scan roots; then run a bounded source-extension/code-signal

scan. If both are absent, or docs/vault signals clearly dominate, do not

fabricate a code diagram. Draw the real top-level structure or ask what the

user wants.

  • Match the user's language. Human-facing diagram text follows the user's

primary language: titles, display labels, edge/message labels, shape notes,

and short explanations. Keep code-facing identifiers source-native: Mermaid

IDs, file paths, symbols, package names, class/function/module names, and

established technical terms such as API, SDK, CLI, HTTP, SwiftUI, AppKit, or

React.

  • Draw only evidenced relationships. Use the evidence contract for the

selected kind. Every node, participant, entity, state, type, and edge/message

must come from a file read.

  • Enforce complexity gates. Keep architecture at 12-15 top-level nodes by

default. For other kinds, use the validator's participant/message,

entity/relationship, state/transition, or type/member limits. Split into

drill-down diagrams when needed.

  • Mark provenance. Add render-neutral comments for every element before

storing:

%% techne:source <elementRef> <path>[#<symbol>] or, for relationship-like

elements only, %% techne:inferred <relationshipRef> <reason>. Entity-like

elements always need verified techne:source; relationship-like elements

need file+symbol proof unless explicitly inferred with sourced endpoints.

Use actor for human sequence participants so the actor path-only allowance

is mechanically scoped. Solid relationships mean read-from-code. Dashed or

labeled relationships mean inference only where the selected Mermaid type

supports it.

  • Emit, validate, store, build viewer, open when interactive. Write Mermaid

source first, validate it, store it with scripts/store_viz.py, always build

the self-contained viewer, and only open it when the session is interactive.

Diagram Routing

| User intent | diagramKind | Mermaid type | Evidence focus |

| --- | --- | --- | --- |

| Project architecture, module/service/package topology | architecture | flowchart / graph | Manifests, workspaces, imports, services, bindings, infra edges. |

| Request lifecycle, command/job flow, actor conversation | interaction | sequenceDiagram | Entrypoint, ordered calls/messages, handlers, clients, queues. |

| Tables, entities, persistence relationships | data-model | erDiagram | Schema, migrations, ORM/entity declarations, foreign keys, associations. |

| Status/order/task/review lifecycle | state-model | stateDiagram-v2 / stateDiagram | Status constants, state machines, reducers, guards, transition handlers. |

| Classes, interfaces, structs, protocols, bounded type structure | type-structure | classDiagram | Type declarations, inheritance, implementation, composition, public method groups. |

Examples:

  • "map this project" -> architecture.
  • "show how login request flows" -> interaction.
  • "draw the database relationships" -> data-model.
  • "how does order status change" -> state-model.
  • "show the public types in this module" -> type-structure.

Script Usage

  • Validate Mermaid and altitude:

node skills/anchor-viz/scripts/validate-mermaid.mjs diagram.md --project /path/to/project --max-nodes 15

  • Store a diagram in a target project:

python3 skills/anchor-viz/scripts/store_viz.py --project /path/to/project --name login-flow --title "Login flow" --diagram diagram.md --shape monorepo

  • Build the self-contained viewer, opening it only when interactive:

python3 skills/anchor-viz/scripts/build_viewer.py --project /path/to/project --open

The validator expects [email protected] and jsdom to be installed in one of

these places: TECHNE_VIZ_NODE_MODULES, skills/anchor-viz/scripts/node_modules, the

current working directory, or an ancestor directory.

Stop Conditions

  • Stop and ask if you cannot inspect the project files.
  • Stop and ask if the requested diagram kind is ambiguous.
  • Stop before drawing unsupported architecture for a non-code project.
  • Stop before drawing a non-architecture diagram without a bounded entrypoint,

schema, status lifecycle, or module/type scope.

  • Stop before storing a diagram that fails syntax validation, provenance

validation, or a complexity gate.

  • Do not create .techne/ content inside this repository while authoring the

skill itself.

Other skills for the same job

different authors, same section of the catalogue
MCP Builder
by anthropics
vendor ×16

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

2.3k tokens scripts
Finishing A Development Branch
by ZhanlinCui
×9

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup

1.1k tokens
Changelog Generator
by frostant
×9

Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.

774 tokens
MCP Builder
by JayZeeDesign
×7

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

3.4k tokens scripts
Vercel React Best Practices
by ratacat
×7

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

1.3k tokens
Vercel React Native Skills
by vercel-labs
vendor ×6

React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.

1.1k tokens
Using Git Worktrees
by ZhanlinCui
×6

Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification

1.4k tokens
Next Best Practices
by vercel-labs
vendor ×4

Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling

1k tokens

How to use it

Copy the folder

Take lynxlangya/anchor-viz from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.