cleanup-cache
Clean system caches (npm, Homebrew, Yarn, browsers, Python/ML) to free disk space
Create a new Next.js application with best practices and optimal configuration
$ npx -y skills add davila7/claude-code-templates --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
/nextjs-scaffoldContext preview
What this command does when you run it.
Create a new Next.js application with best practices and optimal configuration
allowed-tools: Read, Write, Edit, Bash argument-hint: [project-name] [--typescript] [--tailwind] [--app-router] description: Create a new Next.js application with best practices and optimal configuration
**Project Name**: $ARGUMENTS
Based on provided arguments, determine setup options:
Create optimized `next.config.js` with:
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
optimizePackageImports: ['lucide-react', '@heroicons/react'],
},
images: {
formats: ['image/webp', 'image/avif'],
deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
},
async headers() {
return [
{
source: '/(.*)',
headers: [
{
key: 'X-Frame-Options',
value: 'DENY',
},
{
key: 'X-Content-Type-Options',
value: 'nosniff',
},
],
},
];
},
};Install core dependencies:
Create optimal directory structure:
project-name/ ├── app/ # App Router (Next.js 13+) │ ├── globals.css │ ├── layout.tsx │ ├── page.tsx │ └── api/ ├── components/ # Reusable components │ └── ui/ # UI primitives ├── lib/ # Utilities and configurations ├── public/ # Static assets ├── types/ # TypeScript type definitions ├── .env.local # Environment variables ├── .env.example # Environment template ├── .gitignore ├── next.config.js ├── package.json ├── README.md └── tsconfig.json # If TypeScript
{
"extends": ["next/core-web-vitals"],
"rules": {
"@next/next/no-img-element": "error",
"@next/next/no-html-link-for-pages": "error"
}
}{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "es6"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"plugins": [
{
"name": "next"
}
],
"baseUrl": ".",
"paths": {
"@/*": ["./*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}import type { Metadata } from 'next';
import { Inter } from 'next/font/google';
import './globals.css';
const inter = Inter({ subsets: ['latin'] });
export const metadata: Metadata = {
title: 'Project Name',
description: 'Generated with Claude Code Next.js scaffolding',
};
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en">
<body className={inter.className}>{children}</body>
</html>
);
}export default function Home() {
return (
<main className="flex min-h-screen flex-col items-center justify-between p-24">
<div className="z-10 max-w-5xl w-full items-center justify-between font-mono text-sm">
<h1 className="text-4xl font-bold">Welcome to Your Next.js App</h1>
<p className="mt-4 text-lg">
Built with Claude Code scaffolding
</p>
</div>
</main>
);
}Update package.json with optimized scripts:
{
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"type-check": "tsc --noEmit",
"format": "prettier --write .",
"format:check": "prettier --check ."
}
}Create comprehensive README.md with:
1. **Initialize Project**: Create project directory and basic structure 2. **Install Dependencies**: Set up Next.js with chosen options 3. **Configure TypeScript**: Set up TypeScript if requested 4. **Setup Tailwind**: Configure Tailwind CSS if requested 5. **Create Components**: Generate starter components and layouts 6. **Setup Development Tools**: Configure ESLint, Prettier, and scripts 7. **Environment Configuration**: Create .env files and examples 8. **Generate Documentation**: Create README and setup guides
After scaffolding, run these commands to verify setup:
cd [project-name] npm install npm run build npm run lint npm run type-check # If TypeScript
Provide
Ready-to-use configurations for Anthropic's Claude Code. A comprehensive collection of AI agents, custom commands, settings, hooks, external integrations (MCPs), and project templates to enhance your development workflow.
Repo: davila7/claude-code-templates
Clean system caches (npm, Homebrew, Yarn, browsers, Python/ML) to free disk space
Create an SEO-optimized blog article for a Claude Code component with AI-generated cover image