mcpField
G
generic-feature-developer

generic-feature-developer

github.com/travisjneumanDevelopment106138 installsUpdated 1d ago
Repository

About generic-feature-developer

A feature development guide for any tech stack, helping developers move from understanding a codebase to planning, implementation, and review. It covers architecture choices, data flow, error handling, and performance considerations.

Key features

  1. 01Structured feature development workflow
  2. 02Architecture patterns by project type
  3. 03Scope assessment and approach selection
  4. 04State management guidance
  5. 05Data flow and error handling patterns
  6. 06Feature completion checklist

Use cases

  1. 01Planning a feature for an existing codebase
  2. 02Choosing between custom implementation and integration
  3. 03Designing API and state management flows
  4. 04Reviewing edge cases and error handling

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/travisjneuman/.claude --skill generic-feature-developer

After installing, type/generic-feature-developerin Claude Code to confirm it loaded.

Details

From the project README

Generic Feature Developer

Guide feature development across any tech stack.

When to Use This Skill

Use for:

  • Adding new features to existing codebase
  • Modifying or extending current systems
  • Planning architectural changes
  • Choosing between implementation approaches
  • Designing data flow for new functionality

Don't use when:

  • Pure UI/styling work → use generic-design-system
  • UX design decisions → use generic-ux-designer
  • Code review → use generic-code-reviewer

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)
ScopeAction
Single componentImplement directly
Cross-cutting concernDesign interface first
New subsystemCreate architecture doc, get approval
Build vs Integrate
FactorBuild CustomUse Library
Core to productYes
Commodity featureYes
Tight integration neededYes
Time-criticalYes
Long-term ownershipYes
State Management Selection
ScopeSolution
Component-localuseState/useReducer
Feature-wideContext or Zustand slice
App-wideZustand/Redux store
Server stateReact Query/SWR
Form stateReact Hook Form
API Design Checklist
  • RESTful or GraphQL decision documented
  • Authentication method chosen
  • Error response format standardized
  • Pagination strategy defined
  • Rate limiting considered

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
  • Optimistic updates: Update UI immediately, rollback on error
  • Pessimistic updates: Wait for server confirmation
  • Decision: Optimistic for low-risk (likes), pessimistic for high-risk (payments)
API Request Flow
Request → Auth Check → Validation → Business Logic → Database → Response
  • Early exit on validation failure
  • Transaction boundaries around multi-step operations
  • Consistent error response format
Event-Driven Patterns
Event TypeApproach
User eventsImmediate feedback
Server eventsWebSocket/SSE for real-time
Background tasksQueue for long operations

Error Handling Strategy

Error TypeFrontendBackend
ValidationInline field errors400 + field errors
AuthRedirect to login401/403
Not FoundEmpty state or redirect404
Server ErrorGeneric message + retry500 + log
NetworkOffline indicator + queueN/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)

LayerTypeTools
UIComponentTesting Library
LogicUnitJest, Vitest
APIIntegrationSupertest
E2EEnd-to-endPlaywright

Performance

Frontend: Code splitting, lazy loading, memoization, debounce Backend: DB indexing, caching, connection pooling, background jobs

Feature Implementation Checklist

Before marking feature complete:

  • Works for happy path
  • Error states handled
  • Loading states implemented
  • Edge cases reviewed
  • TypeScript types complete
  • Tests written (only if the user asked for them)
  • Documentation updated

See Also

  • Code Review Standards - Quality checks
  • Design Patterns - UI patterns
  • generic-design-system - For styling and visual consistency
  • generic-ux-designer - For UX flow decisions
  • Project CLAUDE.md - Workflow rules

READ shared standards when:

  • Complex feature design → CODE_REVIEW_STANDARDS.md (architecture section)
  • UI component patterns → DESIGN_PATTERNS.md (component section)

Comments

Markdown supported