Generic feature developer

From travisjneuman/.claude · View interactive version

Generic feature developer is an AI agent skill from the GitHub repository travisjneuman/.claude. Guide feature development with architecture patterns for any tech stack. Covers frontend, backend, full-stack, and automation projects. Use when adding new features, modifying systems, or planning changes.

How to use this skill

Skill file

Generic Feature Developer

Guide feature development across any tech stack.

When to Use This Skill

Use for:

Don't use when:

Development Workflow

  1. Understand - Read CLAUDE.md, identify affected files, list constraints
  2. Plan - Choose patterns, design data flow, identify edge cases
  3. Implement - Small reviewable changes, commit frequently
  4. Review & Document - Review the diff against edge cases and callers, update docs, performance check

Architecture by Project Type

Static Sites

project/
├── index.html
├── css/           # variables.css, style.css
├── js/            # main.js, utils.js
└── assets/

Patterns: CSS variables, ES modules, event delegation

React/Next.js

src/
├── components/    # ui/, features/, layout/
├── hooks/
├── stores/
├── services/
└── types/

Patterns: Container/Presentational, custom hooks, Zustand/React Query

NestJS Backend

src/
├── modules/[feature]/
│   ├── feature.module.ts
│   ├── feature.controller.ts
│   ├── feature.service.ts
│   └── dto/
└── common/        # guards, decorators

Patterns: Module organization, DTOs, Guards, Prisma

Feature Decision Framework

Scope Assessment (First)

| Scope | Action |

| --------------------- | ------------------------------------- |

| Single component | Implement directly |

| Cross-cutting concern | Design interface first |

| New subsystem | Create architecture doc, get approval |

Build vs Integrate

| Factor | Build Custom | Use Library |

| ------------------------ | ------------ | ----------- |

| Core to product | Yes | |

| Commodity feature | | Yes |

| Tight integration needed | Yes | |

| Time-critical | | Yes |

| Long-term ownership | Yes | |

State Management Selection

| Scope | Solution |

| --------------- | ------------------------ |

| Component-local | useState/useReducer |

| Feature-wide | Context or Zustand slice |

| App-wide | Zustand/Redux store |

| Server state | React Query/SWR |

| Form state | React Hook Form |

API Design Checklist

Common Features

Adding UI Component

  1. Create component → 2. Export → 3. Review usage and edge cases → 4. Document

Adding API Endpoint

  1. Define route → 2. Add validation → 3. Implement service → 4. Review error paths

Adding State Management

  1. Define shape → 2. Create store → 3. Add actions → 4. Connect components

Database Changes

  1. Design schema → 2. Create migration → 3. Update models → 4. Add service

Data Flow Patterns

Frontend Data Flow

User Action → Event Handler → State Update → Re-render → UI Feedback

API Request Flow

Request → Auth Check → Validation → Business Logic → Database → Response

Event-Driven Patterns

| Event Type | Approach |

| ---------------- | --------------------------- |

| User events | Immediate feedback |

| Server events | WebSocket/SSE for real-time |

| Background tasks | Queue for long operations |

Error Handling Strategy

| Error Type | Frontend | Backend |

| ------------ | ------------------------- | ------------------ |

| Validation | Inline field errors | 400 + field errors |

| Auth | Redirect to login | 401/403 |

| Not Found | Empty state or redirect | 404 |

| Server Error | Generic message + retry | 500 + log |

| Network | Offline indicator + queue | N/A |

Frontend Pattern

try {
  await apiCall();
} catch (error) {
  if (error instanceof ValidationError) showFieldErrors(error.fields);
  else showGenericError();
}

Backend Pattern

if (err instanceof ValidationError)
  return res.status(400).json({ errors: err.errors });
if (err instanceof AuthError)
  return res.status(401).json({ message: "Unauthorized" });

Testing Strategy (when the user asks for tests)

| Layer | Type | Tools |

| ----- | ----------- | --------------- |

| UI | Component | Testing Library |

| Logic | Unit | Jest, Vitest |

| API | Integration | Supertest |

| E2E | End-to-end | Cypress |

Performance

Frontend: Code splitting, lazy loading, memoization, debounce

Backend: DB indexing, caching, connection pooling, background jobs

Feature Implementation Checklist

Before marking feature complete:

See Also

READ shared standards when:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.