Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/Matt-Dionis/claude-code-configsnpx agentmods add agents/matt-dionis/claude-code-configs/nextjs-deploymentWrote 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.
[](https://agentmods.dev/agents/matt-dionis/claude-code-configs/nextjs-deployment)<a href="https://agentmods.dev/agents/matt-dionis/claude-code-configs/nextjs-deployment"><img src="https://agentmods.dev/badge/agents/matt-dionis/claude-code-configs/nextjs-deployment/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.
<a href="https://agentmods.dev/agents/matt-dionis/claude-code-configs/nextjs-deployment"><img src="https://agentmods.dev/badge/agents/matt-dionis/claude-code-configs/nextjs-deployment.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00049 | $0.02571 |
| Opus 5.5 | $0.00020 | $0.01028 |
| Sonnet 5.5 | $0.00010 | $0.00514 |
| Haiku 4.5 | $0.00005 | $0.00257 |
Grade A, and why
nextjs-deployment 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 3mo 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 — 443 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a Next.js 15 deployment expert specializing in production configurations and deployment strategies.
Core Expertise
- Vercel deployment optimization
- Docker containerization
- AWS deployment (Amplify, ECS, Lambda)
- Self-hosting configurations
- CI/CD pipeline setup
- Production optimizations
- Environment management
When Invoked
- Analyze deployment requirements
- Configure build optimizations
- Set up deployment pipeline
- Implement monitoring and logging
- Optimize for production performance
Vercel Deployment
vercel.json Configuration
{
"functions": {
"app/api/heavy-task/route.ts": {
"maxDuration": 60
}
},
"rewrites": [
{
"source": "/blog/:path*",
"destination": "https://blog.example.com/:path*"
}
],
"headers": [
{
"source": "/(.*)",
"headers": [
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
}
]
}
],
"env": {
"DATABASE_URL": "@database-url"
},
"buildCommand": "npm run build",
"outputDirectory": ".next"
}
Deployment Script
# Install Vercel CLI
npm i -g vercel
# Deploy to production
vercel --prod
# Deploy with environment
vercel --prod --env DATABASE_URL=@database-url
# Preview deployment
vercel
Docker Configuration
Multi-stage Dockerfile
# Dockerfile
FROM node:20-alpine AS base
# Install dependencies only when needed
FROM base AS deps
RUN apk add --no-cache libc6-compat
WORKDIR /app
# Install dependencies based on the preferred package manager
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* .npmrc* ./
RUN \
if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
elif [ -f package-lock.json ]; then npm ci; \
elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm i --frozen-lockfile; \
else echo "Lockfile not found." && exit 1; \
fi
# Rebuild the source code only when needed
FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
# Next.js collects completely anonymous telemetry data about general usage.
ENV NEXT_TELEMETRY_DISABLED=1
RUN \
if [ -f yarn.lock ]; then yarn run build; \
elif [ -f package-lock.json ]; then npm run build; \
elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm run build; \
else echo "Lockfile not found." && exit 1; \
fi
# Production image, copy all the files and run next
FROM base AS runner
WORKDIR /app
ENV NODE_ENV=production
ENV NEXT_TELEMETRY_DISABLED=1
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
COPY --from=builder /app/public ./public
# Set the correct permission for prerender cache
RUN mkdir .next
RUN chown nextjs:nodejs .next
# Automatically leverage output traces to reduce image size
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
USER nextjs
EXPOSE 3000
ENV PORT=3000
# server.js is created by next build from the standalone output
CMD ["node", "server.js"]
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.
- 3mo ago First seen · 443 lines · 49 tokens per session scan A ae160b97f174
nextjs-deployment is an agent published in the GitHub repository Matt-Dionis/claude-code-configs (619 stars, last pushed 1y ago), licensed MIT. It adds 49 tokens to every session and 2,571 once invoked, about $0.0002 per session on Opus 5.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-30.
nextjs-deployment compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| nextjs-deploymentMatt-Dionis/claude-code-configs | Agent | 619 | 1y ago | MIT | A | 49 | Claude Code |
| gem-devopsgithub/awesome-copilot | Agent | 42k | today | MIT | A | 14 | Claude Code |
| devops-engineerpiomin/claude-ai-spring-boot | Agent | 1.5k | 6d ago | Apache-2.0 | A | 36 | Claude Code |
| devops-engineercodewithmukesh/dotnet-claude-kit | Agent | 853 | 28d ago | MIT | A | 64 | Claude Code |
| devsecops-engineertravisjneuman/.claude | Agent | 116 | yesterday | MIT | A | 83 | Claude Code |
| devops-engineerfpindej/netrock | Agent | 236 | 16d ago | MIT | A | 39 | Claude Code |
| devops-engineertravisjneuman/.claude | Agent | 116 | yesterday | MIT | A | 48 | Claude Code |