ag-tech-graph
Use when you need publish-grade SVG or PNG technical diagrams for architecture, flow, sequence, UML, state, or comparison visuals, with preview used afterward for review rather than generation.
- License 许可
- MIT
- 最近更新
- 2026-08-02
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- ag-tech-graph
- layer
- helper
- description
- Use when you need publish-grade SVG or PNG technical diagrams for architecture, flow, sequence, UML, state, or comparison visuals, with preview used afterward for review rather than generation.
- trigger_keywords
- tech, graph
02 资源文件 35
- 参考文档fixtures/agent-memory-types-style4.json4.7 KB
- 参考文档fixtures/api-flow-style7.json4.3 KB
- 参考文档fixtures/mem0-style1.json8.5 KB
- 参考文档fixtures/microservices-style3.json6.6 KB
- 参考文档fixtures/multi-agent-style5.json4.9 KB
- 参考文档fixtures/system-architecture-style6.json5.2 KB
- 参考文档fixtures/tool-call-style2.json5.1 KB
- 许可证LICENSE1.1 KB
- 参考文档README.md7.0 KB
- 参考文档references/icons.md16.2 KB
- 参考文档references/style-1-flat-icon.md3.0 KB
- 参考文档references/style-2-dark-terminal.md2.8 KB
- 参考文档references/style-3-blueprint.md3.2 KB
- 参考文档references/style-4-notion-clean.md2.8 KB
- 参考文档references/style-5-glassmorphism.md3.6 KB
- 参考文档references/style-6-claude-official.md6.8 KB
- 参考文档references/style-7-openai.md6.6 KB
- 参考文档references/style-diagram-matrix.md8.8 KB
- 参考文档references/svg-layout-best-practices.md3.9 KB
- 参考文档references/tech-graph-workflow.md1.9 KB
- 脚本scripts/generate-diagram.sh1.0 KB
- 脚本scripts/generate-from-template.py61.9 KB
- 脚本scripts/README.md2.7 KB
- 脚本scripts/test-all-styles.sh4.2 KB
- 脚本scripts/validate-svg.sh873 B
- 资产文件templates/agent-architecture.svg1.3 KB
- 资产文件templates/architecture.svg1.0 KB
- 资产文件templates/comparison-matrix.svg612 B
- 资产文件templates/data-flow.svg1.3 KB
- 资产文件templates/er-diagram.svg1003 B
- 资产文件templates/flowchart.svg860 B
- 资产文件templates/sequence.svg856 B
- 资产文件templates/state-machine.svg846 B
- 资产文件templates/timeline.svg832 B
- 资产文件templates/use-case.svg947 B
03 SKILL.md 正文
Tech Graph
When to Apply
Use this skill when working with ag-tech-graph workflows, tasks, or system specifications.
How to Use
Refer to the workflow instructions and command references detailed below. Generate publish-grade technical diagrams as SVG first, then PNG when raster export is needed.
This is a helper skill only.
- Do use it for architecture diagrams, data flow diagrams, flowcharts, sequence diagrams, state machines, ER diagrams, use-case diagrams, timelines, and comparison matrices that should become durable artifacts.
- Do use it when the output should live under
process/general-plans/references/,process/general-plans/reports/visuals/,process/features/{feature}/references/, orprocess/features/{feature}/reports/visuals/. - Do use
previewafter generation when you want explanation, HTML framing, Mermaid review, or visual self-check of the finished artifact. - Do not use it as a plan or execution workflow.
- Do not use it to replace inline doc diagrams when a lightweight Mermaid or ASCII explanation is enough.
Capability Surface
The local skill now includes upstream-style assets:
- 7 visual style references
- style-to-diagram guidance matrix
- icon and SVG layout reference material
- reusable SVG templates
- JSON regression fixtures
- template-driven generation script
- batch style validation script
Load the smallest references that fit the request:
references/style-diagram-matrix.mdto choose a style and diagram familyreferences/style-1-flat-icon.mdthroughreferences/style-7-openai.mdfor exact visual languagereferences/icons.mdfor semantic shapes and product-icon guidancereferences/svg-layout-best-practices.mdfor spacing, routing, label, and export disciplinereferences/tech-graph-workflow.mdfor project-specific routing and proof rules
Routing Matrix
Use tech-graph when the output should become a durable artifact:
process/general-plans/references/process/general-plans/reports/visuals/process/features/{feature}/references/process/features/{feature}/reports/visuals/
Use preview instead when the goal is:
- explain a concept visually
- review an existing diagram
- generate HTML slides or recaps
- create inline Mermaid-first discussion material
Output Policy
Prefer .svg as the source artifact. Generate .png alongside it when:
- the user wants an image for sharing
- you want a visual proof artifact
- you need to inspect the render rather than only the XML
If the user does not specify an output path, route outputs to the matching project process folder rather than ad hoc locations like ~/Desktop or /tmp.
Diagram Types
The imported templates and references support these common families directly:
- architecture
- data-flow
- flowchart
- sequence
- comparison
- timeline
- mind-map
- agent
- memory
- use-case
- class
- state-machine
- er-diagram
- network-topology
When the diagram type is ambiguous, classify it before drawing. If the request is really an explanation-first visual, switch to preview instead of forcing a publish-grade diagram.
Workflow
- Decide if the task needs publish-grade SVG/PNG or just
preview. - Classify the diagram type and pick the output destination.
- Load the matching style reference. Default to style 1 unless the request implies another visual language.
- Use a template from
templates/or fixture structure fromfixtures/when it speeds up clean SVG generation. - Generate the SVG directly or render it with:
python3 .claude/skills/tech-graph/scripts/generate-from-template.py <template-type> <output.svg> '<json-data>'
- Validate the result:
bash .claude/skills/tech-graph/scripts/validate-svg.sh <file.svg>
- Export PNG when needed:
bash .claude/skills/tech-graph/scripts/generate-diagram.sh -o <file.svg>
- If useful, review the output visually and iterate.
Helper Scripts
scripts/generate-diagram.sh- validates an SVG
- exports a sibling PNG when
rsvg-convertis available - warns and succeeds in SVG-only mode when
rsvg-convertis missing
scripts/generate-from-template.py- renders starter diagrams from the imported templates plus JSON structure
- supports the upstream visual style system and semantic shapes
scripts/test-all-styles.sh- renders the regression fixtures
- validates every generated SVG
- exports PNG proofs when
rsvg-convertis present - writes batch outputs to a project process artifact folder by default
scripts/validate-svg.sh- checks XML structure and closing tags
- uses
rsvg-convertas an extra validator when available
Dependency Contract
- Required for SVG validation: shell, Python 3, and basic Unix tools
- Optional but recommended for PNG export:
rsvg-convert
This kit allows degraded SVG-only mode when rsvg-convert is unavailable. The skill should warn clearly instead of failing silently.
Good Trigger Phrases
generate architecture diagramdraw the system flowmake this sequence diagram publishablecreate a clean SVG for this processturn this architecture into PNGgenerate a UML state machinebuild a comparison matrix for these systems
Load references/tech-graph-workflow.md for the project-specific routing, proof, and preview-boundary rules.
References
04 同仓库更多 Skills
zustand
Rules and standards for state management using Zustand in React and Next.js. Use when implementing client-side stores, persistence with localStorage, or preventing SSR hydration mismatch.
zod
Zod v4 schema validation best practices. Use when defining schemas, utilizing safeParse, or customizing error messages.
upstash-ratelimit
Rules, standards, and references for rate limiting in serverless environments using Upstash Ratelimit. Use when implementing rate limiting, configuring Upstash Redis, or handling request blocking.
ui-design
UI/UX and frontend design best practices guidelines (formerly frontend-design). This skill should be used when writing, reviewing, or designing frontend code to ensure accessibility, performance, and usability. Triggers on tasks involving HTML structure, CSS styling, responsive layouts, form design, animations, or accessibility improvements.
typescript
TypeScript performance, tsconfig, type errors, async patterns — triggered when the user asks to "optimize TypeScript performance", "speed up tsc compilation", "configure tsconfig.json", "fix type errors", "improve async patterns", or encounters TS errors (TS2322, TS2339, "is not assignable to"). Also triggers on .ts, .tsx, .d.ts file work involving type definitions, module organization, or memory management. Does NOT cover TypeScript basics, framework-specific patterns, or testing.
typescript-refactor
TypeScript and TSX refactoring and modernization guidelines from a principal specialist perspective, current to TypeScript 6.0 and React 19. This skill should be used when refactoring, reviewing, or modernizing TypeScript or React/TSX code for type safety, compiler performance, and idiomatic patterns. Triggers on tasks involving type architecture, narrowing, generics, discriminated unions, error handling, React component and hook typing, or migration to modern TypeScript features (satisfies, using, const type parameters, inferred type predicates, isolatedDeclarations, erasable syntax, import attributes).