aossie-org/pictopy/add-frontend-feature

Claude Code and agent skill by aossie-org/pictopy

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Scaffold a frontend feature in PictoPy — Redux slice, API wrapper, hook, component, and test. Use when adding UI, a new screen, or frontend state.

Install

npx vskill@latest install aossie-org/pictopy/add-frontend-feature

SKILL.md

Add a frontend feature

A feature spans state, data access, and presentation. Build it in that order — bottom up — so each layer is testable before the next depends on it.

$1 is the feature name in camelCase (videos, faceClusters, memories).

Read agent-kit/references/frontend-feature-walkthrough.md for the video feature traced from slice to component.

1. Types — src/types/

Define the shape the backend actually returns. Check the FastAPI response model in backend/app/routes/<resource>.py rather than guessing — the two must agree, and the backend is the source of truth.

2. API layer — two files, both required

  1. src/api/apiEndpoints.ts — add a <feature>Endpoints object. Parameterised URLs are

functions that encodeURIComponent their arguments.

  1. src/api/api-functions/<feature>.ts — a typed wrapper per endpoint, using the shared

apiClient from ../axiosConfig, returning Promise<APIResponse>.

Components never call axios directly. If you find yourself importing axios into a component, the wrapper is missing.

3. State — src/features/

Template: agent-kit/templates/slice.ts.md.

  • <feature>Slice.ts — Redux Toolkit createSlice.
  • <feature>Selectors.ts — derived data lives here, not in components.
  • <feature>Thunks.ts — only if the feature needs async orchestration beyond a hook.

Keep reducers total: validate indices and ranges inside the reducer, not at the call site. setCurrentViewIndex in src/features/videoSlice.ts is the reference.

Register the reducer in the store (src/store/).

4. Hook — src/hooks/use<Feature>.ts

Bridges the API layer and the store, and is where components get their data. Existing hooks use React Query alongside Redux — follow whichever the neighbouring feature uses rather than introducing a third pattern.

5. Component — src/components/<Area>/

  • src/components/ui/ is generated by shadcn. Do not hand-edit it.
  • Tailwind v4 with prettier-plugin-tailwindcss. Never hand-order class names.
  • Import through @/, which resolves to frontend/src.
  • No `TODO` or `FIXME` comments. ESLint treats them as errors and CI fails.

6. Tests — __tests__/ beside the code

Template: agent-kit/templates/component.test.tsx.md.

Jest + React Testing Library. Test through rendered output, not implementation details. Cover the loading state, the populated state, and the empty state — empty states are where this codebase has had regressions.

7. Verify

bash
cd frontend && npm run lint:check && npm run format:check && npm test

If format:check fails, run npm run format:fix rather than editing by hand.

Checklist

  • [ ] Types in src/types/, matching the backend response model
  • [ ] <feature>Endpoints in src/api/apiEndpoints.ts
  • [ ] Wrappers in src/api/api-functions/<feature>.ts using apiClient
  • [ ] <feature>Slice.ts and <feature>Selectors.ts, reducer registered in the store
  • [ ] use<Feature>.ts hook
  • [ ] Component under src/components/<Area>/, no hand-ordered Tailwind classes
  • [ ] Tests covering loading, populated, and empty
  • [ ] No TODO or FIXME anywhere in the diff
  • [ ] lint:check, format:check, and npm test all pass

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
306
Repository forks
733
7-day trend score
0

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/aossie-org/pictopy/add-frontend-feature/badge)](https://verified-skill.com/skills/aossie-org/pictopy/add-frontend-feature)

Something wrong with this skill or its page? Tell us.