Write Code Skill
Trigger Phrases
This skill is automatically triggered when the user:
- Asks to "write", "create", "implement", "add", or "generate" code
- Requests new files, functions, classes, or modules
- Wants to add new features or functionality
- Says things like "build", "develop", or "code"
- Requests boilerplate, scaffolding, or templates
- Mentions "new feature", "new function", or "new component"
Delegation Instructions
When this skill is triggered:
- CRITICAL: Pass ALL collected information - Include every answer, decision, and preference collected from the user
- Delegate to the
code-writer agent with complete context
- Include ALL user answers about:
- Specific features and requirements
- Technical decisions and approaches
- Library preferences (CRITICAL: include "no libraries" if user chose that)
- Implementation details and preferences
- File structure and naming preferences
- Provide project context and standards
- Include any constraints or requirements
Context to Pass (MUST INCLUDE ALL)
- ALL User Answers: Every answer collected during information gathering:
- Feature specifications and requirements
- Technical decisions (how to implement X, how to do Y)
- Library Decisions: Which libraries to use OR "no libraries - implement from scratch"
- Implementation approaches and preferences
- File structure preferences
- Naming conventions
- User Request: The original request for code
- Target Location: File paths or directories mentioned
- Language/Framework: Any specific technologies mentioned
- Requirements: Functional requirements or acceptance criteria
- Existing Context: Related files or patterns to follow
- Project Standards: Coding conventions from CLAUDE.md
- Dependencies: Any dependencies or prerequisites
IMPORTANT: Never delegate without passing ALL collected information. The agent needs complete context to work correctly.
Agent Responsibilities
The code-writer agent will:
- Analyze the request and plan the implementation
- Search for existing patterns and conventions in the codebase
- Write clean, well-structured code following project standards
- Create or modify files as needed
- Ensure code follows best practices
- Maintain consistency with existing codebase
- Consider testability and maintainability
Usage Examples
Example 1: New Feature
User: "Add user authentication to the app"
Delegation: Delegate to code-writer with:
- Feature: User authentication
- Requirements: Login, logout, session management
- Context: Existing user model and API structure
Example 2: New Function
User: "Create a function to calculate total price"
Delegation: Delegate to code-writer with:
- Function purpose: Calculate total price
- Input/output requirements
- Context: Related pricing code
Example 3: New Component
User: "Build a dashboard component"
Delegation: Delegate to code-writer with:
- Component type: Dashboard
- Requirements: Display metrics, charts
- Context: Existing UI patterns
Best Practices
- ALWAYS pass ALL collected information - Never omit any user answers or decisions
- Especially important: Include library preferences (or "no libraries" decision)
- Always delegate to code-writer for code creation
- Provide comprehensive, complete context
- Include project standards
- Reference similar existing code
- Specify requirements clearly
- Maintain context consistency across all delegations
1---2name: write-code3description: Triggered when user asks to write code, create files, implement features, add functionality, or generate new code. Automatically delegates to the code-writer agent.4---56# Write Code Skill78## Trigger Phrases910This skill is automatically triggered when the user:1112- Asks to "write", "create", "implement", "add", or "generate" code13- Requests new files, functions, classes, or modules14- Wants to add new features or functionality15- Says things like "build", "develop", or "code"16- Requests boilerplate, scaffolding, or templates17- Mentions "new feature", "new function", or "new component"1819## Delegation Instructions2021When this skill is triggered:22231. **CRITICAL: Pass ALL collected information** - Include every answer, decision, and preference collected from the user242. Delegate to the `code-writer` agent with complete context253. Include ALL user answers about:26 - Specific features and requirements27 - Technical decisions and approaches28 - **Library preferences (CRITICAL: include "no libraries" if user chose that)**29 - Implementation details and preferences30 - File structure and naming preferences314. Provide project context and standards325. Include any constraints or requirements3334## Context to Pass (MUST INCLUDE ALL)3536- **ALL User Answers**: Every answer collected during information gathering:37 - Feature specifications and requirements38 - Technical decisions (how to implement X, how to do Y)39 - **Library Decisions**: Which libraries to use OR "no libraries - implement from scratch"40 - Implementation approaches and preferences41 - File structure preferences42 - Naming conventions43- **User Request**: The original request for code44- **Target Location**: File paths or directories mentioned45- **Language/Framework**: Any specific technologies mentioned46- **Requirements**: Functional requirements or acceptance criteria47- **Existing Context**: Related files or patterns to follow48- **Project Standards**: Coding conventions from CLAUDE.md49- **Dependencies**: Any dependencies or prerequisites5051**IMPORTANT**: Never delegate without passing ALL collected information. The agent needs complete context to work correctly.5253## Agent Responsibilities5455The code-writer agent will:56571. Analyze the request and plan the implementation582. Search for existing patterns and conventions in the codebase593. Write clean, well-structured code following project standards604. Create or modify files as needed615. Ensure code follows best practices626. Maintain consistency with existing codebase637. Consider testability and maintainability6465## Usage Examples6667### Example 1: New Feature6869**User**: "Add user authentication to the app"7071**Delegation**: Delegate to code-writer with:7273- Feature: User authentication74- Requirements: Login, logout, session management75- Context: Existing user model and API structure7677### Example 2: New Function7879**User**: "Create a function to calculate total price"8081**Delegation**: Delegate to code-writer with:8283- Function purpose: Calculate total price84- Input/output requirements85- Context: Related pricing code8687### Example 3: New Component8889**User**: "Build a dashboard component"9091**Delegation**: Delegate to code-writer with:9293- Component type: Dashboard94- Requirements: Display metrics, charts95- Context: Existing UI patterns9697## Best Practices9899- **ALWAYS pass ALL collected information** - Never omit any user answers or decisions100- **Especially important**: Include library preferences (or "no libraries" decision)101- Always delegate to code-writer for code creation102- Provide comprehensive, complete context103- Include project standards104- Reference similar existing code105- Specify requirements clearly106- Maintain context consistency across all delegations