Agent Skills › tt-a1i/archify › archify

archify

GitHub

生成可交互的架构、工作流等图表HTML,支持多主题与导出。

archify/SKILL.md tt-a1i/archify

Trigger Scenarios

需要可视化系统架构或数据流 将文本描述转为交互式图表

Install

npx skills add tt-a1i/archify --skill archify -g -y
More Options

Non-standard path

npx skills add https://github.com/tt-a1i/archify/tree/main/archify -g -y

Use without installing

npx skills use tt-a1i/archify@archify

指定 Agent (Claude Code)

npx skills add tt-a1i/archify --skill archify -a claude-code -g -y

安装 repo 全部 skill

npx skills add tt-a1i/archify --all -g -y

预览 repo 内 skill

npx skills add tt-a1i/archify --list

SKILL.md

Frontmatter
{
    "name": "archify",
    "license": "MIT",
    "metadata": {
        "author": "tt-a1i",
        "version": "3.1"
    },
    "description": "Create validated architecture, workflow, sequence, data-flow, lifecycle\/state, entity-relationship, class\/interface, tree, timeline, and execution waterfall diagrams as explorable standalone HTML with inline SVG, dark\/light themes, optional motion, and image\/SVG\/WebM export. Accept plain-language requirements or Mermaid; inspect repository evidence for code-backed diagrams. Use when visualizing infrastructure, cloud\/security networks, API calls, data pipelines, ETL\/ELT, state machines, database schemas, class contracts, module hierarchies, incident\/release histories, or request and agent-run timings. Also use for everyday subjects with steps, parts, relationships, or states: leave and travel plans, applications and approvals, renting conversations, money or document flows, and order progress. Not for numeric charts or dashboards."
}

Archify

Create an interactive HTML diagram from typed JSON.

Run commands from your working directory. Unless the user names another location, give each new diagram request its own folder .archify/<type>-<slug>-<YYYYMMDD-HHMMSS>/ there (local time, chosen once when the request starts): keep candidate.json and <slug>.html in it, set meta.output to that HTML path relative to the working directory, and reuse the folder for every repair rerun. A later request gets a new folder, so earlier versions stay intact. Replace bin/archify.mjs in the commands below with the installed package's absolute path, or its path relative to your working directory; input and output paths resolve from that working directory.

For a real codebase, read Repository authoring while tracing the requested behavior. A system description uses the steps below; an existing JSON uses the handoff path.

Existing candidate handoff

When the user supplies a frozen candidate, run finalize first as one CLI invocation. Its passing receipt completes the automated gates; follow any visual review recommendation under Delivery before claiming visual quality. For repair, follow step 5.

finalize includes a bounded update check in its delivery receipt; see Update awareness.

Fast authoring path

Use this path for ordinary generation. Read branch references only when their stated trigger applies.

  1. Choose architecture, workflow, sequence, dataflow, lifecycle, erd, class, tree, timeline, or waterfall from the question.

  2. Use the exact schema and example paths in the Type router without listing their directories. Read Authoring defaults and the mode's example in a bounded batch separate from project documents and complete schemas so neither is truncated; recover any missing section before writing. For Architecture, use the matching showcase example. For every mode except Architecture, also read the mode and common schemas. Read the relevant schema definition before choosing any new field, enum, or constrained text, especially boundary kinds. Examples teach shape, not facts. Use fresh IDs, wording, and layout. Go directly to the candidate without preliminary help, doctor, starter validation, temporary diagrams, or output-path listing. Query brands only for an explicitly requested mark; read Brand marks for an unknown mark with a user-provided URL.

  3. Once the requested scope and, for a real codebase, source evidence are covered, write the complete candidate directly without planning coordinates in prose. Choose Architecture abstraction and connected placement using Authoring defaults before coordinates: show the main user journey and necessary branches, preserve control roles and behavior-changing conditions, and leave enough room for actual relationship labels. No node, relationship, source, view, card, or boundary count is a target or ceiling. Use automatic routes first; add explicit routing only for necessary branch, return, supplied geometry, or measured repair. Set meta.quality_profile to "showcase" unless the user requests dense standard. For ERD, use a table-first layout: show every physical column in entities[].attributes, keep its SQL type and source comment, state every key role a column carries (key takes a role or a list, so a junction column is ["pk", "fk"], and every fk column also needs references like "orders.id"), and never move columns into cards as a substitute for the table. Classify tables into functional domains before placement, give each domain a concise tag, and place its members in one solid rectangle of grid cells — a single row, a single column, or a filled rectangular block, not an L or diagonal. A tagged table always needs row/col, because absolute coordinates have no grid cells and a domain whose tables do not fill one rectangle cannot be drawn as a band: the renderer reports erd/domain-not-drawn instead of publishing a diagram that cannot name the domain. A multi-domain schema reads best as one domain per column — each tag a vertical run — because the reader scales a wide canvas up to the reader width and shrinks a tall one until the page fits, so the wide arrangement is the one that stays complete and legible inside a laptop viewport. A schema-first ERD over roughly 8 tables or 50 fields is itself a dense map: author its first complete-field pass at standard and upgrade only once the layout still reads.

  4. Once the complete first candidate is written, run finalize directly. Its first gate is showcase validation; successful first drafts need no separate pre-validation. Keep the candidate unchanged while the command runs:

    node bin/archify.mjs finalize <type> <candidate.json> <output.html> --quality showcase --json
    

    For a repository-backed candidate, include evidence on the first draft and use the complete first command: node bin/archify.mjs finalize <type> <candidate.json> <output.html> --repo-root <repo-root> --quality showcase --json. Pass the --quality that matches meta.quality_profile, such as standard for a dense first ERD pass.

    A passing receipt proves the included validate, deliver, strict check, and real-browser browser-check gates passed. Use its compact summary; run standalone commands only for a separate request or focused failure diagnosis.

  5. A non-zero exit is never success. Read compact stdout or evidence.summaryReceipt, then repair the failed gate, including its repair limit. Preserve requested meaning and source evidence. For several tangled Architecture routes, read Architecture layout repair; for measured field or geometry failures, read Authoring contract. Edit the connected neighborhood and rerun the complete finalize command from step 4. Once a run has reached browser-check, the output path owns that evidence: give every later run its own --out-dir <folder>/review-<n>.

Update awareness

finalize and standalone deliver include update in their receipts. Do not run a separate check for the same delivery. If update.noticeRequired is true, read references/update-awareness.md and keep one update line in your final response to the user, even after a quality gate fails. For a task with several diagrams, mention the update once in the final response. Snooze or ignore a reminder only when the user explicitly asks; never install or update on your own initiative.

Before the first candidate, use the authoring references and relevant repository source, not Archify implementation or tests. Inspect Archify implementation if diagnostics remain unactionable after focused repairs.

Type router

Type Use for Schema Example
architecture Components, services, cloud/security boundaries, infrastructure; what something everyday is made of schemas/architecture.schema.json System descriptions, services, libraries, and CLI repos: examples/web-app.architecture.json; deployment repos: examples/production-deployment.architecture.json
workflow Processes, approval gates, tool calls, runbooks, CI/CD; plans and step-by-step life processes schemas/workflow.schema.json examples/agent-tool-call.workflow.json
sequence API call chains, request lifecycles, async traces, returns; back-and-forth between people schemas/sequence.schema.json examples/cache-miss-request.sequence.json
dataflow Pipelines, ETL/ELT, lineage, governance, consumers; where money or documents go schemas/dataflow.schema.json examples/product-analytics.dataflow.json
lifecycle State/status transitions, retries, waiting and terminal states; where an application or order stands schemas/lifecycle.schema.json examples/deployment-release.lifecycle.json
erd Tables/entities, attributes, primary/foreign/unique keys, cardinality between them schemas/erd.schema.json examples/orders.erd.json
tree Single-parent containment: repository/module trees, capability or feature breakdowns, org-style decomposition schemas/tree.schema.json examples/payment-platform.tree.json
class Classes, interfaces, selected members, and dependency/association/inheritance/realization/composition between types schemas/class.schema.json examples/payments.class.json
timeline When things happened: incident reviews, release histories, timestamped events on a proportional clock with source lanes schemas/timeline.schema.json examples/payment-incident.timeline.json
waterfall Where the time went: span durations, overlap, and nesting of one request or agent run on a common time axis schemas/waterfall.schema.json examples/checkout-request.waterfall.json

When ambiguous, run node bin/archify.mjs guide "<scenario>" --json. Scenario proof examples are structural references, not facts to copy.

For an everyday subject, keep the same diagram modes and semantic types, then name them for the reader: use everyday icon values and meta.legend labels as in Node icons. Ask for missing personal facts instead of inventing dates, amounts, or rules.

Mermaid input

Read Mermaid for topology and meaning, then author fresh Archify JSON; do not mechanically render Mermaid styling.

  • flowchart / graph → workflow, or architecture for a component map.
  • sequenceDiagram → sequence; participants become semantic participants and arrows become messages.
  • stateDiagram → lifecycle; states and transitions retain meaning, not Mermaid style.
  • erDiagram → erd; entity and relationship names, keys, and cardinality retain meaning, not Mermaid style.
  • classDiagram → class; type kinds, selected members, and relationship kinds retain meaning, not Mermaid style.

Delivery

Use the finalize command above for the first candidate and after a repair.

finalize stops at the first non-passing gate. Its compact stdout and <output-stem>.finalize-summary.json are ordinary evidence. A passing run creates no screenshots and reports visualReview: "not-requested".

When a passing Architecture receipt reports visualReviewRecommendation.signals.resolvedCrossovers, copy the candidate aside and apply the hints in one edit that changes only node positions and sizes: every node, relationship (including its from and to), label, and source stays as it was. Rerun the complete finalize once with --out-dir <folder>/review-2, because the previous HTML already owns its browser evidence. If that run fails, reports more crossings, or reports the same crossings with more signals.routesOverSuggestedBends, restore the copy and finalize it with --out-dir <folder>/review-3. Do not start a second placement round. Hints about extra bends alone are optional.

When layoutReviewRecommendation.action is inspect-sequence-width, follow Sequence width review before handing off a newly authored Sequence.

Perceptual review is optional for ordinary generation, including a newly positioned Architecture. Use Optional capture evidence, with --out-dir <folder>/visual-check, when the user requests visual review, during development audits, or for a concrete route/browser concern. visualReviewRecommendation is advisory. Inspect captures before claiming visual quality; qualify any check claim as automated when perceptual review has not occurred.

Read Delivery contract for failed gates, standalone commands, provenance/recovery, repeated delivery, exports, or opening. Recovery follows deliver → strict provenance check → browser-check; captures require strict provenance.

For workflow viewport overflow, read Workflow viewport repair before the next layout edit.

When reporting verification details, distinguish artifact checks, browser evidence, captures, and actual perceptual review. For an explicitly requested immediate preview or active desktop loop, see Optional opening.

Optional viewer capabilities

Live motion is enabled by default for every rendered diagram; omit meta.animation. The Viewer’s Live/Still button controls playback.

Read references/viewer-runtime.md only when the user explicitly asks for Share Cards, Route/Reach cards, motion, deep links, presentation, search/focus, or another Viewer Runtime feature.

Setup and fallback

No install is required inside the skill package. For setup diagnosis, verify with:

node bin/archify.mjs doctor
node bin/archify.mjs demo <output-directory>

When shell access is unavailable, hand-place architecture SVG into assets/template.html, use CSS semantic classes rather than inline colors, and follow the visual review contract in references/delivery-contract.md.

Output

Reply in the user's language, as briefly as the result allows; the diagram carries the content, so a single diagram usually needs one line.

  • Lead with a clickable Markdown link to the HTML: a descriptive title, not the file name, and its absolute path, wrapped in <...> when it contains spaces.
  • When the user wants to understand a system or codebase rather than draw a described subject, add one or two sentences with the key takeaway. Skip sentences that only restate what the diagram obviously shows.
  • State anything that changes how the diagram should be read: the abstraction level or deliberately omitted parts when a reader might expect them, illustrative rather than measured values, missing source evidence, or requested content dropped or merged during repair.
  • For several diagrams, report completion once with a link to an existing overview or compact per-diagram links, not a directory path.

Do not recap commands, repair rounds, hashes, quality profiles, or check lists; they stay in the receipts. If asked whether the diagram was verified, answer in one line, such as “Automated checks passed; not visually reviewed.” Give receipt links and details only for reproducibility or troubleshooting. Disclose requested visual review that could not run, and claim visual inspection only when performed. Keep the required update line under Update awareness.

Example: Created [Checkout request timing](/abs/path/checkout-timing.html). Durations are illustrative, not measured.

Version History

  • b25142d Current 2026-10-18 22:04

    v3.1.0稳定版发布;优化序列图可读性、流程标签对比度及诊断报告。

  • 06dd052 2026-09-03 01:01

    修复发布物中的许可证溯源问题,澄清视觉检查的浏览器证据语义,新增工作流约束驱动编译器及技能更新通知机制。

  • 48cb933 2026-08-27 13:03

    新增Viewer UI的多语言本地化支持

  • e1ac748 2026-08-19 15:22

    v2.15.0: 新增品牌标识自动生成与远程URL图标捕获功能,优化视觉权重并增强安全限制。

  • cffdd42 2026-08-17 04:31

    为Sequence类型新增opt-in column_fit功能,支持视口相对列间距布局,改善宽视图下的参与者展示与标签空间。

  • a3bf80c 2026-08-13 09:35

    v2.14.0: 优化视觉渲染、路由及导出控制,新增受限视觉证据检查。

  • cc55764 2026-08-03 08:54

    新增可配置的图例功能;修复输出稳定性并增强发布健壮性,兼容Node 18。

  • 7b49d0b 2026-07-31 07:11

    强化图表创作与交付流程,锁定展示级质量验收标准,优化普通模型生成的收敛性与初始质量,新增视觉风格选择器、编辑预设及Delta导航功能。

  • 0562a20 2026-07-23 00:20

    新增最后良好实时预览功能;支持将解析后的路由导出为分享卡片;强制清除关系标签冲突;优化共享自动端口分布;增加复制分享卡片功能;打开已验证交付物;添加就绪型图表卡片及原子化验证交付机制;允许读者实时尝试视觉风格;修复模糊关系走廊的拒绝逻辑。

  • ed0efcc 2026-07-19 18:26

    v2.11.0: 实现零安装部署,降低试用门槛;优化本地验证器集成,移除npm依赖要求,提升开箱即用体验。

  • fa7fbce 2026-07-05 14:59

Same Skill Collection

.agents/skills/archify-review/SKILL.md
.agents/skills/archify-tuning/SKILL.md
.agents/skills/simplify-codebase/SKILL.md
.agents/skills/test-value/SKILL.md

Metadata

Files
0
Version
b25142d
Hash
55c126d6
Indexed
2026-07-05 14:59

trang chủ - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-25 20:20
浙ICP备14020137号-1