diagram
Use this skill whenever a "diagram" is mentioned. Maintain and synchronize Unified Impact Diagrams following Diagram Driven Development (DDD) methodology. Create, update, and manage diagrams that connect user value to technical implementation.
What this skill does
# Diagram Driven Development (DDD) Skill
Maintain the `ai/diagrams` directory as the single source of truth for system understanding. All diagrams follow DDD principles, connecting Front-Stage (user experience) to Back-Stage (technical implementation) with clear impact annotations.
## Capabilities
1. **Create Diagrams** - Generate new diagrams for features, architectures, journeys, tests, and refactorings
2. **Update Diagrams** - Synchronize existing diagrams with code changes
3. **Audit Diagrams** - Identify outdated, missing, or low-quality diagrams
4. **Organize Diagrams** - Maintain consistent structure and naming conventions
5. **Index Management** - Keep README.md index up-to-date with all diagrams
6. **Quality Validation** - Ensure all diagrams follow DDD principles
## Quick Reference
For detailed instructions on each operation, see:
- [CREATE.md](references/CREATE.md) - Creating new diagrams
- [UPDATE.md](references/UPDATE.md) - Updating existing diagrams
- [AUDIT.md](references/AUDIT.md) - Auditing diagram quality and coverage
- [ORGANIZE.md](references/ORGANIZE.md) - Directory structure and naming
- [DDD_PRINCIPLES.md](references/DDD_PRINCIPLES.md) - Diagram Driven Development methodology
- [MERMAID_GUIDE.md](references/MERMAID_GUIDE.md) - Mermaid syntax patterns
## Directory Structure
```
ai/diagrams/
├── README.md # Index of all diagrams
├── features/ # Feature-specific diagrams
├── architecture/ # System architecture diagrams
├── journeys/ # User journey diagrams
├── tests/ # Test coverage diagrams
└── refactoring/ # Before/After improvement diagrams
```
## Common Workflows
### Initial Setup Workflow
1. User starts new project or adds DDD to existing project
2. Create `ai/diagrams/` directory structure
3. Generate initial system architecture diagram
4. Create README.md index
5. Document key user journeys
### New Feature Workflow
1. User requests new feature
2. Create feature diagram showing user value
3. Connect Front-Stage (UX) to Back-Stage (implementation)
4. Document related files and components
5. Update README.md index
### Code Change Workflow
1. Code is modified (new features, refactoring, etc.)
2. Identify affected diagrams
3. Update diagrams to reflect changes
4. Update "Last Updated" dates
5. Add change history entries
### Audit Workflow
1. User requests diagram audit
2. Scan all diagrams in `ai/diagrams/`
3. Check for outdated diagrams (compare dates with git)
4. Identify missing diagrams (features without diagrams)
5. Validate DDD quality (Front-Stage/Back-Stage, impact annotations)
6. Report findings and recommendations
### Refactoring Documentation Workflow
1. User plans code refactoring
2. Create "Before" diagram showing current state
3. Create "After" diagram showing improved state (highlight changes in #90EE90)
4. Add impact annotations explaining user benefits
5. Store in `refactoring/` directory
## Critical Instructions
**REQUIRED**: Before performing ANY diagram operations, you MUST load the relevant reference file(s) using the Read tool. These references contain essential DDD principles, quality standards, and operational procedures that are NOT included in this overview.
When the user asks to work with diagrams:
1. **Identify the operation** they want to perform (create, update, audit, organize)
2. **MANDATORY: Load the relevant reference file(s)** using the Read tool BEFORE executing any operations:
- Creating diagrams → Read `references/CREATE.md` AND `references/DDD_PRINCIPLES.md` FIRST
- Updating diagrams → Read `references/UPDATE.md` AND `references/DDD_PRINCIPLES.md` FIRST
- Auditing diagrams → Read `references/AUDIT.md` FIRST
- Organizing/restructuring → Read `references/ORGANIZE.md` FIRST
- Understanding DDD → Read `references/DDD_PRINCIPLES.md` FIRST
- Mermaid syntax help → Read `references/MERMAID_GUIDE.md` FIRST
3. **Execute diagram operations** following the exact patterns and quality standards from the loaded references
4. **Validate quality** using DDD principles checklist
5. **Update index** in README.md to reflect changes
6. **Confirm actions** and show diagram preview when possible
**DO NOT attempt to create or modify diagrams without first loading and reading the relevant reference documentation, especially DDD_PRINCIPLES.md.**
## DDD Core Principles (Brief)
Every diagram MUST include:
- ✅ **Front-Stage** (user experience) AND **Back-Stage** (implementation)
- ✅ **Impact Annotations** explaining user value of technical components
- ✅ **User Actions** as entry/exit points
- ✅ **Error Paths** and recovery options
- ✅ **Related Files** documentation
- ❌ NO custom fill colors (except `#90EE90` for Before/After changes)
- ❌ NO purely technical diagrams without user context
## Naming Conventions
### File Names
- Descriptive lowercase with hyphens
- Include diagram type prefix
- Format: `{type}-{descriptive-name}.md`
**Examples:**
- `feature-user-checkout-flow.md`
- `sequence-authentication-journey.md`
- `arch-system-overview.md`
- `flow-payment-processing.md`
### Type Prefixes
- `feature-` - Feature-specific diagrams
- `sequence-` - Sequence/journey diagrams
- `arch-` - Architecture diagrams
- `flow-` - Flow/process diagrams
- `test-` - Test coverage diagrams
## Diagram File Structure
```markdown
# [Diagram Title]
**Type:** [Feature Diagram | Sequence Diagram | Architecture Diagram | etc.]
**Last Updated:** [YYYY-MM-DD]
**Related Files:**
- `path/to/implementation.ts`
- `path/to/component.tsx`
## Purpose
[1-2 sentence description of what user value this diagram illustrates]
## Diagram
\`\`\`mermaid
[Mermaid diagram code following DDD principles]
\`\`\`
## Key Insights
- [User impact point 1]
- [User impact point 2]
- [Technical enabler point 1]
## Change History
- **YYYY-MM-DD:** [Description of change]
```
## Quality Checklist
Before storing any diagram, verify:
- [ ] Shows both Front-Stage (user experience) AND Back-Stage (implementation)
- [ ] Impact annotations explain user value
- [ ] User actions are clearly visible
- [ ] Error paths shown
- [ ] NO custom fill colors (except #90EE90 for changes)
- [ ] Related code files documented
- [ ] Last updated date is current
- [ ] Key insights explain user impact
- [ ] Mermaid syntax is valid
## Best Practices
1. **Keep diagrams synchronized** - Outdated diagrams are worse than no diagrams
2. **Follow DDD principles** - Every diagram connects user value to implementation
3. **Use subdirectories** - Organize by type to prevent chaos
4. **Maintain the index** - README.md is the entry point
5. **Document changes** - Update change history when modifying
6. **Validate quality** - Run through DDD checklist before saving
7. **Reference code files** - Link diagrams to actual implementation
8. **Show error paths** - Don't just show happy paths
9. **Use consistent naming** - Predictable names enable navigation
10. **Update after code changes** - Diagrams must reflect current state
## Integration with Other Skills
- **review** - Reference diagrams during code reviews to explain impact
- **github** - Link diagrams in issue descriptions for context
- **chrome-devtools** - Use diagrams to plan testing flows
## Examples
### Create feature diagram
```
User: "Create a diagram for the new notification system"
Agent:
1. Reads references/CREATE.md and references/DDD_PRINCIPLES.md
2. Analyzes notification feature code
3. Creates feature-notification-system.md in features/
4. Includes user journey and technical implementation
5. Adds impact annotations
6. Updates README.md index
```
### Update after refactoring
```
User: "We just refactored the auth flow, update the diagram"
Agent:
1. Reads references/UPDATE.md
2. Finds sequence-authentication-journey.md
3. Compares with new code
4. Updates diagram with changes
5. Updates "Last Updated" date
6. Adds change history entry
```
### Audit all diagrams
```
User: Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.