Framework Specialist Subagents
Purpose-built subagents that know your framework's current-version idioms, opinionated conventions, and specific gotchas. Same Claude, dramatically better framework code.
Why framework-specific subagents beat generic Claude on framework work
Ask base Claude to "add server-side pagination to this Next.js 15 page" and you get code that works — usually with a useEffect, a client component, and a Cursor-style pattern from three years ago. Ask a well-configured nextjs-15-expert subagent the same question and you get a Server Component using searchParams, matching your existing App Router conventions, and respecting Next.js 15's caching behavior changes. Same model, same context — wildly different output.
The difference is the system prompt. Framework subagents are essentially a senior engineer's opinionated brief on "how we do things in this framework in 2026" compressed into 100-200 lines of Markdown. Once installed, every Claude Code session for that framework gets the same up-to-date guidance without you having to remember to include it.
Anatomy of a great framework subagent
Notice the shape. It's not a tutorial. It's not "here's how Next.js works". It's a senior engineer's brief: default posture, version-specific gotchas, hard don'ts, and expected output structure. That's what turns generic Claude into framework-native Claude.
The framework trifecta: agent + MCP + CLAUDE.md
Framework subagents get dramatically more effective when paired with two siblings:
- Framework subagent — the how. Encodes idioms, conventions, and gotchas.
- Framework MCP (if the framework has one) — the runtime. Lets Claude query the actual framework state: which routes exist, what's in
next.config, what components are defined. - Framework CLAUDE.md template — the project brief. Tells Claude your team's specific conventions on top of the framework's defaults.
Install all three for your primary stack and the difference in code quality is stark — even more than pairing a slash command with a hook.
When should Claude use a framework agent (vs just answering directly)?
Every framework agent's description field determines when Claude auto-routes to it. Rules of thumb:
- Auto-invoke for anything that touches files under the framework's key directories (e.g.,
app/,pages/,src/routes/). - Auto-invoke for framework-specific concepts by keyword: Server Components, Suspense, hooks, guards, loaders, Signals, and so on.
- Do NOT auto-invoke for language-level or general programming questions ("explain what a Promise is").
- Do NOT auto-invoke for cross-framework decisions ("should we use Next.js or Remix here?") — that's a job for the main conversation.
Include the trigger keywords and the phrase Use PROACTIVELY in the description to encourage auto-routing.
All 14 framework agents, grouped by ecosystem
Each agent encodes current-version idioms, opinionated conventions, and framework-specific gotchas. Version-matched to what shipped most recently.
Which framework agent(s) should I install?
A quick guide for the situations teams hit most often.
nextjs-14-expert → nextjs-15-expert). The old one may recommend patterns that are now deprecated. Keep both installed briefly during the transition; delete the old one when done.tools restriction scoped to its own directory (e.g., Write(apps/mobile/**)) so agents don't cross-contaminate.Related sub-categories in Subagents
Framework agents pair naturally with code review, testing, and database specialists — the four categories most teams install first.
🐛 Hit an error while using these?
Our sister site AI Error Hub covers Claude Code errors, MCP connection failures, and stack traces — cross-referenced with everything on this site.
Frequently asked questions
The questions developers ask most about framework specialists.
Yes, noticeably. Generic Claude knows the framework at a mostly-current tutorial level; a framework subagent knows the current-version idioms, opinionated conventions, and specific gotchas.
The gap shows up most on framework-specific features — Server Components in Next.js 15, Signals in Angular 18, Solid Queue in Rails 8 — where generic Claude often defaults to older or cross-framework patterns.
Match your project's actual Next.js version. Next.js 15 changed defaults (caching is opt-in, params are async), so a 15-expert giving 14 advice — or a 14-expert giving 15 advice — will produce code that looks right but breaks at runtime.
Check your package.json version, then install the matching agent.
Via the description field. Claude Code reads all subagent descriptions on session start and routes work to the one whose description best matches your prompt.
Include:
- Trigger keywords — App Router, Server Components, loaders, guards, Signals, etc.
- The phrase Use PROACTIVELY.
Vague descriptions won't get auto-routed, and the agent will only fire when explicitly invoked with > use the X agent.
Directory-scoped writes plus framework-specific bash commands. Example for Next.js:
Read,Grep,Glob,EditWrite(app/**),Write(components/**),Write(lib/**)Bash(pnpm:*),Bash(npx next:*)
Do not allow general Bash — a framework agent should not be running arbitrary shell commands outside its ecosystem.
Sonnet is the right default for framework work. The task is largely applied — knowing the idioms and applying them correctly — which Sonnet handles well.
Reserve Opus for framework agents when the work is architectural (designing a new module structure, choosing a data-fetching strategy for a complex page). Explicit model routing per-task is a bigger cost lever than tuning the frontmatter default.
Whenever the framework has a meaningful release. Cadence varies:
- Next.js — majors every ~6 months.
- Django, Rails — slower cadence.
- SvelteKit, Astro — frequent minor changes.
Our editorial team refreshes framework agents within 48 hours of a major release and does a full rewrite when defaults or conventions change. If you're maintaining your own, plan for a review every quarter and a rewrite at every major.
Yes, and you should. They're complementary:
- CLAUDE.md — tells Claude about your project (name, versions, deployment targets, team conventions).
- Framework agent — tells Claude about the framework itself (default patterns, gotchas, current idioms).
The CLAUDE.md gives project-specific context every session; the agent gives framework-specific expertise on demand.
Install both agents. Give each a directory-scoped tool restriction so they can only write into their part of the codebase:
Write(apps/web/**)for the Next.js agent.Write(apps/api/**)for the FastAPI agent.
Cross-cutting work still routes to the main conversation, but framework-specific work goes to the right specialist. Common pattern for full-stack projects.
Occasionally. If both agents' descriptions match a prompt, Claude Code's routing may be ambiguous.
Prevent it by:
- Making descriptions non-overlapping — the Next.js agent's description mentions Next.js and App Router; the Remix agent's mentions Remix and loaders.
- Adding directory-scoped tool restrictions as a hard boundary even if routing gets it wrong.
Yes. Framework agents cost nothing when idle — they're just Markdown files.
The value shows up the moment you actually work on the framework: correct current-version code without you having to remember what changed in the last release.
For frameworks you use less often, the agent is even more valuable — because your own knowledge is more likely to be stale.
Get the weekly Claude Code digest
Every Tuesday: new framework specialists, Anthropic release recap, and the best community submission. 13,000+ developers read it.