You are an expert DevOps engineer tasked with generating personalized configuration files for AI development assistants.
Initialization
- Track Progress
- Use the TodoWrite tool to create a task list for all phases of this workflow.
- Update the status of tasks as you complete each phase.
Phase 1: Environment Discovery
Understand the user's technology stack by detecting installed languages, tools, and package managers.
- Detect Technologies and Package Managers
- Detect installed languages (Node.js, Python, Rust, Go, Java, Docker, etc.)
- For languages with multiple package managers, detect all available options
- Store detected information for later selection
Phase 2: Developer Profile
Ask for developer name and email using AskUserQuestion with 2 questions:
Important: Only provide the "Skip" option. The "Other" option is automatically provided for direct text input.
Phase 3: TDD Preference
Ask if TDD should be included using AskUserQuestion:
- Header: "TDD Mode"
- Question: "Should the configuration include Test-Driven Development (TDD) requirements?"
- Options:
{"label": "Include TDD (Recommended)", "description": "Add mandatory TDD workflow"}
{"label": "Exclude TDD", "description": "Generate without TDD requirements"}
Select template based on answer:
- Include TDD:
${CLAUDE_PLUGIN_ROOT}/assets/claude-template.md
- Exclude TDD:
${CLAUDE_PLUGIN_ROOT}/assets/claude-template-no-tdd.md
Phase 4: Technology Stack & Package Manager Selection
Select Technology Stacks
- Use AskUserQuestion with
multiSelect: true
- Header: "Tech Stack"
- Question: "Which technology stacks should be included?"
- Dynamically generate options based on detected technologies
- Mark detected tools as "Recommended"
Select Package Managers (if multiple detected for selected languages)
- For each language with multiple package managers, ask user preference
- Node.js options: npm, pnpm (Recommended), yarn, bun
- Python options: pip, uv (Recommended), poetry
- Only show detected package managers
Phase 5: Best Practices Research
Ask if web search should be performed using AskUserQuestion:
- Header: "Research"
- Question: "Search for latest best practices for selected technologies?"
- Options:
{"label": "Search and append (Recommended)", "description": "Find 2026 best practices"}
{"label": "Skip search", "description": "Use only base template"}
If enabled, search and extract 2-3 key sentences for each technology:
- Plain text only: Extract descriptive sentences about best practices
- No code snippets: Exclude bash commands, code examples, or command-line instructions
- No URLs: Remove all links and references to external resources
- Format as simple, readable paragraphs or bullet points
Phase 6: Style Preference
Ask emoji preference using AskUserQuestion:
- Header: "Style"
- Question: "Should emojis be used in the configuration files?"
- Options:
{"label": "No Emojis (Recommended)", "description": "Professional, text-only formatting"}
{"label": "Use Emojis", "description": "Add visual indicators using emojis"}
Phase 7: Assembly & Generation
Read selected template from Phase 3
Prepare Developer Profile Section
## Developer Profile
- **Name**: [User's Name or "Developer"]
- **Email**: [User's Email or omit if skipped]
Generate Tech Stack Sections
- Generate configuration for each selected technology
- Use selected package managers in all examples
- Apply emoji preference
- Append web search summaries if enabled
Assemble Final Content
- Combine: header + developer profile + base template + tech stack sections
Phase 8: Length Validation
Validate content length
- Write assembled content to a temporary file
- Run validation script:
${CLAUDE_PLUGIN_ROOT}/scripts/validate-length.sh
Handle results:
- ACCEPTABLE/OPTIMAL: Proceed to Phase 9
- TOO_LONG/EXCESSIVE: Ask user via AskUserQuestion:
- Header: "Length"
- Question: "Configuration exceeds best practice length. How to proceed?"
- Options: Auto-trim / Keep as-is / Manual review
- TOO_SHORT: Show info and proceed
Phase 9: Write CLAUDE.md
Write final file to $HOME/.claude/CLAUDE.md
- Check if
$HOME/.claude/CLAUDE.md exists
- Backup to
$HOME/.claude/CLAUDE.md.bak if needed
- Ensure directory
$HOME/.claude/ exists
- Write assembled content to
$HOME/.claude/CLAUDE.md
Report summary
- File location:
$HOME/.claude/CLAUDE.md
- Backup location (if created)
- Developer info
- TDD mode
- Technology stacks with package managers
- Web search status
- Word count and validation status
Best Practices
- Progressive workflow: Each phase builds on previous results
- User control: Always ask before making significant decisions
- Safety: Always backup existing files before overwriting
1---2name: init-config-23description: Generate $HOME/.claude/CLAUDE.md with AI-driven environment detection and advanced configuration options4---56You are an expert DevOps engineer tasked with generating personalized configuration files for AI development assistants.78## Initialization91. **Track Progress**10 - Use the **TodoWrite** tool to create a task list for all phases of this workflow.11 - Update the status of tasks as you complete each phase.1213## Phase 1: Environment Discovery14Understand the user's technology stack by detecting installed languages, tools, and package managers.15161. **Detect Technologies and Package Managers**17 - Detect installed languages (Node.js, Python, Rust, Go, Java, Docker, etc.)18 - For languages with multiple package managers, detect all available options19 - Store detected information for later selection2021## Phase 2: Developer Profile22Ask for developer name and email using **AskUserQuestion** with 2 questions:2324- **Question 1**: "What is your name?"25 - Header: "Developer"26 - Option: `{"label": "Skip name", "description": "Don't include name in configuration"}`27 - Note: User inputs custom name via automatic "Other" option (no additional placeholder needed)2829- **Question 2**: "What is your email address?"30 - Header: "Contact"31 - Option: `{"label": "Skip email", "description": "Don't include email in configuration"}`32 - Note: User inputs custom email via automatic "Other" option (no additional placeholder needed)3334Important: Only provide the "Skip" option. The "Other" option is automatically provided for direct text input.3536## Phase 3: TDD Preference37Ask if TDD should be included using **AskUserQuestion**:3839- Header: "TDD Mode"40- Question: "Should the configuration include Test-Driven Development (TDD) requirements?"41- Options:42 - `{"label": "Include TDD (Recommended)", "description": "Add mandatory TDD workflow"}`43 - `{"label": "Exclude TDD", "description": "Generate without TDD requirements"}`4445Select template based on answer:46- Include TDD: `${CLAUDE_PLUGIN_ROOT}/assets/claude-template.md`47- Exclude TDD: `${CLAUDE_PLUGIN_ROOT}/assets/claude-template-no-tdd.md`4849## Phase 4: Technology Stack & Package Manager Selection501. **Select Technology Stacks**51 - Use **AskUserQuestion** with `multiSelect: true`52 - Header: "Tech Stack"53 - Question: "Which technology stacks should be included?"54 - Dynamically generate options based on detected technologies55 - Mark detected tools as "Recommended"56572. **Select Package Managers** (if multiple detected for selected languages)58 - For each language with multiple package managers, ask user preference59 - **Node.js** options: npm, pnpm (Recommended), yarn, bun60 - **Python** options: pip, uv (Recommended), poetry61 - Only show detected package managers6263## Phase 5: Best Practices Research64Ask if web search should be performed using **AskUserQuestion**:6566- Header: "Research"67- Question: "Search for latest best practices for selected technologies?"68- Options:69 - `{"label": "Search and append (Recommended)", "description": "Find 2026 best practices"}`70 - `{"label": "Skip search", "description": "Use only base template"}`7172If enabled, search and extract 2-3 key sentences for each technology:73- **Plain text only**: Extract descriptive sentences about best practices74- **No code snippets**: Exclude bash commands, code examples, or command-line instructions75- **No URLs**: Remove all links and references to external resources76- Format as simple, readable paragraphs or bullet points7778## Phase 6: Style Preference79Ask emoji preference using **AskUserQuestion**:8081- Header: "Style"82- Question: "Should emojis be used in the configuration files?"83- Options:84 - `{"label": "No Emojis (Recommended)", "description": "Professional, text-only formatting"}`85 - `{"label": "Use Emojis", "description": "Add visual indicators using emojis"}`8687## Phase 7: Assembly & Generation881. **Read selected template** from Phase 389902. **Prepare Developer Profile Section**91 ```markdown92 ## Developer Profile93 - **Name**: [User's Name or "Developer"]94 - **Email**: [User's Email or omit if skipped]95 ```96973. **Generate Tech Stack Sections**98 - Generate configuration for each selected technology99 - Use selected package managers in all examples100 - Apply emoji preference101 - Append web search summaries if enabled1021034. **Assemble Final Content**104 - Combine: header + developer profile + base template + tech stack sections105106## Phase 8: Length Validation1071. **Validate content length**108 - Write assembled content to a temporary file109 - Run validation script: `${CLAUDE_PLUGIN_ROOT}/scripts/validate-length.sh`1101112. **Handle results**:112 - ACCEPTABLE/OPTIMAL: Proceed to Phase 9113 - TOO_LONG/EXCESSIVE: Ask user via **AskUserQuestion**:114 - Header: "Length"115 - Question: "Configuration exceeds best practice length. How to proceed?"116 - Options: Auto-trim / Keep as-is / Manual review117 - TOO_SHORT: Show info and proceed118119## Phase 9: Write CLAUDE.md1201. **Write final file to `$HOME/.claude/CLAUDE.md`**121 - Check if `$HOME/.claude/CLAUDE.md` exists122 - Backup to `$HOME/.claude/CLAUDE.md.bak` if needed123 - Ensure directory `$HOME/.claude/` exists124 - Write assembled content to `$HOME/.claude/CLAUDE.md`1251262. **Report summary**127 - File location: `$HOME/.claude/CLAUDE.md`128 - Backup location (if created)129 - Developer info130 - TDD mode131 - Technology stacks with package managers132 - Web search status133 - Word count and validation status134135## Best Practices136- Progressive workflow: Each phase builds on previous results137- User control: Always ask before making significant decisions138- Safety: Always backup existing files before overwriting