Efficient Feature Handler
Streamline your workflow with this turn, ideas, into, fully. Includes structured workflows, validation checks, and reusable patterns for orchestration.
Efficient Feature Handler
Orchestrate end-to-end feature implementation with automated discovery, architecture design, coding, and validation in a single streamlined command.
When to Use This Command
Run this command when...
- You need to implement a complete feature from requirements through tested, working code without managing each step manually
- A feature request has arrived and you want Claude to autonomously discover the codebase, design the architecture, and implement it
- You want to reduce the back-and-forth of feature development by letting the handler manage the full lifecycle
- You are working on a well-defined feature that fits within existing codebase patterns and conventions
- You need a repeatable, consistent process for feature delivery that includes test coverage
Quick Start
# .claude/commands/efficient-feature-handler.md --- name: Efficient Feature Handler description: End-to-end feature implementation with discovery, design, and validation command: true --- Implement this feature efficiently: $ARGUMENTS 1. Discover relevant code patterns and dependencies 2. Design architecture fitting existing conventions 3. Implement with full test coverage 4. Validate all tests pass
# Invoke the command claude "/efficient-feature-handler add user avatar upload with S3 storage" # Expected output # > Scanning codebase for upload patterns... # > Found: FileUploadService, S3Client wrapper, multer middleware # > Designing avatar upload architecture... # > Creating: AvatarController, AvatarService, avatar.routes.ts # > Writing unit tests (4 files)... # > Running test suite... 24/24 passed # > Feature complete: 6 files created, 2 modified
Core Concepts
| Concept | Description |
|---|---|
| Discovery Phase | Scans codebase to find related patterns, services, and conventions before writing code |
| Architecture Fit | Designs new components to match existing project structure and naming conventions |
| Convention Adherence | Follows detected patterns for error handling, logging, and response formatting |
| Test Generation | Creates unit and integration tests matching the project testing framework |
| Validation Gate | Runs full test suite and linting before reporting completion |
Feature Handler Pipeline
========================
Requirements --> Discovery --> Design --> Implement --> Test --> Validate
| | | | | |
Parse args Scan patterns Map to Write code Generate Run suite
Identify Find deps conventions Follow tests Lint check
scope Read configs Architecture patterns Assert Report
Configuration
| Parameter | Description | Default | Example | Required |
|---|---|---|---|---|
$ARGUMENTS | Feature description with context and constraints | none | "add CSV export to reports" | Yes |
test_framework | Testing framework to use for generated tests | auto-detect | jest, vitest, pytest | No |
skip_validation | Skip final test suite run after implementation | false | true | No |
architecture_style | Preferred code organization pattern | project default | "layered", "modular" | No |
dry_run | Preview planned changes without writing files | false | true | No |
Best Practices
-
Provide specific, scoped feature descriptions -- Include the domain, action, and any constraints in your arguments. "Add pagination to /api/users with cursor-based navigation" works far better than "add pagination."
-
Run in a feature branch -- Always invoke from a dedicated feature branch so the handler changes can be reviewed via pull request before merging.
-
Review generated architecture before large features -- For features touching more than five files, use
dry_run: truefirst to validate the planned approach matches your expectations. -
Include acceptance criteria in the arguments -- Mention expected behaviors like "should return 413 for files over 10MB" so the handler generates targeted test cases.
-
Combine with status commands for tracking -- After the handler completes, use a status or report command to log what was built and track it in your project management system.
Common Issues
Handler misidentifies existing patterns: When the codebase has inconsistent patterns across modules, the discovery phase may pick up the wrong convention. Fix this by specifying the target module or directory in your arguments: "add feature X following the patterns in src/modules/billing."
Tests fail due to missing environment setup: Generated integration tests may require database connections or API keys not available locally. Ensure your .env.test file has all required variables, or add --unit-only to restrict test generation to unit tests.
Feature scope too broad for single execution: If the handler stalls or produces incomplete results, the feature is likely too large. Break it into sub-features and run the handler once per component, then wire them together manually.
Reviews
No reviews yet. Be the first to review this template!
Similar Templates
Git Commit Message Generator
Generates well-structured conventional commit messages by analyzing staged changes. Follows Conventional Commits spec with scope detection.
React Component Scaffolder
Scaffolds a complete React component with TypeScript types, Tailwind styles, Storybook stories, and unit tests. Follows project conventions automatically.
CI/CD Pipeline Generator
Generates GitHub Actions workflows for CI/CD including linting, testing, building, and deploying. Detects project stack automatically.