borghei/Claude-Skills / engineering/senior-frontend
senior-frontend
VerifiedScaffold Next.js 16 or React + Vite 8 apps, generate components with tests and stories, and flag heavy bundle dependencies. Use when starting a React project, adding components or hooks, or reviewing frontend code or performance.
assets/templates/component/hook.ts.tmpl
View on GitHubimport {{ useCallback, useState }} from 'react';
export interface Use{name}Options {{
/** The async work run() performs; replace with what this hook wraps. */
onRun?: () => Promise<void>;
}}
export interface Use{name}Return {{
isLoading: boolean;
error: Error | null;
run: () => Promise<void>;
}}
export function use{name}({{ onRun }}: Use{name}Options = {{}}): Use{name}Return {{
const [isLoading, setIsLoading] = useState(false);
const [error, setError] = useState<Error | null>(null);
const run = useCallback(async () => {{
setIsLoading(true);
setError(null);
try {{
await onRun?.();
}} catch (err) {{
setError(err instanceof Error ? err : new Error(String(err)));
}} finally {{
setIsLoading(false);
}}
}}, [onRun]);
return {{ isLoading, error, run }};
}}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |