SOLID and DRY structure for an Astro `src/` tree — where files live, size limits, and typed props. Use when deciding where new code belongs, adding or splitting an `.astro` page, layout, or component, or placing a service in `src/lib/` or a type in `src/interfaces/`.
74
92%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
The SOLID principles as house structure for the code that uses Astro's APIs. Follow these unless the project already does otherwise. Installing and configuring a UI framework, SolidJS among them, belongs to astro-integrations.
src/ and the files nearest this change — the component, the service, and the interface file for the same feature. Done when you can name the directory each of those three lives in and the naming convention it follows.src/ for every name you are about to write — the function, the component, the interface, and the concept behind them. Done when each name either returns no match or returns a file you have read and decided to extend.src/lib/ and no second definition of a type already in src/interfaces/.Load dry.md for the grep patterns and the extraction thresholds.
src/pages/ routes and composes — imports, one call into src/lib/, and markup made of components.
src/lib/ holds the data services: collection queries, API calls, shared helpers.
src/components/ and src/layouts/ turn props into markup.
src/interfaces/ holds every exported type, one [domain].interface.ts per domain.
Load architecture.md for the full tree, import directions, and naming.
Limits by kind: pages 50 lines, components 60, layouts and services 80, interface files 50. Anything else splits at 90 and stays under 100.
A file at its limit is a file holding a second responsibility — lift that responsibility into its own component or module rather than compressing lines.
A component imports its props type from src/interfaces/ and aliases it: type Props = BlogCardProps. Every exported function, type, and interface field carries a JSDoc block, and every value carries a concrete named type.
Load templates.md for the canonical interface, component, and service shapes.
ec801ae
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.