add-component
Skill15 starsChanged 5 months agoMITView on GitHub
Create new Astro or Svelte components with correct patterns. Use proactively when creating new UI components.
7 other projects use a version of this.
Adopted by
Most recently taken up by
- IntelliHelper/agent-skillstheir own version, first seen Oct 20, 2026
- jpicklyk/task-orchestratortheir own version, first seen Oct 17, 2026
- Azure-Samples/art-voice-agent-acceleratortheir own version, first seen Oct 8, 2026
- lbedner/aegis-stacktheir own version, first seen Oct 8, 2026
- signerlabs/ShipSwifttheir own version, first seen Oct 8, 2026
- dperezcabrera/pico-skillstheir own version, first seen Jul 29, 2026
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- signerlabs/ShipSwift★ 3.3ksame name
- jpicklyk/task-orchestrator★ 214same name
- lbedner/aegis-stack★ 146same name
- ahpxex/open-dashboard★ 136same name
- Azure-Samples/art-voice-agent-accelerator★ 74same name
- dperezcabrera/pico-skills★ 4same name
- IntelliHelper/agent-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository21 other files it gives its agents.
- AGENTS.mdAGENTS.md
- public/llms-full.txtllms.txt
- public/llms.txtllms.txt
- add-diagram-componentSkill
- add-languageSkill
- add-pageSkill
- ai-diff-reviewerSkill
- dailybotSkill
- deepworkplanSkill
- doc-editSkill
- fix-lintSkill
- git-commit-pushSkill
- pr-review-liteSkill
- quick-fixSkill
- refactor-safeSkill
- responsive-lighthouse-auditSkill
- security-checkSkill
- translate-syncSkill
- type-fixSkill
- update-stylesSkill
- write-testsSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 5 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 20
Create new Astro (.astro) or Svelte (.svelte) components following project patterns.
- Distinctive: line 24
Does NOT create entire features (just components)
- Distinctive: line 25
Does NOT modify existing components
- Distinctive: line 26
Does NOT create pages (use add-page skill)
- Distinctive: line 54
No user interactions needed
- Very specific: line 84
Use the paper/ink palette tokens (bg-paper text-ink) and the oxblood --color-secondary accent (text-secondary) — no indigo, no multi-color, …
- Very specific: line 98
i18n Requirement: If the component displays user-visible text, it MUST accept a lang prop and use getTranslations(lang) for all text.
- Distinctive: line 203
Stop and escalate: if:
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Skill: Add Component
Objective
Create new Astro (.astro) or Svelte (.svelte) components following project patterns. This skill guides the decision of which technology to use and where to place the component.
Non-Goals
- Does NOT create entire features (just components)
- Does NOT modify existing components
- Does NOT create pages (use add-page skill)
Tier Classification
Tier: 1 - Light/Cheap
Reasoning: Creating a single component is mechanical, follows clear patterns, and has low risk. Decision tree for Astro vs Svelte is straightforward.
Inputs
Required Parameters
$NAME: Component name (PascalCase, e.g.,UserCard)$PURPOSE: What the component does
Optional Parameters
$LOCATION: Where to place (default: infer from purpose)$TYPE: Forceastroorsvelte(default: auto-select)
Decision: Astro vs Svelte
Use Astro (.astro) When:
- Static content only
- Server-rendered, no client JavaScript needed
- SEO-critical content (meta tags, structured data)
- Wrapping other components (layouts, containers)
- No user interactions needed
Examples: Footer.astro, MethodologyCard.astro, HeroSection.astro
Use Svelte (.svelte) When:
- Interactive UI (click handlers, hover effects)
- Client-side state management needed
- Animations or transitions
- Real-time updates
- Form inputs with validation
Examples: Header.svelte, ScrollSpyNav.svelte, MobileMenu.svelte
Component Locations
| Location | Purpose |
src/components/ | Standalone utilities |
src/components/home/ | Homepage sections |
src/components/layout/ | Layout (Header, Menu) |
src/components/editorial/ | Editorial primitives (Kicker, Rule, Figure, Lead, Reference) |
src/components/pages/ | Shared *Page.astro page components |
Editorial Design System
This site uses "The Broadsheet" editorial newsprint system. New components should fit it:
- Reuse the editorial primitives in
src/components/editorial/(Kicker, Rule, Figure, Lead, Reference) instead of re-implementing eyebrows, hairline rules, captions, or drop caps. - Use the paper/ink palette tokens (
bg-paper text-ink) and the oxblood--color-secondaryaccent (text-secondary) — no indigo, no multi-color, no glow, noprose-slate. - Headings use serif
.font-display; page-width wrappers use.main-container. - See the
update-stylesskill for the full token + primitive reference.
Steps
Step 1: Determine Type and Location
- Analyze purpose → Astro or Svelte?
- Determine folder based on component role
Step 2: Create Component
i18n Requirement: If the component displays user-visible text, it MUST accept a lang prop and use getTranslations(lang) for all text. Never hardcode user-visible strings directly in templates. If new translation keys are needed, add them to src/lib/translations.ts in BOTH English and Spanish.
Astro Template (with i18n):
---
import { getTranslations } from '@/lib/translations';
import type { Language } from '@/lib/translations';
interface Props {
lang: Language;
description?: string;
}
const { lang, description } = Astro.props;
const t = getTranslations(lang);
---
<div class="bg-white dark:bg-gray-800 p-4 rounded-lg">
<h2 class="text-xl font-bold text-gray-900 dark:text-white">{t.section.title}</h2>
{description && <p class="text-gray-600 dark:text-gray-300">{description}</p>}
</div>Svelte Template (with i18n):
<script lang="ts">
import { getTranslations } from '@/lib/translations';
export let lang: string = 'en';
export let onClick: (() => void) | undefined = undefined;
$: t = getTranslations(lang);
</script>
<button
class="px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600 dark:bg-blue-600 dark:hover:bg-blue-700"
on:click={onClick}
>
{t.section.buttonLabel}
</button>Note: Components that only display props (no hardcoded text) do not need the lang prop or getTranslations().
Step 3: Validate
pnpm run biome:check
pnpm run astro:checkOutput Format
Success Output
## ✅ Component Created
### Component
- Name: {ComponentName}
- Type: {Astro|Svelte}
- Location: `src/components/{path}/{ComponentName}.{astro|svelte}`
### Features
- Props: {list of props}
- Dark mode: ✅
- TypeScript: ✅
### Usage
\`\`\`astro
---
import {ComponentName} from '@/components/{path}/{ComponentName}.{ext}';
---
<{ComponentName} {client:load if svelte} title="Example" />
\`\`\`
### Validation
- Biome: ✅
- Astro: ✅
### Commit Message
feat: add {ComponentName} componentGuardrails
Scope Limits
- Maximum files: 3 (component + optional subcomponents)
- Maximum LOC: 150
Required Patterns
- Props interface defined (TypeScript)
- Dark mode support (
dark:Tailwind classes) - Accessible (aria labels if interactive)
- No hardcoded user-visible text (use
getTranslations(lang)) - New translation keys added for both en and es in
translations.ts(if applicable)
Stop Conditions
Stop and escalate if:
- Component requires complex state management
- Needs to create multiple interconnected components
- Requires architectural decisions
Definition of Done
- Component file created
- Props interface defined
- Dark mode classes included
- No hardcoded user-visible text (uses
getTranslations()if text is displayed) - New translation keys added for both languages (if applicable)
- Component accepts
langprop if it displays text pnpm run biome:checkpassespnpm run astro:checkpasses
Examples
Example 1: Static Card (Astro)
Input:
$NAME: FeatureCard
$PURPOSE: Display a feature with icon and descriptionResult: Creates src/components/FeatureCard.astro
Example 2: Interactive Button (Svelte)
Input:
$NAME: ThemeButton
$PURPOSE: Toggle between light and dark modeResult: Creates src/components/ThemeButton.svelte
Related
- add-page - Create pages
- translate-sync - Synchronize translations
- update-styles - Style modifications
- reviewer - Review components
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

