scaffolding-nextjs-foundation
Skill378 starsChanged 4 months agoApache-2.0View on GitHub
Generates a new Next.js application with Tailwind, TypeScript, and modern dependencies based on audit specifications. Use when beginning the scaffolding phase of a greenfield codebase rewrite.
- Reads credentials
- Installs packages
In this repository59 other files it gives its agents.
- codelabs/ai-toolkit-lab-2/hackathon-judge/frontend/.agents/skills/vercel-composition-patterns/AGENTS.mdAGENTS.md
- codelabs/ai-toolkit-lab-2/hackathon-judge/frontend/.agents/skills/vercel-react-best-practices/AGENTS.mdAGENTS.md
- batch-executing-test-suitesSkill
- circuit-breaker-reporterSkill
- generating-mock-imagesSkill
- making-forms-demoSkill
- multi-step-workflow-reporterSkill
- go-project-setupSkill
- latest-software-versionSkill
- video-descriptionSkill
- adk-memory-bank-initializerSkill
- agent-containerizerSkill
- cloud-run-agent-architectSkill
- gcp-agent-eval-engine-runnerSkill
- gcp-agent-eval-metric-configuratorSkill
- gcp-agent-golden-dataset-builderSkill
- gcp-agent-model-armor-shieldSkill
- gcp-agent-safety-gatekeeperSkill
- gcp-agent-sdp-template-factorySkill
- gcp-agent-shadow-deployerSkill
- gcp-agent-tool-trajectory-evaluatorSkill
- gcp-production-secret-handlerSkill
- mcp-connector-generatorSkill
- go-architectSkill
- go-backend-devSkill
- go-reviewerSkill
- go-test-expertSkill
- vercel-composition-patternsSkill
- vercel-react-best-practicesSkill
- brand-guidelinesSkill
- knowledge_catalog_governanceSkill
- banana-breadSkill
- cheese-breadSkill
- drawingsSkill
- paintingsSkill
- photographySkill
- adding-easter-eggSkill
- building-platformer-gamesSkill
- creating-a-gameSkill
- ensuring-arcade-visualsSkill
- handling-user-inputSkill
- helping-the-userSkill
- improving-game-qualitySkill
- messaging-game-overSkill
- playing-the-gameSkill
- adversarial-verificationSkill
- auditing-api-contractsSkill
- auditing-business-logicSkill
- auditing-data-modelsSkill
- auditing-paritySkill
- auditing-ui-archeologySkill
- generating-api-testsSkill
- generating-database-seederSkill
- orchestrating-greenfield-migrationSkill
- scaffolding-api-routesSkill
- scaffolding-data-layerSkill
- scaffolding-test-foundationSkill
- scaffolding-ui-and-pagesSkill
- ping_pong_pairingSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 0 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 27
Run npx shadcn@latest init to set up Tailwind CSS and the components directory.
- Very specific: line 31
MongoDB & Auth Connection: If connecting to legacy MongoDB, install mongodb@latest.
- Very specific: line 33
CRITICAL: When the modern-app runs on the host (e.g., npm run dev), it cannot resolve internal Docker hostnames like mongo.
- Very specific: line 35
If mongodb@7+ is used: Do NOT install @auth/mongodb-adapter (it currently has peer conflicts with v7).
- Very specific: line 36
If mongodb@^6 is acceptable: Install mongodb@^6 and @auth/mongodb-adapter@latest.
- Very specific: line 43
Remove default boilerplate from src/app/page.tsx and src/app/globals.css to create a blank canvas for the next subagents.
- Very specific: line 46
Ensure npm run build succeeds on the empty foundation.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Objective
Establish the baseline directory structure and dependencies for the modern rewrite of the legacy application.
Instructions for the Scaffold Subagents
Copy this checklist and track your progress:
Task Progress:
- [ ] Step 1: Initialize Next.js
- [ ] Step 2: Initialize UI
- [ ] Step 3: Install Core Dependencies
- [ ] Step 4: Clean the Scaffold
- [ ] Step 5: VerificationStep 1. Initialize Next.js
Execute the create-next-app command in the designated modernization directory (usually the root of the new repo).
* Command: npx -y create-next-app@latest . --typescript --tailwind --eslint --app --src-dir --import-alias "@/*"
* Note: Ensure you are running this in the correct output directory (e.g., modern-app/) and not inside the legacy legacy-app/ folder.
Step 2. Initialize UI
Run npx shadcn@latest init to set up Tailwind CSS and the components directory.
Step 3. Install Core Dependencies
Evaluate the Business_Logic_Rules.md artifact (found in docs/legacy-audit/). Based on those rules, install the necessary modern replacements explicitly using the @latest tag so the 10-year old versions are avoided.
* MongoDB & Auth Connection: If connecting to legacy MongoDB, install mongodb@latest.
* Connection Secret: Plan for the .env.local initialization.
* CRITICAL: When the modern-app runs on the host (e.g., npm run dev), it cannot resolve internal Docker hostnames like mongo. You MUST use localhost (e.g., mongodb://localhost:27017/db_name) to bridge onto the exposed container port.
* Auth Strategy Selection:
* If mongodb@7+ is used: Do NOT install @auth/mongodb-adapter (it currently has peer conflicts with v7). Instead, use a JWT strategy (next-auth@latest) and the native driver for manual account/user lookups in the authorize callback.
* If mongodb@^6 is acceptable: Install mongodb@^6 and @auth/mongodb-adapter@latest.
* Additional Packages:
* For payload validation, install zod@latest.
* For legacy Mongoose methods like password hashing, install bcrypt@latest and -D @types/bcrypt@latest.
* Command Example (MongoDB 7 / JWT): npm install next-auth@latest mongodb@latest zod@latest bcrypt@latest && npm install -D @types/bcrypt@latest
Step 4. Clean the Scaffold
Remove default boilerplate from src/app/page.tsx and src/app/globals.css to create a blank canvas for the next subagents.
Step 5. Verification
Ensure npm run build succeeds on the empty foundation.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

