From claude-code-dev
Detects reusable code patterns, workflow automations, best practices, and config setups during implementation for potential new skills.
npx claudepluginhub jpoutrin/product-forge --plugin claude-code-devThis skill uses the workspace's default tool permissions.
Recognize and note reusable patterns during implementation for potential contribution to Product Forge.
Analyzes codebase patterns and generates custom skills to automate repetitive workflows and enforce consistency across projects.
Extracts reusable patterns like error resolutions, user corrections, and debugging techniques from Claude Code sessions at end via Stop hook and saves as learned skills.
Creates standalone reusable skills from proven patterns or debugging solutions, generating SKILL.md, README, and reference docs/examples. For recurring, non-obvious, or broadly applicable fixes.
Share bugs, ideas, or general feedback.
Recognize and note reusable patterns during implementation for potential contribution to Product Forge.
When working on projects, Claude often implements patterns that could benefit the broader Product Forge ecosystem. This skill helps identify those patterns so they can be captured by the feedback hooks and potentially become new skills, commands, or templates.
Implementations that follow consistent, reusable structures:
Multi-step processes that could be automated:
Settings and configurations that are commonly needed:
Note patterns when you observe:
Only patterns worth capturing should be:
| Criterion | Description |
|---|---|
| Reusable | Applies to multiple projects or contexts |
| Non-trivial | More than simple one-liners or obvious code |
| Generalizable | Not too specific to one codebase |
| Documented | Can be explained clearly to others |
| Tested | Validated in at least one real project |
# Consistent factory for test fixtures
class UserFactory:
@classmethod
def create(cls, **overrides):
defaults = {"name": "Test User", "email": "test@example.com"}
defaults.update(overrides)
return User.objects.create(**defaults)
Why it's a good pattern: Reusable across Django projects, reduces test boilerplate, follows established factory pattern.
# Consistent API response format
def api_response(data=None, error=None, status=200):
return {
"success": error is None,
"data": data,
"error": error,
"timestamp": datetime.now().isoformat()
}
Why it's a good pattern: Standardizes API responses, easy to implement, improves API consistency.
# Standard Python project pre-commit
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
hooks:
- id: ruff
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
hooks:
- id: mypy
Why it's a good pattern: Common Python setup, enforces code quality, easy to adapt.
# Only works for this exact database schema
def get_acme_corp_users_with_subscription():
return User.objects.filter(company="ACME", has_subscription=True)
Problem: Too specific to one project/company.
# Just basic Python
def add_numbers(a, b):
return a + b
Problem: Doesn't provide enough value to warrant a pattern.
# Missing error handling and edge cases
def parse_config(path):
return json.load(open(path))
Problem: Not production-ready, would need significant expansion.
When you recognize a valuable pattern:
The Stop hook's Haiku analysis will detect patterns based on:
Captured patterns may become:
| Destination | When |
|---|---|
| Skill | Knowledge/guidelines that Claude applies |
| Command | User-invoked action or wizard |
| Template | Scaffolding for new projects/files |
| Agent | Specialized automated workflow |
/sync-feedback to review captured patterns