Agent skill
scaffold-component
Créer un composant React/TypeScript/Tailwind. TRIGGERS : créer composant, scaffold-ui, nouveau composant, ajouter composant
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/scaffold-component
SKILL.md
Scaffold Component React
Procédure
1. Vérifier l'existant
# Chercher composants similaires
find src/components -name "*.tsx" -type f | head -20
2. Créer le composant
Structure standard :
import { useState } from 'react';
interface ${ComponentName}Props {
// Props typées
}
export function ${ComponentName}({ ...props }: ${ComponentName}Props) {
const [loading, setLoading] = useState(false);
const [error, setError] = useState<string | null>(null);
// États
if (loading) {
return <div data-testid="${component-name}-loading">Chargement...</div>;
}
if (error) {
return (
<div data-testid="${component-name}-error" className="text-red-500">
{error}
</div>
);
}
return (
<div data-testid="${component-name}">
{/* Contenu */}
</div>
);
}
3. Checklist
- Props typées avec interface
- États : loading, vide, erreur, succès
-
data-testidsur éléments critiques - Pas de secrets dans le code
4. Valider
Utiliser /validate-ui pour confirmer 0 erreur console.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?