ci4-api

ci4-api is a skill for Claude Code, Codex from enlivenapp/Codeigniter4-App-and-API-Skills-for-Claude-Code. It costs 93 tokens per session (2,169 once invoked), scanned A, original, MIT.

A guide to building REST APIs with CodeIgniter 4, where separate applications can exchange data through web requests and JSON responses.

In plain words
What is it for?
It covers API controllers, authentication tokens, request validation, error responses, rate limits, cross-origin access, and incoming or outgoing webhooks.
Why use it?
It helps keep API endpoints predictable, secure, versioned, and usable by websites, mobile apps, and outside services.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/enlivenapp/codeigniter4-app-and-api-skills-for-claude-code/ci4-api
Any agent
npx skills add enlivenapp/Codeigniter4-App-and-API-Skills-for-Claude-Code --skill ci4-api
Clone the repo
git clone --depth 1 https://github.com/enlivenapp/Codeigniter4-App-and-API-Skills-for-Claude-Code

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ci4-api

README.md
[![agentmods](https://agentmods.dev/badge/skills/enlivenapp/codeigniter4-app-and-api-skills-for-claude-code/ci4-api.svg)](https://agentmods.dev/skills/enlivenapp/codeigniter4-app-and-api-skills-for-claude-code/ci4-api)
Your own site
<a href="https://agentmods.dev/skills/enlivenapp/codeigniter4-app-and-api-skills-for-claude-code/ci4-api"><img src="https://agentmods.dev/badge/skills/enlivenapp/codeigniter4-app-and-api-skills-for-claude-code/ci4-api.svg" alt="Measured on agentmods" height="20"></a>
Per session 93 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,169 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00093 $0.02169
Opus 5 $0.00046 $0.01085
Sonnet 5 $0.00019 $0.00434
Haiku 4.5 $0.00009 $0.00217

Measured 6d ago against content hash 097173a8bd30, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

ci4-api scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

ci4-api/SKILL.md · 272 lines

How it starts

The opening of the file, as written. The whole thing — 272 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CodeIgniter 4 — REST API Reference

A well-built CI4 API is stateless, versioned, consistently enveloped, and callable from any client — web, mobile, third-party — without breaking.

Related skills: ci4 for core framework patterns, ci4-shield for auth deep dives.

Reference Documents

For deep dives, read the relevant reference from references/:

Reference When to read
references/base-controller.md BaseApiController, response helpers, auth helpers, body parsing
references/authentication.md Login/logout/me endpoints, token lifecycle, filters
references/webhooks.md Receiving webhooks (Stripe, GitHub), sending webhooks, signature verification
references/rate-limiting.md Throttle filter, per-route limits, inline throttling
references/cors.md CORS filter, preflight handling, production config
references/error-handling.md Status code guide, error envelope, common pitfalls

Guiding Principles

  1. Stateless — every request is self-contained. No session state. Auth via Bearer token.
  2. Consistent envelope — every response uses the same JSON shape.
  3. Versioned — breaking changes get a new version. Existing clients never break.
  4. Explicit HTTP status codes200, 201, 400, 401, 403, 404, 409, 422, 500. Never return 200 with an error body.
  5. One source of truth — the API owns the data. Web, mobile, and third parties all call the API.

Directory Structure

app/
  Controllers/
    Api/
      V1/
        BaseApiController.php   # Base for all API controllers
        UsersController.php
        EventsController.php
        AuthController.php
        StripeController.php    # Webhook receiver
  Filters/
    ApiAuthFilter.php           # Bearer token validation
    ApiGroupFilter.php          # Group/role restriction
    ApiThrottleFilter.php       # Rate limiting

Response Envelope

Every API response — success or failure — uses the same shape:

Read the full file on GitHub · 272 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 272 lines · 93 tokens per session scan A 097173a8bd30

Subscribe to this mod's changes

ci4-api is a skill published in the GitHub repository enlivenapp/Codeigniter4-App-and-API-Skills-for-Claude-Code (21 stars, last pushed 4mo ago), licensed MIT. It adds 93 tokens to every session and 2,169 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

laravel-specialist

Build and configure Laravel 10+ applications, including creating Eloquent models and relationships, implementing Sanctum authentication, configuring Horizon queues, designing RESTful APIs with API resources, and building reactive interfaces with Livewire. Use when creating Laravel models, setting up queue workers…

Jeffallan/claude-skills · 86 tokens

create-powergrid-plugin

Create a complete PowerGrid plugin from scratch, including PHP class, Column macro, Blade view, Alpine.js component, and registration.

Power-Components/livewire-powergrid · 31 tokens

laravel-patterns

Laravel architecture patterns, routing/controllers, Eloquent ORM, service layers, queues, events, caching, and API resources for production apps.

hashgraph-online/awesome-codex-plugins · 32 tokens

owl-admin-devtools-generator

Use this skill for Owl Admin development tools, code generator, dynamic API templates, relationships, visual pages, generated CRUD code, app/ApiTemplates, Support/Apis, Support/CodeGenerator, Controllers/DevTools, or questions about “代码生成器”, “动态 API”, “API 模板”, “关系管理”, “可视化页面”, and “生成 CRUD”.

slowlyo/owl-admin · 82 tokens

llamaindex-development

Expert guidance for LlamaIndex development including RAG applications, vector stores, document processing, query engines, and building production AI applications.

Mindrally/skills · 32 tokens

craftcms

Craft CMS 5 plugin and module development — extending Craft with PHP. Covers elements, element queries, services, models, records, controllers, migrations, queue jobs, console commands, field types, native fields, events, behaviors, Twig extensions, widgets, filesystems, permissions, project config, GraphQL, testing…

michtio/craftcms-claude-skills · 327 tokens