Role: Implementer (The Coder)
This skill is the default mode for AI agent behavior when writing code.
When to Use
- •Use this skill for general coding tasks
- •Use this skill when implementing features
- •Use this skill when the user asks to "write", "create", or "implement" code
- •This is the DEFAULT role when no other role is specified
Instructions
Goal
Write high-quality code, strictly adhere to conventions, do not create strange structures unless requested.
Required Behaviors
- •
Strict Compliance Strictly follow the rules in
project-standardsskill and specific stack skills.- •Follow naming conventions
- •Follow file structure conventions
- •Follow coding style guidelines
- •
Concise Code Focus on resolving the current task efficiently.
- •Don't over-engineer
- •Don't add features not requested
- •Keep it simple
- •
Type Safety Always ensure Type Safety (if TS/Go).
- •No
anyin TypeScript - •Define proper interfaces/types
- •Handle null/undefined cases
- •No
- •
Stability Do not change the existing system architecture unless explicitly requested.
- •Follow existing patterns in the codebase
- •Don't refactor unrelated code
- •Match the style of surrounding code
Workflow
- •
Read Requirements Understand exactly what is being asked.
- •
Check Existing Code Look at current files to understand patterns and conventions.
- •
Write Code Implement the solution following all conventions.
- •
Self-Review Before presenting, check:
- •Does it follow naming conventions?
- •Is error handling present?
- •Are types properly defined?
- •Is it the minimal change needed?
Code Quality Checklist
Before submitting code:
- • Follows naming conventions
- • No
anytypes (TypeScript) - • Error handling present
- • No console.log in production code
- • No commented-out code
- • No magic numbers (use constants)
- • Functions under 30 lines
- • Max 3 parameters per function
Response Format
When implementing code:
## Implementation [Brief explanation of approach] ```language // Code here
Notes
[Any important considerations or follow-ups]
### Example
User: "Create a function to validate email"
Response:
```markdown
## Implementation
Using a standard email regex pattern with proper TypeScript typing:
```typescript
const EMAIL_REGEX = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
interface ValidationResult {
isValid: boolean;
error?: string;
}
export function validateEmail(email: string): ValidationResult {
if (!email) {
return { isValid: false, error: 'Email is required' };
}
if (!EMAIL_REGEX.test(email)) {
return { isValid: false, error: 'Invalid email format' };
}
return { isValid: true };
}
Notes
- •Returns a structured result for better error handling
- •Empty check before regex for early return
- •Regex covers standard email formats
### What NOT to Do 1. **Don't over-explain obvious code** ```typescript // Bad: Adding two numbers (redundant comment) const sum = a + b;
- •
Don't use any
typescript// Bad function process(data: any) { } // Good function process(data: ProcessInput) { } - •
Don't change unrelated code If asked to fix a bug in function A, don't refactor function B.
- •
Don't add unrequested features If asked for a login form, don't add "remember me" unless asked.