setting-up-a-project
You MUST use this skill when the user asks you to setup a claude code project. You should also suggest it if there is no CLAUDE.md or when starting work on an empty codebase.
What this skill does
# Setting up a Project ## Overview Help Claude author a CLAUDE.md file that defines a project's purpose, development practices, and tech stack before writing code. **Core principle:** A well-configured project prevents rework and ensures consistency. Establishing guardrails upfront helps Claude Code work reliably, produce high-quality code, and avoid doom loops where code is written, broken, and rewritten repeatedly. ## The Process ### Define the Project Purpose Ask questions to determine: 1. **What should this project be called?** Get a name and brief description. 2. **What problem does this solve?** Understand the pain point, who experiences it, and why existing solutions are inadequate. 3. **How will it work?** Get a high-level explanation of the approach or mechanism. Then update CLAUDE.md. Document the answers in CLAUDE.md under a `## Project Overview` section. Here's a template: ```markdown ## Project Overview **Setting Up a Project Skill**: Helps Claude author a CLAUDE.md file that defines a project's purpose, development practices, and tech stack before writing code. ### Problem Claude Code often writes unreliable, inconsistent or low quality code. It can make errors like adding two different unit testing frameworks to a project. It can also get stuck in doom loops where code is written, broken, and rewritten repeatedly. ### Approach A well-configured project prevents rework and ensures consistency. Establishing guardrails upfront helps Claude Code work reliably, produce high-quality code, and avoid doom loops where code is written, broken, and rewritten repeatedly. ``` ## Define the Tech Stack Ask the user about each of these areas. Suggest sensible defaults based on the language/runtime. ### Questions to Ask 1. **Language and runtime** - What programming language? What version/runtime? 2. **Deployment target** - Where will this run? (CLI, web server, serverless, container, browser, etc.) 3. **Package manager** - How will dependencies be managed? 4. **Testing framework** - What will be used for TDD? 5. **Build tools** - How will the project be built/compiled? 6. **Linting and formatting** - What tools enforce code style? 7. **Key libraries** - Any specific libraries or frameworks required? 8. **Unique concerns** - Any other technical requirements specific to this project? (e.g., database, auth, external APIs) ### Suggested Defaults When suggesting defaults, base them on the language: | Language | Package Manager | Testing | Linting | Build | |----------|-----------------|---------|---------|-------| | TypeScript/Node.js | pnpm | Vitest | ESLint + Prettier | esbuild or tsc | | Python | uv | pytest | Ruff | - | | Go | go modules | go test | golangci-lint | go build | | Rust | cargo | cargo test | clippy | cargo build | Adjust suggestions based on deployment target and project needs. Document the output in CLAUDE.md under a `## Tech Stack` section. Here's a template: ```markdown ## Tech Stack - **Language**: [Language and version] - **Runtime**: [Runtime environment] - **Package Manager**: [Package manager] - **Testing**: [Testing framework] - **Linting**: [Linter and formatter] - **Build**: [Build tool] - **Key Libraries**: [List of essential libraries] ``` After defining the tech stack: - confirm with the user - write the choices to `CLAUDE.md` - commit the file to git ## Establish Development Practices ### TDD Rules (Mandatory) TDD is non-negotiable for all projects set up with this skill. Read the contents of `https://raw.githubusercontent.com/britt/claude-code-skills/refs/heads/main/rules/TDD.rules.md` and copy it verbatim into `CLAUDE.md`. ### Git Practices Ask the user about their preferred git workflow, then document it in CLAUDE.md: 1. **Branching strategy** - Feature branches, trunk-based, or git worktrees? 2. **Branch naming** - Convention for naming branches (e.g., `feature/`, `fix/`, `chore/`) 3. **Worktrees** - If using worktrees, establish conventions for worktree location and naming ### Commit Early, Commit Often (CRITICAL) **This rule is non-negotiable.** Add the following to CLAUDE.md verbatim: ```markdown ## Git Commit Rules **COMMIT EARLY, COMMIT OFTEN** - This is mandatory. - Commit after every successful TDD cycle (RED-GREEN-REFACTOR) - Commit after completing any discrete unit of work - Commit before switching context or taking breaks - Never have more than 30 minutes of uncommitted work - Each commit should be atomic: one logical change per commit Why this matters: - Small commits are easier to review and revert - Frequent commits prevent loss of work - Atomic commits make git history useful for debugging - Regular commits force you to think in small, testable increments ``` ### Pull Request Rules YOU MUST follow these rules when creating a pull request. - Use a merge commit do not squash commits. - If you are working on an issue make sure to note in the PR description that this PR closes the issue number. ### Verification Plan Use the `britt/writing-verification-plans` skill to create a verification plan. This produces a VERIFICATION_PLAN.md file that should be linked in CLAUDE.md as shown below: ```markdown ## Verification See @VERIFICATION_PLAN.md for acceptance testing procedures. ``` ## After Setting Up * Write the `CLAUDE.md` file * Use elements-of-style:writing-clearly-and-concisely skill if available * Commit the `CLAUDE.md` to git * Ask if the user would like to start brainstorming requirements or an implementation plan. Use `obra/brainstorming` or `obra/writing-plans` if they say yes. ## Key Principles - **One question at a time** - Don't overwhelm with multiple questions - **Multiple choice preferred** - Easier to answer than open-ended when possible - **DRY ruthlessly** - Remove any repetition of instructions - **Incremental validation** - Present `CLAUDE.md` in sections, validate each - **Be flexible** - Go back and clarify when something doesn't make sense
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.