From acc
Generates minimal safe bug fixes for PHP 8.4 using DDD/Clean Architecture patterns and templates for null pointers logic errors boundaries race conditions resource leaks exceptions type safety SQL injection and infinite loops.
How this skill is triggered — by the user, by Claude, or both
Slash command
/acc:generate-bug-fixThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Templates and patterns for generating minimal, safe bug fixes.
Templates and patterns for generating minimal, safe bug fixes.
| Category | Patterns | See |
|---|---|---|
| Null Pointer | Guard clause, Null object, Optional return | templates.md |
| Logic Error | Condition correction, Boolean inversion, Missing case | templates.md |
| Boundary | Empty check, Index bounds, Range validation | templates.md |
| Race Condition | Database locking, Optimistic locking, Atomic operation | templates.md |
| Resource Leak | Try-finally, Higher-level API, Pool return | templates.md |
| Exception | Specific catch, Exception chaining, Proper re-throw | templates.md |
| Type Safety | Strict types, Type validation, Boundary coercion | templates.md |
| SQL Injection | Prepared statement, Query builder | templates.md |
| Infinite Loop | Iteration limit, Visited tracking, Depth limit | templates.md |
$entity = $this->repository->find($id);
if ($entity === null) {
throw new EntityNotFoundException($id);
}
// Wrong: if ($a > $b)
// Fixed: if ($a >= $b)
if ($items === []) {
throw new EmptyCollectionException();
}
$this->em->beginTransaction();
try {
$entity = $this->repository->findWithLock($id);
// ... modify ...
$this->em->commit();
} catch (\Throwable $e) {
$this->em->rollback();
throw $e;
}
$resource = acquire();
try {
return process($resource);
} finally {
release($resource);
}
fix(<scope>): <short description>
<detailed description of what was wrong and how it's fixed>
Fixes #<issue-number>
npx claudepluginhub dykyi-roman/awesome-claude-code --plugin accProvides bug fix patterns and symptoms for PHP 8.4 apps in DDD, CQRS, Clean Architecture: logic errors, null pointers, boundaries, race conditions.
Fixes bugs using test-first loop: add minimal failing reproduction test, apply smallest fix to affected module, verify full test suite and linters. Use for reported bugs needing verified low-impact fixes.