From acc
Provides CodeIgniter 4 knowledge on MVC architecture, DDD integration, security (Shield auth, Filters, CSRF), events, queues, infrastructure (cache, HTTP, email), testing, and antipatterns for PHP projects.
How this skill is triggered — by the user, by Claude, or both
Slash command
/acc:codeigniter-knowledgeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Quick reference for CodeIgniter 4 framework patterns and PHP implementation guidelines. CodeIgniter 4 is a complete rewrite of the framework, built for PHP 8.1+ with namespaces, autoloading, and a modern MVC architecture. It remains lightweight and fast while providing the tools needed for professional application development.
Quick reference for CodeIgniter 4 framework patterns and PHP implementation guidelines. CodeIgniter 4 is a complete rewrite of the framework, built for PHP 8.1+ with namespaces, autoloading, and a modern MVC architecture. It remains lightweight and fast while providing the tools needed for professional application development.
Request → index.php → Bootstrap → Routing
→ Filters (before) → Controller → Service/Model → View
→ Filters (after) → Response
Key principles:
EventDispatcherInterface port (not CI4 Events directly)use CodeIgniter\... in Domain layer| Violation | Where to Look | Severity |
|---|---|---|
| Business logic in Controller | app/Controllers/*.php | Critical |
| Domain depends on CI4 framework | use CodeIgniter\ in Domain classes | Critical |
| Direct DB queries in Controller | $this->db-> in Controllers | Critical |
| Model contains business rules | Complex if/switch in Model methods | Warning |
| Missing input validation | Controllers without $this->validate() | Warning |
| God Controller | Controllers > 300 lines | Warning |
| Shield UserIdentity in Domain | use CodeIgniter\Shield in Domain layer | Critical |
| Queue in Domain | service('queue') in Domain layer | Critical |
| Cache/HTTP Client in Domain | CacheInterface or CURLRequest in Domain | Critical |
| Missing queue resilience | Jobs without $retryAfter/$tries | Warning |
| Hardcoded config values | Magic strings instead of config() | Info |
<?php
declare(strict_types=1);
namespace App\Controllers\Api;
use App\Controllers\BaseController;
use CodeIgniter\HTTP\ResponseInterface;
final class OrderController extends BaseController
{
public function __construct(
private readonly OrderService $orderService,
) {}
public function show(string $id): ResponseInterface
{
$order = $this->orderService->findById($id);
return $this->response->setJSON(['id' => $order->id, 'status' => $order->status->value]);
}
}
<?php
declare(strict_types=1);
namespace App\Services;
final readonly class OrderService
{
public function __construct(
private OrderRepositoryInterface $orders,
private EventDispatcherInterface $events,
) {}
public function confirm(string $orderId): void
{
$order = $this->orders->findById($orderId)
?? throw new OrderNotFoundException($orderId);
$order->confirm();
$this->orders->save($order);
$this->events->dispatch(new OrderConfirmedEvent($order->id()));
}
}
<?php
declare(strict_types=1);
namespace App\Models;
use CodeIgniter\Model;
final class OrderModel extends Model
{
protected $table = 'orders';
protected $primaryKey = 'id';
protected $returnType = OrderEntity::class;
protected $allowedFields = ['customer_id', 'status', 'total', 'notes'];
protected $useTimestamps = true;
}
For detailed information, load these reference files:
references/architecture.md -- CI4 MVC structure, modules, directory layoutreferences/ddd-integration.md -- Domain extraction, Repository pattern, Value Objects in CI4references/routing-http.md -- Controllers, Filters, RESTful routing, validationreferences/persistence.md -- CI4 Model, Query Builder, Entity classes, migrationsreferences/dependency-injection.md -- Services class, custom registration, DI patternsreferences/testing.md -- CIUnitTestCase, DatabaseTestTrait, feature testing, mockingreferences/security.md -- Shield authentication/authorization, Filters, CSRF, password hashing with DDDreferences/event-system.md -- CI4 Events, domain event dispatching, lifecycle events, testingreferences/queue.md -- codeigniter4/queue jobs, workers, retry, chained jobs, queue events with DDDreferences/infrastructure-components.md -- Cache, CURLRequest HTTP client, Email, Throttler with DDD portsreferences/antipatterns.md -- Common violations with detection patterns and fixesnpx claudepluginhub dykyi-roman/awesome-claude-code --plugin accProvides Laravel knowledge base on architecture, DDD integration, Eloquent persistence, service container, security, queues, events, testing, and antipatterns for scalable PHP projects.
Provides production-grade, idiomatic Laravel solutions with clean architecture, security best practices, performance optimizations, and modern standards for Laravel 10/11+. Use for features, refactoring, APIs, auth, services, DB interactions, and code reviews.
Provides Laravel patterns for PHP apps including Eloquent ORM, migrations, routing, controllers, queues, jobs, authentication, middleware, and testing. Use for Laravel projects.