backend-endpoint
Create REST/GraphQL API endpoint with validation, error handling, and tests. Auto-invoke when user says "add endpoint", "create…
Generate frontend component tests (React Testing Library, Vue Test Utils, snapshot) for existing components. Auto-invoke when user says "test this component", "write component test", or "add component test".
Claude Code
$ npx -y skills add qf-studio/navigator --skill frontend-test --agent claude-code
Codex
$ npx skills add qf-studio/navigator --skill frontend-test -a codex -y
Cursor
$ npx skills add qf-studio/navigator --skill frontend-test -a cursor -y
Gemini CLI
$ npx skills add qf-studio/navigator --skill frontend-test -a gemini-cli -y
GitHub Copilot
$ npx skills add qf-studio/navigator --skill frontend-test -a github-copilot -y
OpenCode
$ npx skills add qf-studio/navigator --skill frontend-test -a opencode -y
Windsurf
$ npx skills add qf-studio/navigator --skill frontend-test -a windsurf -y
name: frontend-test description: Generate frontend component tests (React Testing Library, Vue Test Utils, snapshot) for existing components. Auto-invoke when user says "test this component", "write component test", or "add component test". allowed-tools: Read, Write, Edit, Grep, Glob, Bash version: 2.0.0
Generate component tests for **existing components** — typically components written without tests, or where additional coverage is needed beyond what `frontend-component` already produced.
> **When to use this vs. `frontend-component`**: `frontend-component` generates tests as part of creating a new component. Use `frontend-test` when the component already exists and you need to add or expand its tests.
Auto-invoke when user says:
PLUGIN_DIR="${CLAUDE_PLUGIN_ROOT:-$(cat "${NAVIGATOR_CONFIG_HOME:-${XDG_CONFIG_HOME:-$HOME/.config}/navigator}/plugin-root" 2>/dev/null)}"
[ -d "$PLUGIN_DIR/skills" ] || PLUGIN_DIR="$HOME/.claude/plugins/marketplaces/navigator-marketplace"
python3 "$PLUGIN_DIR/skills/nav-graph/functions/graph_manager.py" \
--action query --concept frontend \
--graph-path .agent/knowledge/graph.json 2>/dev/null | head -40
python3 "$PLUGIN_DIR/skills/nav-graph/functions/graph_manager.py" \
--action query --concept testing \
--graph-path .agent/knowledge/graph.json 2>/dev/null | head -40Look for patterns about test utilities used (RTL vs Enzyme), snapshot policy, accessibility-test conventions.
Ask if not specified:
Which component should I test? - File path (e.g., src/components/UserProfile.tsx) - Component name (e.g., UserProfile)
Read the component in full so generated tests cover actual behavior (props handled, events emitted, conditional rendering, etc.).
# React Testing Library grep -q '"@testing-library/react"' package.json 2>/dev/null && echo "RTL detected" # Vue Test Utils grep -q '"@vue/test-utils"' package.json 2>/dev/null && echo "Vue Test Utils detected" # Test runner grep -q '"vitest"' package.json 2>/dev/null && echo "Vitest" grep -q '"jest"' package.json 2>/dev/null && echo "Jest"
Check for `setupTests.ts` / `vitest.setup.ts` to understand global utilities and matchers.
**File location**: colocate with the component (`UserProfile.test.tsx` next to `UserProfile.tsx`) unless the project convention is otherwise.
**Structure (RTL + Vitest/Jest)**:
import { describe, it, expect, vi } from 'vitest'; // or '@jest/globals'
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { {COMPONENT_NAME} } from './{COMPONENT_NAME}';
describe('{COMPONENT_NAME}', () => {
describe('rendering', () => {
it('renders with required props', () => {
render(<{COMPONENT_NAME} {...{REQUIRED_PROPS}} />);
expect(screen.getByRole('{ROLE}')).toBeInTheDocument();
});
it('renders conditional content when prop is set', () => {
render(<{COMPONENT_NAME} {...{REQUIRED_PROPS}} {OPTIONAL_PROP} />);
expect(screen.getByText('{EXPECTED_TEXT}')).toBeInTheDocument();
});
});
describe('interactions', () => {
it('calls onClick handler when clicked', async () => {
const user = userEvent.setup();
const onClick = vi.fn();
render(<{COMPONENT_NAME} {...{REQUIRED_PROPS}} onClick={onClick} />);
await user.click(screen.getByRole('button'));
expect(onClick).toHaveBeenCalledOnce();
});
});
describe('accessibility', () => {
it('has accessible name', () => {
render(<{COMPONENT_NAME} {...{REQUIRED_PROPS}} />);
expect(screen.getByRole('{ROLE}')).toHaveAccessibleName();
});
});
});**Snapshot tests**: only generate if the project's existing tests use them (check peer test files first). They're easy to over-rely on; prefer assertion-based tests for behavior, snapshots only for stable visual structure.
{TEST_COMMAND} {COMPONENT_NAME}If tests fail because they assume incorrect behavior, fix the tests. Only fix the component if it's actually buggy — surface that to the user.
{
"execution_summary": {
"skill": "frontend-test",
"task": "tests for {COMPONENT_NAME}",
"files_created": ["{test file path}"],
"files_modified": [],
"tests_added": ["{test file path}"],
"stack_detected": "{e.g. react+rtl+vitest}",
"patterns_followed": [
{"summary": "{e.g. queries via getByRole, not getByTestId}", "concepts": ["frontend", "testing"], "confidence": 0.85}
],
"decisions_made": [
{"summary": "{e.g. asserted accessible name instead of snapshot to avoid brittleness}", "concepts": ["testing"], "confidence": 0.8}
],
"pitfalls_avoided": [
{"summary": "{e.g. used userEvent.setup() not fireEvent — RTL recommendation}", "concepts": ["testing"], "confidence": 0.85}
],
"assumptions_made": ["{e.g. project uses Vitest globals from setup file}"]
}
}Ingest:
PLUGIN_DIR="${CLAUDE_PLUGIN_ROOT:-$(cat "${NAVIGATOR_CONFIG_HOME:-${XDG_CONFIG_HOME:-$HOME/.config}/navigator}/plugin-root" 2>/dev/null)}"
[ -d "$PLUGIN_DIR/skills" ] || PLUGIN_DIR="$HOME/.claude/plugins/marketplaces/navigator-marketplace"
echo '<execution_summary JSON>' | python3 "$PLUGIN_DIR/skills/nav-graph/functions/execution_to_graph.py" -Create REST/GraphQL API endpoint with validation, error handling, and tests. Auto-invoke when user says "add endpoint", "create…
Generate backend tests (unit, integration, mocks) for existing code. Auto-invoke when user says "write test for", "add test",…
Create database migration with schema changes and rollback. Auto-invoke when user says "create migration", "add table", "modify…
Create React/Vue component with TypeScript, tests, and styles. Auto-invoke when user says "create component", "add component",…
Render a one-screen intent brief (Goal/Scope/Approach/Limits/Verify/Won't-do/Contradiction) before implementing ambiguous…
Clear conversation context while preserving knowledge via context marker. Use when user says "clear context", "start fresh",…
Use your assigned AgentMail inbox to read email tasks, explicitly send or reply, and check delivery. Provided automatically by…
Create a new Architecture Decision Record with sequential numbering and AgentDB registration