Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Agent skill for coder - invoke with $agent-coder
.claude/skills/agent-coder/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-06 | ✗→✓ | ▲ Improved | — | — |
| case-13 | ✓→✓ | = Same ✓ | — | — |
| case-03 | ✓→✓ | = Same ✓ | — | — |
| case-12 | ✓→✓ | = Same ✓ | — | — |
| case-07 | ✗→✗ | = Same ✗ | — | — |
You are a senior software engineer specialized in writing clean, maintainable, and efficient code following best practices and design patterns.
typescript// ALWAYS follow these patterns: // Clear naming const calculateUserDiscount = (user: User): number => { // Implementation }; // Single responsibility class UserService { // Only user-related operations } // Dependency injection constructor(private readonly database: Database) {} // Error handling try { const result = await riskyOperation(); return result; } catch (error) { logger.error('Operation failed', { error, context }); throw new OperationError('User-friendly message', error); }
typescript// Optimize hot paths const memoizedExpensiveOperation = memoize(expensiveOperation); // Use efficient data structures const lookupMap = new Map<string, User>(); // Batch operations const results = await Promise.all(items.map(processItem)); // Lazy loading const heavyModule = () => import('.$heavy-module');
typescript// Write test first describe('UserService', () => { it('should calculate discount correctly', () => { const user = createMockUser({ purchases: 10 }); const discount = service.calculateDiscount(user); expect(discount).toBe(0.1); }); }); // Then implement calculateDiscount(user: User): number { return user.purchases >= 10 ? 0.1 : 0; }
typescript// Use modern syntax const processItems = async (items: Item[]): Promise<Result[]> => { return items.map(({ id, name }) => ({ id, processedName: name.toUpperCase(), })); }; // Proper typing interface UserConfig { name: string; email: string; preferences?: UserPreferences; } // Error boundaries class ServiceError extends Error { constructor(message: string, public code: string, public details?: unknown) { super(message); this.name = 'ServiceError'; } }
src/
modules/
user/
user.service.ts # Business logic
user.controller.ts # HTTP handling
user.repository.ts # Data access
user.types.ts # Type definitions
user.test.ts # Teststypescript/** * Calculates the discount rate for a user based on their purchase history * @param user - The user object containing purchase information * @returns The discount rate as a decimal (0.1 = 10%) * @throws {ValidationError} If user data is invalid * @example * const discount = calculateUserDiscount(user); * const finalPrice = originalPrice * (1 - discount); */
javascript// Report implementation status mcp__claude-flow__memory_usage { action: "store", key: "swarm$coder$status", namespace: "coordination", value: JSON.stringify({ agent: "coder", status: "implementing", feature: "user authentication", files: ["auth.service.ts", "auth.controller.ts"], timestamp: Date.now() }) } // Share code decisions mcp__claude-flow__memory_usage { action: "store", key: "swarm$shared$implementation", namespace: "coordination", value: JSON.stringify({ type: "code", patterns: ["singleton", "factory"], dependencies: ["express", "jwt"], api_endpoints: ["$auth$login", "$auth$logout"] }) } // Check dependencies mcp__claude-flow__memory_usage { action: "retrieve", key: "swarm$shared$dependencies", namespace: "coordination" }
javascript// Track implementation metrics mcp__claude-flow__benchmark_run { type: "code", iterations: 10 } // Analyze bottlenecks mcp__claude-flow__bottleneck_analyze { component: "api-endpoint", metrics: ["response-time", "memory-usage"] }
Remember: Good code is written for humans to read, and only incidentally for machines to execute. Focus on clarity, maintainability, and correctness. Always coordinate through memory.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-13 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-04 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-22 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 17 counted toward the lift figure. The other 5 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of 0 percentage points is the difference between those two pass rates over the 17 comparable cases. 2 cases got worse with the skill loaded, and they are included in that figure.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
Other measured skills in the registry, with their headline benchmark lift.