$npx -y skills add fusengine/agents --skill solid-astroUse when applying SOLID principles and clean architecture to Astro projects. Enforces files < 100 lines, src/interfaces/ for types, JSDoc on all exports, modular directory structure, and DRY enforcement.
| 1 | # SOLID Astro — Modular Architecture |
| 2 | |
| 3 | ## Agent Workflow (MANDATORY) |
| 4 | |
| 5 | Before ANY implementation, use `TeamCreate` to spawn 3 agents: |
| 6 | |
| 7 | 1. **fuse-ai-pilot:explore-codebase** - Analyze project structure, naming, and existing patterns |
| 8 | 2. **fuse-ai-pilot:research-expert** - Verify Astro 7 architecture best practices via Context7/Exa |
| 9 | 3. **mcp__context7__query-docs** - Check Astro component API and TypeScript integration |
| 10 | |
| 11 | After implementation, run **fuse-ai-pilot:sniper** for validation. |
| 12 | |
| 13 | --- |
| 14 | |
| 15 | ## Codebase Analysis (MANDATORY) |
| 16 | |
| 17 | Before ANY implementation: |
| 18 | |
| 19 | 1. Explore `src/` directory to understand existing architecture |
| 20 | 2. Read existing similar files to follow established naming and patterns |
| 21 | 3. Grep for similar function/component names before creating new ones |
| 22 | 4. Identify where interfaces, utilities, and shared logic live |
| 23 | |
| 24 | --- |
| 25 | |
| 26 | ## DRY Enforcement (MANDATORY) |
| 27 | |
| 28 | Before writing ANY new code: |
| 29 | |
| 30 | 1. **Grep for similar logic** — function names, class patterns, component names |
| 31 | 2. Check `src/lib/` for existing utilities |
| 32 | 3. Check `src/components/` for existing UI components |
| 33 | 4. If logic appears in 2+ places → extract to `src/lib/` |
| 34 | 5. If types appear in 2+ files → move to `src/interfaces/` |
| 35 | |
| 36 | --- |
| 37 | |
| 38 | ## Absolute Rules |
| 39 | |
| 40 | - Files < 100 lines — split at 90 |
| 41 | - All types in `src/interfaces/` — never in component files |
| 42 | - JSDoc mandatory on all exported functions |
| 43 | - No business logic in `src/pages/` |
| 44 | |
| 45 | See `references/architecture.md`, `references/file-limits.md`, `references/solid-principles.md`. |
| 46 | |
| 47 | --- |
| 48 | |
| 49 | ## Reference Guide |
| 50 | |
| 51 | ### Concepts |
| 52 | |
| 53 | | Topic | Reference | When to Consult | |
| 54 | |-------|-----------|-----------------| |
| 55 | | SOLID principles | [solid-principles.md](references/solid-principles.md) | Architecture decisions | |
| 56 | | File limits | [file-limits.md](references/file-limits.md) | When and how to split files | |
| 57 | | Interfaces | [interfaces.md](references/interfaces.md) | TypeScript type organization | |
| 58 | | Architecture | [architecture.md](references/architecture.md) | Directory structure | |
| 59 | | DRY enforcement | [dry-enforcement.md](references/dry-enforcement.md) | Avoiding duplication | |
| 60 | | JSDoc | [jsdoc.md](references/jsdoc.md) | Documentation standards | |
| 61 | |
| 62 | ### Templates |
| 63 | |
| 64 | | Template | When to Use | |
| 65 | |----------|-------------| |
| 66 | | [component.md](references/templates/component.md) | Astro component with props + JSDoc | |
| 67 | | [layout.md](references/templates/layout.md) | Layout component with slots | |
| 68 | | [service.md](references/templates/service.md) | Data fetching service function | |
| 69 | | [interface.md](references/templates/interface.md) | TypeScript interface file | |
| 70 | |
| 71 | --- |
| 72 | |
| 73 | ## Forbidden |
| 74 | |
| 75 | - Files > 100 lines (split at 90) |
| 76 | - TypeScript interfaces in component `.astro` files |
| 77 | - Business logic in `src/pages/` files |
| 78 | - Direct CMS/API calls in components (use `src/lib/` services) |
| 79 | - Copy-pasting logic instead of extracting shared function |
| 80 | - Missing JSDoc on exported functions, components, and types |
| 81 | - `any` TypeScript type |