Agent skill
setup-project
Initialize any project with Claude Code best practices and RALPH autonomous development
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/setup-project
SKILL.md
Setup Project - Interactive Configuration
Initialize any project directory for Claude Code with intelligent analysis and RALPH support.
Triggers
/setup-project- Start interactive setup- "set up this project for Claude"
- "initialize project"
- "configure RALPH"
Process
Step 1: Detect Project State
First, check if this is a new or existing project by looking for common project indicators:
# Check for project files
ls -la 2>/dev/null | head -20
# Check for package managers
ls package.json requirements.txt go.mod Cargo.toml pyproject.toml 2>/dev/null
Indicators of existing project:
package.json- Node.js/JavaScript projectrequirements.txtorpyproject.toml- Python projectgo.mod- Go projectCargo.toml- Rust projectREADME.mdwith contentsrc/,lib/, orapp/directories
Step 2: Gather Information with AskUserQuestion
CRITICAL: Always use AskUserQuestion to gather project information.
For New/Empty Directory
Ask these 6-7 questions:
-
Project Type
? What type of project is this? ○ Web application (frontend) ○ REST API / Backend service ○ Full-stack application ○ CLI tool ○ Library / Package -
Primary Language
? What language will you use? ○ TypeScript (Recommended) ○ JavaScript ○ Python ○ Go ○ Rust -
Framework
? Framework? ○ None ○ React ○ Next.js ○ Express ○ FastAPI ○ Django -
Test Framework
? Test framework? ○ Vitest (Recommended for TS/JS) ○ Jest ○ Pytest ○ Go test ○ None / Decide later -
Linting and Formatting
? Linting and formatting? ○ ESLint + Prettier (Recommended) ○ ESLint only ○ Biome ○ Ruff (Python) ○ None -
Git Initialization
? Initialize git repository? ○ Yes (Recommended) ○ No -
First Feature (free text)
? Describe the first feature to build (or leave empty to skip PRD): > [user input]
For Existing Project
Ask these questions after detection:
-
Confirm Detection
? I detected a [TypeScript/JavaScript/Python/Go] project using [framework]. Is this correct? ○ Yes, that's correct ○ No, let me specify -
Analyze Codebase
? Should I analyze the codebase for patterns and conventions? ○ Yes, analyze existing code (Recommended) ○ No, I'll provide the details -
Test Framework (if not auto-detected)
? Test framework? ○ [Auto-detected option] ○ Other options... -
Lint/Format Tools (if not auto-detected)
? Linting and formatting? ○ [Auto-detected option] ○ Other options... -
Rules and Boundaries
? Any directories that should NEVER be modified? ○ None ○ Let me specify: [user input] -
Next Feature (free text)
? What feature would you like to build next (or leave empty to skip PRD): > [user input]
Step 3: Create Configuration Files
Based on the answers, create these files:
1. PROJECT_SPEC.md
# Project Specification: {{projectName}}
Generated: {{date}}
Type: {{projectType}}
## Overview
{{description}}
## Tech Stack
| Component | Value |
|-----------|-------|
| Language | {{language}} |
| Framework | {{framework}} |
| Test Framework | {{testFramework}} |
| Linter | {{linter}} |
## Quality Commands
| Command | Purpose |
|---------|---------|
| `{{testCommand}}` | Run tests |
| `{{lintCommand}}` | Run linter |
| `{{typecheckCommand}}` | Type checking |
| `{{buildCommand}}` | Build project |
## Patterns to Follow
- {{namingConvention}}
- {{moduleSystem}}
- {{importOrder}}
## Boundaries
These files/directories should NOT be modified by RALPH:
{{#each boundaries}}
- `{{this}}`
{{/each}}
---
*Generated by /setup-project*
2. .ralph/config.yaml
# RALPH Configuration
# Generated by /setup-project
# Rules - AI MUST follow these
rules:
- "Follow patterns in PROJECT_SPEC.md"
- "Write tests for new functionality"
- "Keep code DRY - don't repeat patterns"
# Boundaries - Files/directories to never modify
boundaries:
never_touch:
- "*.lock"
- "node_modules/**"
- ".git/**"
{{#each customBoundaries}}
- "{{this}}"
{{/each}}
# Quality gate commands
commands:
test: "{{testCommand}}"
lint: "{{lintCommand}}"
typecheck: "{{typecheckCommand}}"
build: "{{buildCommand}}"
# Settings
settings:
max_retries: 3
auto_commit: true
3. .ralph/progress.txt
# RALPH Progress Log
Started: {{date}}
Project: {{projectName}}
Type: {{projectType}}
## Discovered Patterns
(Patterns will be logged here as they are discovered during iterations)
## Learnings
(Key learnings from each task will be recorded here)
---
4. .claude/settings.json (Yolo Mode)
Create project-level Claude Code settings with bypass permissions:
{
"permissions": {
"allow": [
"Bash",
"Read",
"Write",
"Edit",
"mcp__*"
],
"deny": [],
"defaultMode": "bypassPermissions"
}
}
This enables "yolo mode" - no permission prompts during development for this project.
5. prd.json (if feature provided)
Generate intelligent user stories based on:
- The feature description
- The tech stack
- The framework patterns
Example for "User authentication":
{
"project": "User Authentication",
"branchName": "ralph/user-authentication",
"description": "Implement user authentication with email/password",
"userStories": [
{
"id": "US-001",
"title": "Create User model and types",
"description": "Define data structures for User",
"acceptanceCriteria": [
"User type/interface defined",
"Types exported properly",
"Type checking passes"
],
"priority": 1,
"passes": false
},
// ... more stories based on tech stack
]
}
Step 4: Display Summary
After creating files, show a summary:
╔════════════════════════════════════════════════════════════════╗
║ Setup Complete! ║
╚════════════════════════════════════════════════════════════════╝
Created:
✓ PROJECT_SPEC.md - Project specification
✓ .ralph/config.yaml - RALPH configuration
✓ .ralph/progress.txt - Progress log
✓ .claude/settings.json - Yolo mode enabled (no permission prompts)
{{#if hasPrd}}
✓ prd.json - {{storyCount}} user stories for "{{feature}}"
{{/if}}
Project: {{projectName}}
Type: {{projectType}}
Language: {{language}}
Framework: {{framework}}
Next Steps:
1. Review PROJECT_SPEC.md and adjust if needed
{{#if hasPrd}}
2. Review prd.json and customize acceptance criteria
3. Run /ralph-run to start autonomous development
{{else}}
2. Run /prd [feature description] to create a PRD
3. Run /ralph-run to start autonomous development
{{/if}}
Important Guidelines
- ALWAYS use AskUserQuestion - Never assume project details
- Analyze before writing - For existing projects, read code first
- Match existing patterns - PRD stories should follow project conventions
- Be specific in acceptance criteria - Include actual commands, paths, patterns
- Respect user choices - If they say "None", don't add defaults
Example Interaction
User: /setup-project
Claude: Let me check if this is a new or existing project...
I see this is an empty directory. Let me ask some questions to set up your project.
[AskUserQuestion: Project type, Language, Framework, etc.]
Based on your answers, I'll create the configuration files...
[Creates PROJECT_SPEC.md, .ralph/config.yaml, .ralph/progress.txt]
Setup complete! Here's what I created:
- PROJECT_SPEC.md with your project specification
- .ralph/config.yaml with quality commands
- .ralph/progress.txt for tracking progress
Since you want to build "User authentication", I also created prd.json with 6 user stories.
Run /ralph-run when you're ready to start autonomous development!
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?