.claude/skills/new-page/SKILL.md
Add a new page to the app following project conventions. Use when the user runs /new-page or asks to create a new route or page.
npx skillsauth add mark-lengyel-attrecto/movies-app-react new-pageInstall 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.
Create a new page following the project's established patterns. Work through these steps in order.
Current routes:
!find src/app -name "page.tsx" | sort
Current feature domains:
!ls src/features/
If the user hasn't specified the following, ask before writing any code:
movies/popular, tv/[id])movies, tv, search, or a new one?)Create src/app/[locale]/<route>/page.tsx as a thin shell:
<Name>PageClient component from features/generateMetadata for the page title using getTranslations from next-intl/serverCreate src/features/<domain>/components/<PageName>PageClient.tsx with 'use client' at the top.
InfiniteGrid from @/components/media/InfiniteGrid with a toMedia adapter from @/components/media/normalize — do NOT create a new grid componentMovieDetail or the TV detail componentSkip this step for pure server-rendered pages with no interactivity.
In src/features/<domain>/api/use-<resource>.ts:
<resource>Keys object with typed query key factoriesAdd a namespace for this page to both messages/en.json and messages/hu.json.
Minimum: a title key consumed by generateMetadata. Add any other UI strings the component needs.
If the page needs a nav entry, update src/components/layout/Header.tsx:
NavDropdown items array, or add a new NavDropdownhref values are locale-relative paths (e.g. /movies/popular) — the locale prefix is added automaticallyRun npm run lint and fix any issues before reporting done.
development
Sync AI documentation (CLAUDE.md, AGENTS.md, memory files) with recent code changes. Use when the user runs /sync-ai-docs, has just finished writing code manually, has completed a notable feature or refactor, or asks to update/sync the project AI docs.
development
Detect unused files, exports, and dependencies with knip. Use when the user runs /find-dead-code or asks to find dead code, unused exports, or unused dependencies.
development
Validate that all translation keys used in source code exist in both en.json and hu.json. Use when the user runs /check-i18n or wants to audit translation completeness.
development
Audit the codebase for project-specific convention violations. Use when the user runs /check-conventions or asks to validate that the code follows project conventions.