LLM-agent-driven TypeScript / Next.js project scaffolding template. Hand
SETUP.mdto Claude Code / Cursor and get a green CI pipeline on GitHub.
This template enables an autonomous coding agent (Claude Code / Cursor) to scaffold a production-grade TypeScript / Next.js 15 (App Router) project from an empty directory to a green CI pipeline on GitHub — without human intervention beyond providing the repo name, visibility, and final approval.
The generated project enforces:
- Feature-Sliced Design (FSD) via
eslint-plugin-fsd-lint - Barrel File convention (
index.tspublic API per slice) - Husky pre-commit hooks for local lint-staged + commitlint enforcement
- Strict TypeScript (
strict: true+noUncheckedIndexedAccess) - CodeRabbit automated PR reviews focused on architecture, not formatting
- Developers using Claude Code / Cursor who want a reproducible TypeScript scaffold
- Students / teams learning modern Next.js + FSD tooling in one shot
- Teams migrating from outdated setups to 2026 best practices
- Fork or clone this template
- Open the project root in Claude Code / Cursor
- Ask: "Please set up a new project using SETUP.md"
- The agent executes Phase 0 → Phase 8 and pushes to GitHub
SETUP.md— the main agent prompt (14 sections, Phase 0 → Phase 8)CLAUDE.md— base CLAUDE.md for the generated project (replace{{PROJECT_NAME}}).claude/rules/— modular AI behavior rules (code-style, git, architecture, verification-loop).claude/skills/claude-md-reviewer/— English skill for reviewing CLAUDE.md qualityexamples/— ready-to-copy config file snippets (Prettier, ESLint, Jest, Husky, CI, etc.)CODERABBIT-PROMPT-GUIDE.md— how to author.coderabbit.yamlpath_instructions
- Preface + LLM meta-instructions
- Prerequisites (Node 20, npm, gh CLI)
- Phase 0 — Repo Init +
.nvmrc - Phase 1 — Scaffolding (
create-next-app) - Phase 1.5 — FSD directory scaffold (
fsd-scaffold.sh) - Phase 2 — DevDeps + Husky init
- Phase 3 — Config files (Prettier / ESLint / Jest / commitlint / lint-staged / Husky hooks)
- Phase 4 — package.json scripts
- Phase 5 — CI Workflow (
.github/workflows/ci.yml) - Phase 6 — CodeRabbit setup (
.coderabbit.yaml) - Phase 7 — Local Verify (
npm run verify) - Phase 8 — First Push + CI Green (Git Safety Gate +
gh run watch) - Troubleshooting
- Config Reference Appendix
Most TypeScript/Next.js starter templates require manual configuration steps and assume a human developer is reading documentation. This template is authored for LLM agents: every decision is made upfront, every command is fully spelled out, and the verification loop matches CI exactly. The result is a reproducible "from zero to green CI" flow that works without human mid-task intervention.
- Storybook: not included by default. See
.claude/rules/architecture.mdextension notes. - Python archetypes: see
llm-setup-prompts/python-template/(03 Phase). - Override rules in
.claude/rules/to match your team's conventions.
MIT