archray
Skill3 starsChanged 14 days agoMITView on GitHub
Analyzes a repository's real source into an evidence-backed v2 architecture graph (.archray/graph.json) and builds it into an offline, interactive 3D/2D single-file HTML architecture diagram. Use for architecture understanding, codebase visualization, system architecture maps, dependency graphs, layer slicing, replacement/migration planning, or updating/uninstalling ArchRay (架构图, 代码可视化, 依赖关系图); it does not scan source by itself or monitor runtime.
In this repository2 other files it gives its agents.
- site/llms-full.txtllms.txt
- site/llms.txtllms.txt
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. About 0 are common, 5 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Read .archray/graph.schema.json before generating .archray/graph.json.
- Very specific: line 14
Read real source before describing a module.
- Distinctive: line 18
Prefer 6–18 top-level nodes for readability.
- Very specific: line 19
Use a kind that matches the module.
- Very specific: line 20
Every id in the flat nodes array must be globally unique, including child nodes.
- Very specific: line 22
Always write .archray/graph.json in UTF-8 without BOM (never pipe CJK text through Windows PowerShell Set-Content/Out-File or shell …
- Distinctive: line 26
Default to current facts only.
- Distinctive: line 28
When proposing an alternative, state the user's evaluation goal, rationale, sources/references, tradeoffs and unknowns.
- Very specific: line 34
Read .archray/tech.json when classifying a technology: it lists categories, canonical layers and component kinds.
- Distinctive: line 48
When the user asks for a look or language, pass it at build time instead of editing the graph:
- Very specific: line 58
If the user asks to update ArchRay, resolve the intent before doing anything else and then stop the update branch.
- Distinctive: line 62
If the check or update fails, report the error and stop.
- Very specific: line 66
If the user asks to uninstall, run node "__ARCHRAY_CLI__" uninstall --dry-run first, show what will be removed, and wait for explicit …
- Very specific: line 70
Write only .archray artifacts by default.
- Very specific: line 85
When asked about migration, first review facts and propose migration, rollback and validation plans.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
ArchRay v2 — evidence from your repository
You produce semantic architecture facts. ArchRay's deterministic layout engine computes positions; never write coordinates, SVG or HTML by hand.
Read .archray/graph.schema.json before generating .archray/graph.json. Produce schemaVersion: "2.0" with meta (name, locales, generatedAt as the actual generation time, repo.commit when known), 3–6 ordered layers, flat nodes with stable IDs and parent references, edges, and optional flows/scenarios.
Facts first
- Read real source before describing a module. Record repository-relative
sourcePathsandevidencefor findings. - Explain each module's responsibility, its dependencies, and one important directed flow.
- State missing or uncertain evidence. Do not claim complete static analysis, runtime tracing or traffic monitoring.
- Mark every numeric metric with its origin (
measuredorestimated) and how it was obtained. Never fabricate measurements. - Prefer 6–18 top-level nodes for readability. Group files into architectural modules rather than mirroring every directory.
- Use a
kindthat matches the module; known kinds are client, cli, gateway, service, worker, function, library, module, database, cache, queue, storage, search, external-api, ai-model, config, group, saas, archive. Other strings are allowed when none fits. - Every id in the flat
nodesarray must be globally unique, including child nodes. Prefix child ids with their parent when needed (for exampleorder/repo,billing/repo); references must resolve unambiguously. - Default
meta.localesto["zh-CN", "en"]unless the user asks for a single language. Whenevermeta.localescontains multiple locales, provide complete translations for every declared locale on every human-readableLocalizedTextfield (meta.name,meta.description,layers[].name,nodes[].name,nodes[].summary,nodes[].description,health.findings[].text,alternatives.*,edges[].label,flows[].name,flows[].steps[].action,scenarios[]); never translate only layer titles while leaving module content in one language. - Always write
.archray/graph.jsonin UTF-8 without BOM (never pipe CJK text through Windows PowerShellSet-Content/Out-Fileor shell redirection without explicit UTF-8 encoding).
Candidates and scenarios
Default to current facts only. Candidates, alternatives and scenarios are optional; zero candidates and keeping the current implementation are valid.
When proposing an alternative, state the user's evaluation goal, rationale, sources/references, tradeoffs and unknowns. Explain what evidence is missing. Planned nodes exist only inside explicitly requested scenario patches, never as existing source modules.
Scenarios describe a target state. Patches execute in order and must preserve valid references at each step. Removing a node cascades its subtree, incident edges and associated flow steps; replacing a node reparents children and maps flow endpoints while retaining edge IDs. updateNode cannot change IDs. Original facts remain the basis for impact and prompts.
Layered views
Read .archray/tech.json when classifying a technology: it lists categories, canonical layers and component kinds. Use it as a hint, not as evidence that the technology is present.
Give each node a layer using this canonical set (or the closest existing graph layer): client (前端/客户端), edge (网络/传输), gateway (安全/网关), service (后端/中间层), async (异步/任务), data (数据/存储), ai (AI/模型), external (外部/SaaS), platform (平台/基础设施), observability (可观测). Child nodes inside an expanded group render within their parent group's visual layer band.
Analyse once, then slice the view instead of re-analysing:
node "__ARCHRAY_CLI__" build .archray/graph.json --layers frontend,data --force --no-openChinese and English aliases are accepted (前端, 数据, gateway, …). Selected layers stay fully visible; one-hop neighbours are dimmed as cross-layer context. When installed with --agent, the presets are /archray, /archray:frontend, /archray:backend, /archray:data, /archray:network, /archray:security and /archray:full.
Style and language
When the user asks for a look or language, pass it at build time instead of editing the graph:
node "__ARCHRAY_CLI__" build .archray/graph.json --style blueprint --lang en --force --no-openStyles are tech, blueprint, glass, paper; motion is full, calm or off (--motion). The graph must already contain the requested locale; otherwise report that it is unavailable and keep the default rather than inventing translations. For bilingual repositories (meta.locales: ["zh-CN", "en"]), ensure all meta, layers, nodes, findings, alternatives, edges, flows, and scenarios entries include { "zh-CN": "...", "en": "..." } so toggling 中 / EN translates both titles and content. Known technologies get brand marks; unknown ones use a generic kind icon.
Updating and uninstalling
If the user asks to update ArchRay, resolve the intent before doing anything else and then stop the update branch; do not re-analyse source, validate or rebuild the graph.
- Check only (
check for updates,update --check,只检查): runnode "__ARCHRAY_CLI__" update --check. Report the current and available version and state that no update was downloaded or applied. Do not runupdateafterwards. - Apply update (
update,升级到最新版): runnode "__ARCHRAY_CLI__" update. Report the old/new version and confirm.archray/graph.json,view.jsonandindex.htmlwere kept. - If the check or update fails, report the error and stop. Do not fall back to analysis or building.
A check-only request is not authorization to apply an update. Updates use the release manifest and SHA-256; a failed update leaves the old tool in place.
If the user asks to uninstall, run node "__ARCHRAY_CLI__" uninstall --dry-run first, show what will be removed, and wait for explicit confirmation before running uninstall. Use --purge only when the user explicitly wants to delete graph/view/index too.
Safety and outputs
Write only .archray artifacts by default. Preserve existing graph/view files unless the user explicitly authorizes replacement. Do not modify application source or agent configuration as part of analysis.
Always write .archray/graph.json as UTF-8 without BOM using a native file-write tool or node (fs.writeFileSync(..., 'utf8')). Never pipe or redirect CJK text through Windows PowerShell Set-Content/Out-File or shell redirection without explicit UTF-8 encoding (non-UTF-8 Windows code pages replace Chinese characters with ?). If validate reports encoding corruption (? placeholders or \uFFFD), rewrite .archray/graph.json cleanly in UTF-8 before running build.
Validate and build from the target repository, using the absolute path to the tool:
node "__ARCHRAY_CLI__" validate .archray/graph.json
node "__ARCHRAY_CLI__" build .archray/graph.json --force --no-openObtain and build the tool separately. build refuses to overwrite by default. The slash-command templates use --force only for the derived .archray/index.html; never overwrite .archray/graph.json, view.json or a user-chosen output without explicit consent.
Migration requests
When asked about migration, first review facts and propose migration, rollback and validation plans. Wait for separate authorization before implementing changes. Source paths in a graph are claims to verify, not proof that files were checked by ArchRay.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

