dykyi-roman/awesome-claude-code/codeigniter-knowledge

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

CodeIgniter 4 framework knowledge base. Provides CI4 MVC architecture, DDD integration, persistence, services, security (Shield auth, Filters authorization, CSRF), event system, queue (codeigniter4/queue jobs, workers, retry), infrastructure components (cache, HTTP client, email, throttler), testing, and antipatterns for CodeIgniter PHP projects.

Install

npx vskill@latest install dykyi-roman/awesome-claude-code/codeigniter-knowledge

SKILL.md

CodeIgniter Knowledge Base

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.

Core Principles

MVC Architecture
Request → index.php → Bootstrap → Routing
→ Filters (before) → Controller → Service/Model → View
→ Filters (after) → Response

Key principles:

  • Lightweight core with minimal overhead
  • HMVC-capable via modules (app/Modules/)
  • Services container for dependency management
  • Filters as middleware equivalent
  • Entity classes for data hydration

Quick Checklists

DDD-Compatible CI4 Project
  • [ ] Domain logic extracted from Models into Domain layer
  • [ ] Repository interfaces defined in Domain, implemented in Infrastructure
  • [ ] Value Objects used instead of primitive types for domain concepts
  • [ ] CI4 Models used only as persistence adapters
  • [ ] Services registered in Config\Services for dependency injection
  • [ ] Business rules not in Controllers or Filters
  • [ ] Domain Events dispatched through domain EventDispatcherInterface port (not CI4 Events directly)
  • [ ] Input validation at Controller level (not in Domain)
  • [ ] Shield Groups/Permissions used only at Filter/Route level; Domain uses Specifications
  • [ ] Queue job handlers delegate to Application UseCases
  • [ ] Infrastructure components (Cache, HTTP Client, Email) accessed via domain ports
Clean Architecture Checks
  • [ ] No use CodeIgniter\... in Domain layer
  • [ ] No direct database access outside Repository implementations
  • [ ] Controllers delegate to Application Services / Use Cases
  • [ ] DTOs used for cross-layer data transfer
  • [ ] Config\Services wires interfaces to implementations
  • [ ] Entities are framework-free domain objects (not CI4 Entity)

Common Violations Quick Reference

ViolationWhere to LookSeverity
Business logic in Controllerapp/Controllers/*.phpCritical
Domain depends on CI4 frameworkuse CodeIgniter\ in Domain classesCritical
Direct DB queries in Controller$this->db-> in ControllersCritical
Model contains business rulesComplex if/switch in Model methodsWarning
Missing input validationControllers without $this->validate()Warning
God ControllerControllers > 300 linesWarning
Shield UserIdentity in Domainuse CodeIgniter\Shield in Domain layerCritical
Queue in Domainservice('queue') in Domain layerCritical
Cache/HTTP Client in DomainCacheInterface or CURLRequest in DomainCritical
Missing queue resilienceJobs without $retryAfter/$triesWarning
Hardcoded config valuesMagic strings instead of config()Info

PHP 8.4 CodeIgniter Patterns

Controller (Thin, Delegates to Service)
php
<?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]);
}
}
Service (Application Layer)
php
<?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()));
}
}
Model as Repository Adapter
php
<?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;
}

References

For detailed information, load these reference files:

  • references/architecture.md -- CI4 MVC structure, modules, directory layout
  • references/ddd-integration.md -- Domain extraction, Repository pattern, Value Objects in CI4
  • references/routing-http.md -- Controllers, Filters, RESTful routing, validation
  • references/persistence.md -- CI4 Model, Query Builder, Entity classes, migrations
  • references/dependency-injection.md -- Services class, custom registration, DI patterns
  • references/testing.md -- CIUnitTestCase, DatabaseTestTrait, feature testing, mocking
  • references/security.md -- Shield authentication/authorization, Filters, CSRF, password hashing with DDD
  • references/event-system.md -- CI4 Events, domain event dispatching, lifecycle events, testing
  • references/queue.md -- codeigniter4/queue jobs, workers, retry, chained jobs, queue events with DDD
  • references/infrastructure-components.md -- Cache, CURLRequest HTTP client, Email, Throttler with DDD ports
  • references/antipatterns.md -- Common violations with detection patterns and fixes

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
96
Repository forks
25
7-day trend score
23

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 18 Mar 2026, 7 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/dykyi-roman/awesome-claude-code/codeigniter-knowledge/badge)](https://verified-skill.com/skills/dykyi-roman/awesome-claude-code/codeigniter-knowledge)

Something wrong with this skill or its page? Tell us.