Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/soulcodex/agentic/next-application-structurenpx skills add soulcodex/agentic --skill next-application-structuregit clone --depth 1 https://github.com/soulcodex/agenticWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00064 | $0.00624 |
| Opus 5 | $0.00032 | $0.00312 |
| Sonnet 5 | $0.00013 | $0.00125 |
| Haiku 4.5 | $0.00006 | $0.00062 |
Grade A, and why
next-application-structure scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Next Application Structure Skill
Step 1 — App Router Directory Layout
Organise by route segment and feature ownership:
src/
app/
(marketing)/
page.tsx
(app)/
dashboard/
page.tsx
loading.tsx
error.tsx
api/
auth/
route.ts
layout.tsx
features/
auth/
components/
server/
client/
auth.types.ts
components/
ui/
lib/
db/
auth/
validation/
Step 2 — Server and Client Boundaries
- Default to Server Components; add
'use client'only when interactivity or browser APIs are needed. - Keep data fetching and secrets in server modules/route handlers.
- Pass serialized data to client components via props.
- Avoid importing server-only modules into client components.
- Use alias imports for cross-directory modules and ESM
import/exportsyntax only.
Step 3 — Data Fetching and Mutations
- Read data in Server Components when possible.
- Use Route Handlers or Server Actions for mutations.
- Revalidate with
revalidatePath/revalidateTagafter mutations. - Centralize schema validation (for example Zod) at request boundaries.
Step 4 — State and Caching Strategy
- URL and route params: App Router primitives.
- Shared client interaction state: React context or local store in client layer.
- Remote data cache: Next fetch cache + query library only when client-side refetching is needed.
Step 5 — Testing Parity with React Stack
- Unit and component tests: Vitest + React Testing Library.
- E2E flows: Playwright.
- For Server Components and route handlers, test logic in extracted server utilities where possible.
Step 6 — Verify
- App Router segments contain
page.tsx/layout.tsxand special files only where needed - Server-first component model is respected, with minimal
'use client' - Secrets and privileged logic stay server-side
- Mutation flows trigger explicit revalidation
-
pnpm tsc --noEmitandpnpm testpass
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 92 lines · 64 tokens per session scan A cc50c7a525fb
next-application-structure is a skill published in the GitHub repository soulcodex/agentic (10 stars, last pushed 2d ago), licensed MIT. It adds 64 tokens to every session and 624 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
trigger-agents
AI agent patterns with Trigger.dev - chat.agent, Sessions, AI Prompts, Trigger Agent Skills, orchestration, parallelization, routing, evaluator-optimizer, and human-in-the-loop. Use when building LLM-powered tasks that need durable AI chat, parallel workers, approval gates, tool calling, or multi-step agent workflows.
trigger-tasks
Build AI agents, workflows and durable background tasks with Trigger.dev. Use when creating tasks, triggering jobs, handling retries, scheduling cron jobs, or implementing queues and concurrency control.
hackerai-user-research
Run privacy-safe HackerAI customer research from an authorized PM question and a PostHog cohort. Use for requests to understand user types, recurring jobs, workflows, friction, value drivers, reasons to pay, or customer avatars from actual HackerAI messages, including top-spender research. Also use when a PM asks how…
trigger-realtime
Subscribe to Trigger.dev task runs in real-time from frontend and backend. Use when building progress indicators, live dashboards, streaming AI/LLM responses, or React components that display task status.
vercel-react-best-practices
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance…
logging-best-practices
Use before implementing logs in a medium to large scale production system.