agentic-patterns
Patterns from "Agentic Design Patterns" (Gulli & Sauco, 2025) applied to AI-powered diagram generation and multi-platform embedding
by TheLobbi★ 22 GitHub stars
Install agentic-patterns in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
Agentic Design Patterns — draw.io Diagramming
Patterns from "Agentic Design Patterns" (Gulli & Sauco, 2025) applied to AI-powered diagram generation and multi-platform embedding
Applied Patterns
Prompt Chaining
Relevance: Generating a high-quality draw.io diagram is a multi-stage pipeline — understanding intent, selecting diagram type, producing XML structure, applying styles, validating output, and embedding. Each stage feeds the next.
Current Implementation: Individual commands (drawio:create, drawio:style, drawio:export, drawio:embed) handle discrete steps. Users chain them manually.
Enhancement: Formalise a diagram generation chain: (1) intent extraction → extract entities, relationships, and domain from user input; (2) type selection → route to the correct diagram type from the 196-type catalog; (3) skeleton generation → produce minimal valid XML structure; (4) style application → apply theme and professional defaults; (5) quality critique → invoke the quality-critique skill; (6) export/embed → route to target platforms. Each step's output is the next step's input. Failed steps trigger targeted regeneration, not full restarts.
Reflection
Relevance: AI-generated XML diagrams frequently contain layout collisions, missing connections, style inconsistencies, or structural errors that degrade diagram quality.
Current Implementation: The quality-critique skill exists in skills/quality-critique/SKILL.md and provides post-generation analysis.
Enhancement: Embed reflection as an automatic loop within diagram generation, not a separate manual step. After initial XML generation, a reflection agent scores the diagram on five axes — completeness, layout clarity, style consistency, semantic accuracy, and platform compatibility — and produces a structured critique. The generator incorporates the critique and regenerates targeted sections. Allow up to three reflection passes before delivering the final diagram. Surface the final quality score to the user.
Planning
Relevance: Complex diagrams (C4 architecture, network topology, BPMN processes) require upfront layout strategy to avoid crowded, unreadable output. Ad hoc generation produces poor spatial organisation. Current Implementation: The diagram-architect agent uses domain knowledge to guide structure, but planning is implicit and embedded in the prompt. Enhancement: Add an explicit planning phase before XML generation. The planning agent produces: (1) a layer plan (which semantic layers will be created); (2) a spatial grid (rough coordinates for major element groups); (3) a connection manifest (all edges with source, target, and label); (4) a style plan (colour theme, shape families, font sizes). The XML generator then fills in this plan rather than generating freely, producing more predictable and maintainable output.
Tool Use
Relevance: Diagram generation requires coordinated use of multiple tools: code analysis tools (Grep, Glob, Read) to discover architecture facts, XML validation tools, MCP diagram servers for live editing, and embedding tools for each target platform.
Current Implementation: Commands invoke the appropriate tools within their scope. The MCP server integration (drawio:mcp-setup) enables programmatic diagram operations.
Enhancement: Define a tool manifest for diagram generation that explicitly maps diagram phases to tool sets. Code-analysis tools are called during the intent-extraction phase; XML tools during generation and validation; MCP tools during live-editing sessions; platform-specific export tools during embedding. Agents should declare their tool intent before calling, enabling tool-use logging and rate limiting for expensive operations (e.g., Firecrawl calls during enrichment).
Routing
Relevance: The plugin supports 196 diagram types across 20+ domains. Selecting the wrong type for a given context produces a diagram that fails to communicate its intent.
Current Implementation: The drawio:auto-diagram command uses heuristics to select diagram type. The CLAUDE.md routing table maps contexts to types.
Enhancement: Implement a diagram-type routing agent that scores multiple candidate diagram types for the given input using weighted criteria: domain fit, entity count, relationship density, target audience, and platform constraints. Present the top-3 candidates with rationale before generating, allowing the user to confirm or redirect. Store routing decisions in a session log to improve future routing.
Parallelization
Relevance: Multi-format export (SVG, PNG, PDF, .drawio.svg) and multi-platform embedding (GitHub, Confluence, Azure DevOps, Notion, Teams, Harness) are independent operations that do not need to be sequential.
Current Implementation: drawio:export and drawio:batch handle multiple outputs but execute sequentially.
Enhancement: Parallelise export and embedding operations. After a diagram is finalis
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the agentic-patterns skill do?
Patterns from "Agentic Design Patterns" (Gulli & Sauco, 2025) applied to AI-powered diagram generation and multi-platform embedding
How do I install the agentic-patterns skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the agentic-patterns skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
frontend-design
AnthropicGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
webapp-testing
AnthropicToolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
brand-guidelines
AnthropicApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
web-artifacts-builder
AnthropicSuite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…