[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7FDWX1EEMQZJYV1TC09QN52":3,"skill-same:01M7FDWX1EEMQZJYV1TC09QN52":65},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7FDWX1EEMQZJYV1TC09QN52","baoyu-diagram",null,"Create professional, dark-themed SVG diagrams of any type — architecture diagrams, flowcharts, sequence diagrams, structural diagrams, mind maps, timelines, illustrative\u002Fconceptual diagrams, and more. Use this skill whenever the user asks for any kind of technical or conceptual diagram, visualization of a system, process flow, data flow, component relationship, network topology, decision tree, org chart, state machine, or any visual representation of structure\u002Flogic\u002Fprocess. Also trigger when the user says \"画个图\" \"画一个架构图\" \"diagram\" \"flowchart\" \"sequence diagram\" \"draw me a ...\" or uploads content and asks to visualize it. Output is always a standalone .svg file.","lza6\u002FArmor-piercing-system-prompts","lza6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128880206?v=4","01M7EB3K7WPX5T28EJ2NVHE6EG","Chinese-tingfeng","01M7EB3K97E1KQ16QWKJMFNGX8",11,"MIT","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fbaoyu-diagram\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: baoyu-diagram\ndescription: Create professional, dark-themed SVG diagrams of any type — architecture diagrams, flowcharts, sequence diagrams, structural diagrams, mind maps, timelines, illustrative\u002Fconceptual diagrams, and more. Use this skill whenever the user asks for any kind of technical or conceptual diagram, visualization of a system, process flow, data flow, component relationship, network topology, decision tree, org chart, state machine, or any visual representation of structure\u002Flogic\u002Fprocess. Also trigger when the user says \"画个图\" \"画一个架构图\" \"diagram\" \"flowchart\" \"sequence diagram\" \"draw me a ...\" or uploads content and asks to visualize it. Output is always a standalone .svg file.\nversion: 1.117.3\n---\n\n# Diagram Generator\n\nCreate professional SVG diagrams across multiple diagram types. All output is a single self-contained `.svg` file with embedded styles and fonts.\n\n## Supported Diagram Types\n\n| Type | When to Use | Key Characteristics |\n|------|-------------|-------------------|\n| **Architecture** | System components & relationships | Grouped boxes, connection arrows, region boundaries |\n| **Flowchart** | Decision logic, process steps | Diamond decisions, rounded step boxes, directional flow |\n| **Sequence** | Time-ordered interactions between actors | Vertical lifelines, horizontal messages, activation bars |\n| **Structural** | Class diagrams, ER diagrams, org charts | Compartmented boxes, typed relationships (inheritance, composition) |\n| **Mind Map** | Brainstorming, topic exploration | Central node, radiating branches, organic layout |\n| **Timeline** | Chronological events | Horizontal\u002Fvertical axis, event markers, period spans |\n| **Illustrative** | Conceptual explanations, comparisons | Free-form layout, icons, annotations, visual metaphors |\n| **State Machine** | State transitions, lifecycle | Rounded state nodes, labeled transitions, start\u002Fend markers |\n| **Data Flow** | Data transformation pipelines | Process bubbles, data stores, external entities |\n\n## Design System\n\n### Color Palette\n\nSemantic colors for component categories:\n\n| Category | Fill (rgba) | Stroke | Use For |\n|----------|-------------|--------|---------|\n| Primary | `rgba(8, 51, 68, 0.4)` | `#22d3ee` (cyan) | Frontend, user-facing, inputs |\n| Secondary | `rgba(6, 78, 59, 0.4)` | `#34d399` (emerald) | Backend, services, processing |\n| Tertiary | `rgba(76, 29, 149, 0.4)` | `#a78bfa` (violet) | Database, storage, persistence |\n| Accent | `rgba(120, 53, 15, 0.3)` | `#fbbf24` (amber) | Cloud, infrastructure, regions |\n| Alert | `rgba(136, 19, 55, 0.4)` | `#fb7185` (rose) | Security, errors, warnings |\n| Connector | `rgba(251, 146, 60, 0.3)` | `#fb923c` (orange) | Buses, queues, middleware |\n| Neutral | `rgba(30, 41, 59, 0.5)` | `#94a3b8` (slate) | External, generic, unknown |\n| Highlight | `rgba(59, 130, 246, 0.3)` | `#60a5fa` (blue) | Active state, focus, current step |\n\nFor flowcharts and sequence diagrams, assign colors by role (actor, decision, process) rather than by technology.\n\n### Typography\n\nUse embedded SVG `@font-face` or system monospace fallback:\n\n```svg\n\u003Cstyle>\n  @import url('https:\u002F\u002Ffonts.googleapis.com\u002Fcss2?family=JetBrains+Mono:wght@400;500;600;700&amp;display=swap');\n  text { font-family: 'JetBrains Mono', 'SF Mono', 'Cascadia Code', monospace; }\n\u003C\u002Fstyle>\n```\n\nFont sizes by role:\n- **Title:** 16px, weight 700\n- **Component name:** 11-12px, weight 600\n- **Sublabel \u002F description:** 9px, weight 400, color `#94a3b8`\n- **Annotation \u002F note:** 8px, weight 400\n- **Tiny label (on arrows):** 7-8px\n\n### Core Visual Elements\n\n**Background:** `#0f172a` (slate-900) with subtle grid:\n```svg\n\u003Cdefs>\n  \u003Cpattern id=\"grid\" width=\"40\" height=\"40\" patternUnits=\"userSpaceOnUse\">\n    \u003Cpath d=\"M 40 0 L 0 0 0 40\" fill=\"none\" stroke=\"#1e293b\" stroke-width=\"0.5\"\u002F>\n  \u003C\u002Fpattern>\n\u003C\u002Fdefs>\n\u003Crect width=\"100%\" height=\"100%\" fill=\"#0f172a\"\u002F>\n\u003Crect width=\"100%\" height=\"100%\" fill=\"url(#grid)\"\u002F>\n```\n\n**Arrowhead marker (standard):**\n```svg\n\u003Cmarker id=\"arrow\" markerWidth=\"10\" markerHeight=\"7\" refX=\"9\" refY=\"3.5\" orient=\"auto\">\n  \u003Cpolygon points=\"0 0, 10 3.5, 0 7\" fill=\"#64748b\"\u002F>\n\u003C\u002Fmarker>\n```\n\n**Arrowhead marker (colored) — create per-color as needed:**\n```svg\n\u003Cmarker id=\"arrow-cyan\" markerWidth=\"10\" markerHeight=\"7\" refX=\"9\" refY=\"3.5\" orient=\"auto\">\n  \u003Cpolygon points=\"0 0, 10 3.5, 0 7\" fill=\"#22d3ee\"\u002F>\n\u003C\u002Fmarker>\n```\n\n**Open arrowhead (for async\u002Freturn messages):**\n```svg\n\u003Cmarker id=\"arrow-open\" markerWidth=\"10\" markerHeight=\"7\" refX=\"9\" refY=\"3.5\" orient=\"auto\">\n  \u003Cpolyline points=\"0 0, 10 3.5, 0 7\" fill=\"none\" stroke=\"#64748b\" stroke-width=\"1.5\"\u002F>\n\u003C\u002Fmarker>\n```\n\n### SVG Structure & Layering\n\nDraw elements in this order to get correct z-ordering (SVG paints back-to-front):\n\n1. Background fill + grid pattern\n2. Region\u002Fgroup boundaries (dashed outlines)\n3. Connection arrows and lines\n4. Opaque masking rects (same position as component boxes, `fill=\"#0f172a\"`)\n5. Component boxes (semi-transparent fill + stroke)\n6. Text labels\n7. Legend (bottom-right or bottom area, outside all boundaries)\n8. Title block (top-left)\n\nThe opaque masking rect trick is essential — semi-transparent component fills will show arrows underneath without it:\n```svg\n\u003C!-- Mask layer: opaque background to hide arrows -->\n\u003Crect x=\"100\" y=\"100\" width=\"160\" height=\"60\" rx=\"6\" fill=\"#0f172a\"\u002F>\n\u003C!-- Visual layer: styled component -->\n\u003Crect x=\"100\" y=\"100\" width=\"160\" height=\"60\" rx=\"6\" fill=\"rgba(8,51,68,0.4)\" stroke=\"#22d3ee\" stroke-width=\"1.5\"\u002F>\n\u003Ctext x=\"180\" y=\"125\" fill=\"white\" font-size=\"11\" font-weight=\"600\" text-anchor=\"middle\">API Gateway\u003C\u002Ftext>\n\u003Ctext x=\"180\" y=\"141\" fill=\"#94a3b8\" font-size=\"9\" text-anchor=\"middle\">Kong \u002F Nginx\u003C\u002Ftext>\n```\n\n### Spacing Rules\n\nThese prevent overlapping — follow them strictly:\n\n- **Component box height:** 50-70px (standard), 80-120px (large\u002Fcomplex)\n- **Minimum gap between components:** 40px vertical, 30px horizontal\n- **Arrow label clearance:** 10px from any box edge\n- **Region boundary padding:** 20px inside edges around contained components\n- **Legend placement:** At least 20px below the lowest diagram element\n- **Title block:** 20px from top-left, outside diagram content area\n- **viewBox:** Always extend to fit all content + 30px padding on all sides\n\n### Component Patterns\n\n**Standard box (service\u002Fprocess):**\n```svg\n\u003Crect x=\"X\" y=\"Y\" width=\"160\" height=\"60\" rx=\"6\" fill=\"#0f172a\"\u002F>\n\u003Crect x=\"X\" y=\"Y\" width=\"160\" height=\"60\" rx=\"6\" fill=\"FILL\" stroke=\"STROKE\" stroke-width=\"1.5\"\u002F>\n\u003Ctext x=\"CX\" y=\"Y+24\" fill=\"white\" font-size=\"11\" font-weight=\"600\" text-anchor=\"middle\">Name\u003C\u002Ftext>\n\u003Ctext x=\"CX\" y=\"Y+40\" fill=\"#94a3b8\" font-size=\"9\" text-anchor=\"middle\">description\u003C\u002Ftext>\n```\n\n**Decision diamond (flowchart):**\n```svg\n\u003Cg transform=\"translate(CX, CY)\">\n  \u003Cpolygon points=\"0,-35 50,0 0,35 -50,0\" fill=\"#0f172a\"\u002F>\n  \u003Cpolygon points=\"0,-35 50,0 0,35 -50,0\" fill=\"rgba(120,53,15,0.3)\" stroke=\"#fbbf24\" stroke-width=\"1.5\"\u002F>\n  \u003Ctext y=\"4\" fill=\"white\" font-size=\"10\" font-weight=\"600\" text-anchor=\"middle\">Condition?\u003C\u002Ftext>\n\u003C\u002Fg>\n```\n\n**Database cylinder:**\n```svg\n\u003Cg transform=\"translate(X, Y)\">\n  \u003Crect x=\"0\" y=\"10\" width=\"120\" height=\"50\" rx=\"2\" fill=\"#0f172a\"\u002F>\n  \u003Cellipse cx=\"60\" cy=\"10\" rx=\"60\" ry=\"12\" fill=\"#0f172a\"\u002F>\n  \u003Cellipse cx=\"60\" cy=\"60\" rx=\"60\" ry=\"12\" fill=\"#0f172a\"\u002F>\n  \u003Crect x=\"0\" y=\"10\" width=\"120\" height=\"50\" fill=\"rgba(76,29,149,0.4)\"\u002F>\n  \u003Cellipse cx=\"60\" cy=\"10\" rx=\"60\" ry=\"12\" fill=\"rgba(76,29,149,0.4)\" stroke=\"#a78bfa\" stroke-width=\"1.5\"\u002F>\n  \u003Cellipse cx=\"60\" cy=\"60\" rx=\"60\" ry=\"12\" fill=\"rgba(76,29,149,0.4)\" stroke=\"#a78bfa\" stroke-width=\"1.5\"\u002F>\n  \u003Cline x1=\"0\" y1=\"10\" x2=\"0\" y2=\"60\" stroke=\"#a78bfa\" stroke-width=\"1.5\"\u002F>\n  \u003Cline x1=\"120\" y1=\"10\" x2=\"120\" y2=\"60\" stroke=\"#a78bfa\" stroke-width=\"1.5\"\u002F>\n  \u003Ctext x=\"60\" y=\"40\" fill=\"white\" font-size=\"11\" font-weight=\"600\" text-anchor=\"middle\">PostgreSQL\u003C\u002Ftext>\n\u003C\u002Fg>\n```\n\n**Region boundary:**\n```svg\n\u003Crect x=\"X\" y=\"Y\" width=\"W\" height=\"H\" rx=\"12\" fill=\"none\" stroke=\"#fbbf24\" stroke-width=\"1\" stroke-dasharray=\"8,4\"\u002F>\n\u003Ctext x=\"X+12\" y=\"Y+16\" fill=\"#fbbf24\" font-size=\"9\" font-weight=\"600\">AWS us-east-1\u003C\u002Ftext>\n```\n\n**Security group:**\n```svg\n\u003Crect x=\"X\" y=\"Y\" width=\"W\" height=\"H\" rx=\"8\" fill=\"none\" stroke=\"#fb7185\" stroke-width=\"1\" stroke-dasharray=\"4,4\"\u002F>\n\u003Ctext x=\"X+10\" y=\"Y+14\" fill=\"#fb7185\" font-size=\"8\" font-weight=\"500\">VPC \u002F Security Group\u003C\u002Ftext>\n```\n\n## Type-Specific Layout Guidance\n\nDetermine this SKILL.md file's directory path as `{baseDir}`. Read the reference file for the specific diagram type before starting layout. Reference files are located at `{baseDir}\u002Freferences\u002F` and contain detailed layout algorithms and examples.\n\n### Architecture Diagrams\n→ Read `{baseDir}\u002Freferences\u002Farchitecture.md`\n\nKey points: left-to-right or top-to-bottom data flow. Group related services in region boundaries. Use buses\u002Fconnectors between layers. Place databases at the bottom or right.\n\n### Flowcharts\n→ Read `{baseDir}\u002Freferences\u002Fflowchart.md`\n\nKey points: top-to-bottom primary flow. Diamonds for decisions with Yes\u002FNo labels on exit arrows. Rounded rectangles for start\u002Fend. Use the Highlight color for the happy path.\n\n### Sequence Diagrams\n→ Read `{baseDir}\u002Freferences\u002Fsequence.md`\n\nKey points: actors as boxes at top, vertical dashed lifelines, horizontal arrows for messages (solid=sync, dashed=return). Time flows downward. Activation bars show processing. Number messages if complex.\n\n### Structural Diagrams\n→ Read `{baseDir}\u002Freferences\u002Fstructural.md`\n\nKey points: compartmented boxes (name \u002F attributes \u002F methods for class diagrams). Relationship lines: solid with filled diamond=composition, solid with empty diamond=aggregation, dashed arrow=dependency, solid triangle=inheritance.\n\n### Mind Maps\nFree-form radiating layout from a central concept. Use organic curves (`\u003Cpath>` with cubic beziers) for branches. Vary branch colors using the palette. Larger font for central node, decreasing as you go outward.\n\n### Timelines\nHorizontal or vertical axis line. Event markers as circles or diamonds on the axis. Description text offset to alternating sides to avoid overlap. Use color to categorize event types.\n\n### State Machines\nRounded-rect states with double-border for composite states. Filled circle for initial state, bullseye for final state. Curved arrows for self-transitions. Label all transitions with `event [guard] \u002F action` format.\n\n## Output Rules\n\n1. Output a **single `.svg` file** — no external dependencies except the Google Fonts import\n2. Set `viewBox` to fit all content with 30px padding; do NOT set fixed `width`\u002F`height` attributes (let the SVG scale responsively)\n3. Include `xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\"` on the root `\u003Csvg>` element\n4. Put all `\u003Cstyle>`, `\u003Cdefs>`, markers, and patterns at the top of the SVG\n5. Use `text-anchor=\"middle\"` for centered labels; ensure text doesn't overflow boxes\n6. **Chinese text support:** When labels contain Chinese characters, use `font-family: 'JetBrains Mono', 'Noto Sans SC', 'PingFang SC', sans-serif'` and increase box widths — CJK characters are wider\n7. **Save location:** If the input is a file, save to `{inputFileDir}\u002Fdiagram\u002F`. Otherwise save to `{projectDir}\u002Fdiagram\u002F{topic-slug}\u002F`. Create the directory if it doesn't exist\n\n## Script\n\nDetermine this SKILL.md file's directory path as `{baseDir}`. Script path: `{baseDir}\u002Fscripts\u002Fmain.ts`.\n\nResolve `${BUN_X}` runtime: if `bun` installed → `bun`; if `npx` available → `npx -y bun`; else suggest installing bun.\n\n### SVG → @2x PNG\n\nAfter saving the SVG, convert it to a @2x PNG:\n\n```bash\n${BUN_X} {baseDir}\u002Fscripts\u002Fmain.ts \u003Csvg-path> [options]\n```\n\nOptions:\n- `-s, --scale \u003Cn>` — Scale factor (default: 2)\n- `-o, --output \u003Cpath>` — Custom output path (default: `\u003Cinput>@2x.png`)\n- `--json` — JSON output\n\n## Process\n\n1. Identify the diagram type from the user's request\n2. Read the relevant reference file if one exists for that type\n3. Plan the layout: list all components, determine grouping and flow direction, calculate positions\n4. Write the SVG following the layering order above\n5. Verify spacing rules — no overlaps, legends outside boundaries, viewBox large enough\n6. Save the SVG file\n7. Run `${BUN_X} {baseDir}\u002Fscripts\u002Fmain.ts \u003Csvg-path>` to generate @2x PNG\n8. Present both files to the user\n","# Diagram Generator\n\nCreate professional SVG diagrams across multiple diagram types. All output is a single self-contained `.svg` file with embedded styles and fonts.\n\n## Supported Diagram Types\n\n| Type | When to Use | Key Characteristics |\n|------|-------------|-------------------|\n| **Architecture** | System components & relationships | Grouped boxes, connection arrows, region boundaries |\n| **Flowchart** | Decision logic, process steps | Diamond decisions, rounded step boxes, directional flow |\n| **Sequence** | Time-ordered interactions between actors | Vertical lifelines, horizontal messages, activation bars |\n| **Structural** | Class diagrams, ER diagrams, org charts | Compartmented boxes, typed relationships (inheritance, composition) |\n| **Mind Map** | Brainstorming, topic exploration | Central node, radiating branches, organic layout |\n| **Timeline** | Chronological events | Horizontal\u002Fvertical axis, event markers, period spans |\n| **Illustrative** | Conceptual explanations, comparisons | Free-form layout, icons, annotations, visual metaphors |\n| **State Machine** | State transitions, lifecycle | Rounded state nodes, labeled transitions, start\u002Fend markers |\n| **Data Flow** | Data transformation pipelines | Process bubbles, data stores, external entities |\n\n## Design System\n\n### Color Palette\n\nSemantic colors for component categories:\n\n| Category | Fill (rgba) | Stroke | Use For |\n|----------|-------------|--------|---------|\n| Primary | `rgba(8, 51, 68, 0.4)` | `#22d3ee` (cyan) | Frontend, user-facing, inputs |\n| Secondary | `rgba(6, 78, 59, 0.4)` | `#34d399` (emerald) | Backend, services, processing |\n| Tertiary | `rgba(76, 29, 149, 0.4)` | `#a78bfa` (violet) | Database, storage, persistence |\n| Accent | `rgba(120, 53, 15, 0.3)` | `#fbbf24` (amber) | Cloud, infrastructure, regions |\n| Alert | `rgba(136, 19, 55, 0.4)` | `#fb7185` (rose) | Security, errors, warnings |\n| Connector | `rgba(251, 146, 60, 0.3)` | `#fb923c` (orange) | Buses, queues, middleware |\n| Neutral | `rgba(30, 41, 59, 0.5)` | `#94a3b8` (slate) | External, generic, unknown |\n| Highlight | `rgba(59, 130, 246, 0.3)` | `#60a5fa` (blue) | Active state, focus, current step |\n\nFor flowcharts and sequence diagrams, assign colors by role (actor, decision, process) rather than by technology.\n\n### Typography\n\nUse embedded SVG `@font-face` or system monospace fallback:\n\n```svg\n\u003Cstyle>\n  @import url('https:\u002F\u002Ffonts.googleapis.com\u002Fcss2?family=JetBrains+Mono:wght@400;500;600;700&amp;display=swap');\n  text { font-family: 'JetBrains Mono', 'SF Mono', 'Cascadia Code', monospace; }\n\u003C\u002Fstyle>\n```\n\nFont sizes by role:\n- **Title:** 16px, weight 700\n- **Component name:** 11-12px, weight 600\n- **Sublabel \u002F description:** 9px, weight 400, color `#94a3b8`\n- **Annotation \u002F note:** 8px, weight 400\n- **Tiny label (on arrows):** 7-8px\n\n### Core Visual Elements\n\n**Background:** `#0f172a` (slate-900) with subtle grid:\n```svg\n\u003Cdefs>\n  \u003Cpattern id=\"grid\" width=\"40\" height=\"40\" patternUnits=\"userSpaceOnUse\">\n    \u003Cpath d=\"M 40 0 L 0 0 0 40\" fill=\"none\" stroke=\"#1e293b\" stroke-width=\"0.5\"\u002F>\n  \u003C\u002Fpattern>\n\u003C\u002Fdefs>\n\u003Crect width=\"100%\" height=\"100%\" fill=\"#0f172a\"\u002F>\n\u003Crect width=\"100%\" height=\"100%\" fill=\"url(#grid)\"\u002F>\n```\n\n**Arrowhead marker (standard):**\n```svg\n\u003Cmarker id=\"arrow\" markerWidth=\"10\" markerHeight=\"7\" refX=\"9\" refY=\"3.5\" orient=\"auto\">\n  \u003Cpolygon points=\"0 0, 10 3.5, 0 7\" fill=\"#64748b\"\u002F>\n\u003C\u002Fmarker>\n```\n\n**Arrowhead marker (colored) — create per-color as needed:**\n```svg\n\u003Cmarker id=\"arrow-cyan\" markerWidth=\"10\" markerHeight=\"7\" refX=\"9\" refY=\"3.5\" orient=\"auto\">\n  \u003Cpolygon points=\"0 0, 10 3.5, 0 7\" fill=\"#22d3ee\"\u002F>\n\u003C\u002Fmarker>\n```\n\n**Open arrowhead (for async\u002Freturn messages):**\n```svg\n\u003Cmarker id=\"arrow-open\" markerWidth=\"10\" markerHeight=\"7\" refX=\"9\" refY=\"3.5\" orient=\"auto\">\n  \u003Cpolyline points=\"0 0, 10 3.5, 0 7\" fill=\"none\" stroke=\"#64748b\" stroke-width=\"1.5\"\u002F>\n\u003C\u002Fmarker>\n```\n\n### SVG Structure & Layering\n\nDraw elements in this order to get correct z-ordering (SVG paints back-to-front):\n\n1. Background fill + grid pattern\n2. Region\u002Fgroup boundaries (dashed outlines)\n3. Connection arrows and lines\n4. Opaque masking rects (same position as component boxes, `fill=\"#0f172a\"`)\n5. Component boxes (semi-transparent fill + stroke)\n6. Text labels\n7. Legend (bottom-right or bottom area, outside all boundaries)\n8. Title block (top-left)\n\nThe opaque masking rect trick is essential — semi-transparent component fills will show arrows underneath without it:\n```svg\n\u003C!-- Mask layer: opaque background to hide arrows -->\n\u003Crect x=\"100\" y=\"100\" width=\"160\" height=\"60\" rx=\"6\" fill=\"#0f172a\"\u002F>\n\u003C!-- Visual layer: styled component -->\n\u003Crect x=\"100\" y=\"100\" width=\"160\" height=\"60\" rx=\"6\" fill=\"rgba(8,51,68,0.4)\" stroke=\"#22d3ee\" stroke-width=\"1.5\"\u002F>\n\u003Ctext x=\"180\" y=\"125\" fill=\"white\" font-size=\"11\" font-weight=\"600\" text-anchor=\"middle\">API Gateway\u003C\u002Ftext>\n\u003Ctext x=\"180\" y=\"141\" fill=\"#94a3b8\" font-size=\"9\" text-anchor=\"middle\">Kong \u002F Nginx\u003C\u002Ftext>\n```\n\n### Spacing Rules\n\nThese prevent overlapping — follow them strictly:\n\n- **Component box height:** 50-70px (standard), 80-120px (large\u002Fcomplex)\n- **Minimum gap between components:** 40px vertical, 30px horizontal\n- **Arrow label clearance:** 10px from any box edge\n- **Region boundary padding:** 20px inside edges around contained components\n- **Legend placement:** At least 20px below the lowest diagram element\n- **Title block:** 20px from top-left, outside diagram content area\n- **viewBox:** Always extend to fit all content + 30px padding on all sides\n\n### Component Patterns\n\n**Standard box (service\u002Fprocess):**\n```svg\n\u003Crect x=\"X\" y=\"Y\" width=\"160\" height=\"60\" rx=\"6\" fill=\"#0f172a\"\u002F>\n\u003Crect x=\"X\" y=\"Y\" width=\"160\" height=\"60\" rx=\"6\" fill=\"FILL\" stroke=\"STROKE\" stroke-width=\"1.5\"\u002F>\n\u003Ctext x=\"CX\" y=\"Y+24\" fill=\"white\" font-size=\"11\" font-weight=\"600\" text-anchor=\"middle\">Name\u003C\u002Ftext>\n\u003Ctext x=\"CX\" y=\"Y+40\" fill=\"#94a3b8\" font-size=\"9\" text-anchor=\"middle\">description\u003C\u002Ftext>\n```\n\n**Decision diamond (flowchart):**\n```svg\n\u003Cg transform=\"translate(CX, CY)\">\n  \u003Cpolygon points=\"0,-35 50,0 0,35 -50,0\" fill=\"#0f172a\"\u002F>\n  \u003Cpolygon points=\"0,-35 50,0 0,35 -50,0\" fill=\"rgba(120,53,15,0.3)\" stroke=\"#fbbf24\" stroke-width=\"1.5\"\u002F>\n  \u003Ctext y=\"4\" fill=\"white\" font-size=\"10\" font-weight=\"600\" text-anchor=\"middle\">Condition?\u003C\u002Ftext>\n\u003C\u002Fg>\n```\n\n**Database cylinder:**\n```svg\n\u003Cg transform=\"translate(X, Y)\">\n  \u003Crect x=\"0\" y=\"10\" width=\"120\" height=\"50\" rx=\"2\" fill=\"#0f172a\"\u002F>\n  \u003Cellipse cx=\"60\" cy=\"10\" rx=\"60\" ry=\"12\" fill=\"#0f172a\"\u002F>\n  \u003Cellipse cx=\"60\" cy=\"60\" rx=\"60\" ry=\"12\" fill=\"#0f172a\"\u002F>\n  \u003Crect x=\"0\" y=\"10\" width=\"120\" height=\"50\" fill=\"rgba(76,29,149,0.4)\"\u002F>\n  \u003Cellipse cx=\"60\" cy=\"10\" rx=\"60\" ry=\"12\" fill=\"rgba(76,29,149,0.4)\" stroke=\"#a78bfa\" stroke-width=\"1.5\"\u002F>\n  \u003Cellipse cx=\"60\" cy=\"60\" rx=\"60\" ry=\"12\" fill=\"rgba(76,29,149,0.4)\" stroke=\"#a78bfa\" stroke-width=\"1.5\"\u002F>\n  \u003Cline x1=\"0\" y1=\"10\" x2=\"0\" y2=\"60\" stroke=\"#a78bfa\" stroke-width=\"1.5\"\u002F>\n  \u003Cline x1=\"120\" y1=\"10\" x2=\"120\" y2=\"60\" stroke=\"#a78bfa\" stroke-width=\"1.5\"\u002F>\n  \u003Ctext x=\"60\" y=\"40\" fill=\"white\" font-size=\"11\" font-weight=\"600\" text-anchor=\"middle\">PostgreSQL\u003C\u002Ftext>\n\u003C\u002Fg>\n```\n\n**Region boundary:**\n```svg\n\u003Crect x=\"X\" y=\"Y\" width=\"W\" height=\"H\" rx=\"12\" fill=\"none\" stroke=\"#fbbf24\" stroke-width=\"1\" stroke-dasharray=\"8,4\"\u002F>\n\u003Ctext x=\"X+12\" y=\"Y+16\" fill=\"#fbbf24\" font-size=\"9\" font-weight=\"600\">AWS us-east-1\u003C\u002Ftext>\n```\n\n**Security group:**\n```svg\n\u003Crect x=\"X\" y=\"Y\" width=\"W\" height=\"H\" rx=\"8\" fill=\"none\" stroke=\"#fb7185\" stroke-width=\"1\" stroke-dasharray=\"4,4\"\u002F>\n\u003Ctext x=\"X+10\" y=\"Y+14\" fill=\"#fb7185\" font-size=\"8\" font-weight=\"500\">VPC \u002F Security Group\u003C\u002Ftext>\n```\n\n## Type-Specific Layout Guidance\n\nDetermine this SKILL.md file's directory path as `{baseDir}`. Read the reference file for the specific diagram type before starting layout. Reference files are located at `{baseDir}\u002Freferences\u002F` and contain detailed layout algorithms and examples.\n\n### Architecture Diagrams\n→ Read `{baseDir}\u002Freferences\u002Farchitecture.md`\n\nKey points: left-to-right or top-to-bottom data flow. Group related services in region boundaries. Use buses\u002Fconnectors between layers. Place databases at the bottom or right.\n\n### Flowcharts\n→ Read `{baseDir}\u002Freferences\u002Fflowchart.md`\n\nKey points: top-to-bottom primary flow. Diamonds for decisions with Yes\u002FNo labels on exit arrows. Rounded rectangles for start\u002Fend. Use the Highlight color for the happy path.\n\n### Sequence Diagrams\n→ Read `{baseDir}\u002Freferences\u002Fsequence.md`\n\nKey points: actors as boxes at top, vertical dashed lifelines, horizontal arrows for messages (solid=sync, dashed=return). Time flows downward. Activation bars show processing. Number messages if complex.\n\n### Structural Diagrams\n→ Read `{baseDir}\u002Freferences\u002Fstructural.md`\n\nKey points: compartmented boxes (name \u002F attributes \u002F methods for class diagrams). Relationship lines: solid with filled diamond=composition, solid with empty diamond=aggregation, dashed arrow=dependency, solid triangle=inheritance.\n\n### Mind Maps\nFree-form radiating layout from a central concept. Use organic curves (`\u003Cpath>` with cubic beziers) for branches. Vary branch colors using the palette. Larger font for central node, decreasing as you go outward.\n\n### Timelines\nHorizontal or vertical axis line. Event markers as circles or diamonds on the axis. Description text offset to alternating sides to avoid overlap. Use color to categorize event types.\n\n### State Machines\nRounded-rect states with double-border for composite states. Filled circle for initial state, bullseye for final state. Curved arrows for self-transitions. Label all transitions with `event [guard] \u002F action` format.\n\n## Output Rules\n\n1. Output a **single `.svg` file** — no external dependencies except the Google Fonts import\n2. Set `viewBox` to fit all content with 30px padding; do NOT set fixed `width`\u002F`height` attributes (let the SVG scale responsively)\n3. Include `xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\"` on the root `\u003Csvg>` element\n4. Put all `\u003Cstyle>`, `\u003Cdefs>`, markers, and patterns at the top of the SVG\n5. Use `text-anchor=\"middle\"` for centered labels; ensure text doesn't overflow boxes\n6. **Chinese text support:** When labels contain Chinese characters, use `font-family: 'JetBrains Mono', 'Noto Sans SC', 'PingFang SC', sans-serif'` and increase box widths — CJK characters are wider\n7. **Save location:** If the input is a file, save to `{inputFileDir}\u002Fdiagram\u002F`. Otherwise save to `{projectDir}\u002Fdiagram\u002F{topic-slug}\u002F`. Create the directory if it doesn't exist\n\n## Script\n\nDetermine this SKILL.md file's directory path as `{baseDir}`. Script path: `{baseDir}\u002Fscripts\u002Fmain.ts`.\n\nResolve `${BUN_X}` runtime: if `bun` installed → `bun`; if `npx` available → `npx -y bun`; else suggest installing bun.\n\n### SVG → @2x PNG\n\nAfter saving the SVG, convert it to a @2x PNG:\n\n```bash\n${BUN_X} {baseDir}\u002Fscripts\u002Fmain.ts \u003Csvg-path> [options]\n```\n\nOptions:\n- `-s, --scale \u003Cn>` — Scale factor (default: 2)\n- `-o, --output \u003Cpath>` — Custom output path (default: `\u003Cinput>@2x.png`)\n- `--json` — JSON output\n\n## Process\n\n1. Identify the diagram type from the user's request\n2. Read the relevant reference file if one exists for that type\n3. Plan the layout: list all components, determine grouping and flow direction, calculate positions\n4. Write the SVG following the layering order above\n5. Verify spacing rules — no overlaps, legends outside boundaries, viewBox large enough\n6. Save the SVG file\n7. Run `${BUN_X} {baseDir}\u002Fscripts\u002Fmain.ts \u003Csvg-path>` to generate @2x PNG\n8. Present both files to the user\n",{"name":5,"version":24,"description":7},"1.117.3","main","d69096e239f2a89aabc2cd078c47664a9d3b1e11","07-后端与架构\u002Fbaoyu-diagram",3,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts","https:\u002F\u002Fgithub.com\u002Flza6","个人vx：Tf00798\r\n个人✈：@TFGY999","2026-10-08 14:29:22",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add lza6\u002FArmor-piercing-system-prompts --skill baoyu-diagram",{"tool":39,"command":40},"bunx","bunx skills add lza6\u002FArmor-piercing-system-prompts --skill baoyu-diagram",{"tool":42,"command":43},"pnpm","pnpm dlx skills add lza6\u002FArmor-piercing-system-prompts --skill baoyu-diagram","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fbaoyu-diagram\u002FSKILL.md",true,[47,53,57,61],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"references\u002Farchitecture.md","REFERENCE","参考文档",3137,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fbaoyu-diagram\u002Freferences\u002Farchitecture.md",{"path":54,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":55,"sourceHtmlUrl":56},"references\u002Fflowchart.md",2303,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fbaoyu-diagram\u002Freferences\u002Fflowchart.md",{"path":58,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":59,"sourceHtmlUrl":60},"references\u002Fsequence.md",3812,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fbaoyu-diagram\u002Freferences\u002Fsequence.md",{"path":62,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":63,"sourceHtmlUrl":64},"references\u002Fstructural.md",3687,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fbaoyu-diagram\u002Freferences\u002Fstructural.md",[66,73,78,85,92,99],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M7FFG485KY83TD6HSC4YPCMC","obsidian-clipper-template-creator","Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator\u002FSKILL.md",[],[],{"skillNo":74,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M7FFG0T6AZ0STEJPSB3CX84K","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator-antigravity-awesome-skills-main\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M7FFFY0QEM14SKWPDYGMXM2P","python-api","Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP\u002FmAP semantics, and source-style import diagnostics.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Fpython-api\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M7FFFVZQZ2GJ0C0TGP7JHD20","file-evaluation","Folder-based PASCAL VOC AP\u002FmAP evaluation from ground-truth and detection text files.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Ffile-evaluation\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":19},"01M7FFFSFNYSE77SJ6PE1CK2DA","object-detection-metrics","Guides legacy Object-Detection-Metrics PASCAL VOC AP\u002FmAP evaluation from detection text folders and direct Python API classes.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":19},"01M7FFFP0GCK1RVXBCPQ8APBMT","nx-workspace-patterns","Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fnx-workspace-patterns\u002FSKILL.md",[],[]]