TheGoat395/Codex-Skills / skills/nextjs-site-architecture
nextjs-site-architecture
VerifiedCoordinate the Next.js foundation and ownership.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 1.5 KB |
| agents/openai.yaml | config | 299 B |
| references/nextjs-site-architecture-guide.md | markdown | 1.8 KB |
references/nextjs-site-architecture-guide.md
View on GitHub# Next.js Site Architecture Guide
## Lens
Architecture should let the design stay consistent while keeping pages easy to refine.
## Rules
- Inspect existing Next.js version, app/pages router, src directory, styling, and scripts.
- Keep page files as composition once sections grow.
- Use next/font or project-approved font loading.
- Use next/image or appropriate image strategy for real assets.
- Keep client components limited to interactions that need the client.
- Start independent route data together and avoid nesting that creates accidental waterfalls.
- Keep serialized Server Component props narrow and avoid request-specific mutable module state.
- Give route loading, error, not-found, and retry states intentional behavior.
- Route deep React/Next performance implementation and measurement through `$performance-audit-websites`.
## Useful Patterns
- src/app/page.tsx for composition.
- src/components/sections for page sections.
- src/components/ui for primitives.
- src/lib/content.ts for structured copy and content.
- src/app/globals.css for tokens and base styles.
## Avoid
- Putting all page logic, content, and styling in one huge file.
- Making the whole app a client component unnecessarily.
- Ignoring metadata and accessible document structure.
## Acceptance Criteria
- The site structure supports iteration and polish.
- Server/client ownership and critical data-loading paths are intentional.
- Build commands pass or failures are reported honestly.
## Shared scope
For applicable substantial web work, reuse the [shared scoped web contract](../../website-operating-rules/references/scoped-web-contract.md) when available. Preserve current authorization, stack and requested scope; this optional reference does not require another planning or approval cycle.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |