new-feature-nextjs

new-feature-nextjs is a skill for Claude Code from yerdaulet-damir/vibe-coding-rules. It costs 90 tokens per session (1,636 once invoked), scanned A, original, MIT.

A checklist for adding a feature to a Next.js 15 and TypeScript application, covering routes, server actions, data reads, mutations, and cache tags.

In plain words
What is it for?
Use it when creating pages, routes, server actions, or feature modules and deciding where components, database access, and cache definitions belong.
Why use it?
It helps prevent oversized pages, misplaced code, and stale cached data by defining the feature structure before implementation.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it when creating pages, routes, server actions, or feature modules and deciding where components, database access, and cache definitions belong.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yerdaulet-damir/vibe-coding-rules/new-feature-nextjs
Install

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.

Any agent
npx skills add yerdaulet-damir/vibe-coding-rules --skill new-feature-nextjs
Clone the repo
git clone --depth 1 https://github.com/yerdaulet-damir/vibe-coding-rules

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for new-feature-nextjs

README.md
[![agentmods](https://agentmods.dev/badge/skills/yerdaulet-damir/vibe-coding-rules/new-feature-nextjs/github.svg)](https://agentmods.dev/skills/yerdaulet-damir/vibe-coding-rules/new-feature-nextjs)
Your own site
<a href="https://agentmods.dev/skills/yerdaulet-damir/vibe-coding-rules/new-feature-nextjs"><img src="https://agentmods.dev/badge/skills/yerdaulet-damir/vibe-coding-rules/new-feature-nextjs/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for new-feature-nextjs

Your own site · 80×15
<a href="https://agentmods.dev/skills/yerdaulet-damir/vibe-coding-rules/new-feature-nextjs"><img src="https://agentmods.dev/badge/skills/yerdaulet-damir/vibe-coding-rules/new-feature-nextjs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 90 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,636 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00090 $0.01636
Opus 5 $0.00045 $0.00818
Sonnet 5 $0.00018 $0.00327
Haiku 4.5 $0.00009 $0.00164

Measured 9d ago against content hash 531e65e387f2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

new-feature-nextjs 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 9d 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.

.claude/skills/new-feature-nextjs/SKILL.md · 195 lines

How it starts

The opening of the file, as written. The whole thing — 195 lines — stays where its author put it; the contents beside it link to each section on GitHub.

new-feature-nextjs

Do not open any file for editing until all 6 steps are completed.


Step 1 — Define the feature surface

Write the surface in plain text before any code:

Feature name: users
Routes: /users (list), /users/[id] (detail)
Mutations: createUser, updateUser, deleteUser
Reads: getUser(id), listUsers()
Cache tags: user(id), userList(), userOrders(userId)

If you can't fill all 5 lines in 2 sentences each, the scope is unclear — clarify with the user first.


Step 2 — Pick the folder location (Principle C1)

Scope Location
Reusable everywhere (Button, Input) src/components/ui/
Belongs to one business domain src/features/<domain>/
Pure helper used in 2+ features src/lib/<area>/
Used in exactly one place colocate next to that place (Principle C6)

For a new feature, default to src/features/<domain>/ with this structure:

src/features/<domain>/
├── components/         # JSX (server + client)
├── actions.ts          # Server Actions
├── repository.ts       # Drizzle adapter (only file importing drizzle-orm)
├── protocols.ts        # Repository protocol/interface
├── schema.ts           # Zod schemas
└── store.ts            # Zustand (only if genuinely needed)

Step 3 — Add cache tags FIRST (Principle D1)

Before writing any Server Action, add the tags to src/lib/cache/tags.ts:

// src/lib/cache/tags.ts
export const tags = {
  // ... existing tags
  user: (id: string) => `user:${id}` as const,
  userList: () => 'user:list' as const,
} as const;

Rule: zero revalidateTag('magic-string') in the new feature. Every invalidation goes through the typed DSL. Typos must be compile errors.


Step 4 — Build bottom-up (parallel to FastAPI new-feature skill)

1. Schema (Zod)         → src/features/<domain>/schema.ts
2. Repository protocol  → src/features/<domain>/protocols.ts
3. Repository impl      → src/features/<domain>/repository.ts (Drizzle)
4. Server Actions       → src/features/<domain>/actions.ts (uses tags + repo via Protocol)
5. Components (server)  → src/features/<domain>/components/<Feature>Page.tsx
6. Components (client)  → src/features/<domain>/components/<Leaf>.tsx ('use client')
7. Route               → src/app/<route>/page.tsx (thin, < 20 lines)

Read the full file on GitHub · 195 lines

Changes

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.

  1. 9d ago First seen · 195 lines · 90 tokens per session scan A 531e65e387f2

Subscribe to this mod's changes

new-feature-nextjs is a skill published in the GitHub repository yerdaulet-damir/vibe-coding-rules (41 stars, last pushed 4mo ago), licensed MIT. It adds 90 tokens to every session and 1,636 once invoked, about $0.0005 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.