claude-code-framework/essential/skills/scaffolding/test-scaffold/SKILL.md
Generates test files for components and functions with setup, basic tests, and mocks. Use when user says "add tests", "create test", "test this component", or mentions testing.
npx skillsauth add tokenized2027/claude-initilization-v7 test-scaffoldInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
// components/Button.test.tsx
import { render, screen, fireEvent } from '@testing-library/react'
import { Button } from './Button'
describe('Button', () => {
it('renders with children', () => {
render(<Button>Click me</Button>)
expect(screen.getByText('Click me')).toBeInTheDocument()
})
it('calls onClick when clicked', () => {
const handleClick = jest.fn()
render(<Button onClick={handleClick}>Click me</Button>)
fireEvent.click(screen.getByText('Click me'))
expect(handleClick).toHaveBeenCalledTimes(1)
})
it('applies variant styles', () => {
const { container } = render(<Button variant="danger">Delete</Button>)
expect(container.firstChild).toHaveClass('bg-red-600')
})
})
// app/api/users/route.test.ts
import { GET, POST } from './route'
import { NextRequest } from 'next/server'
describe('/api/users', () => {
describe('GET', () => {
it('returns users list', async () => {
const request = new NextRequest('http://localhost:3000/api/users')
const response = await GET(request)
const data = await response.json()
expect(response.status).toBe(200)
expect(data.success).toBe(true)
expect(Array.isArray(data.data)).toBe(true)
})
})
describe('POST', () => {
it('creates user with valid data', async () => {
const request = new NextRequest('http://localhost:3000/api/users', {
method: 'POST',
body: JSON.stringify({ name: 'Alice', email: '[email protected]' })
})
const response = await POST(request)
const data = await response.json()
expect(response.status).toBe(201)
expect(data.success).toBe(true)
})
})
})
development
Methodical debugging using reproducible steps, instrumentation, and root-cause analysis. Use when something is broken and you don't know why. Triggers on "bug", "broken", "not working", "error", "fails intermittently", "regression", "unexpected behavior".
development
Optimize prompts for Claude Code agents, API calls, and multi-agent orchestration. Use when writing system prompts, agent instructions, or refining LLM interactions. Triggers on "improve prompt", "write a prompt", "agent instructions", "system prompt", "prompt not working", "LLM output quality".
tools
Structured ideation and design review before any creative or constructive work. Use before building features, components, architecture, dashboards, or automation workflows. Triggers on "plan this", "design this", "brainstorm", "think through", "what should we build", "how should I approach".
development
Generates React components with TypeScript, props interface, and example usage. Use when user says "create component", "new component", "add React component", or mentions creating UI elements.