framework-integration

framework-integration is a skill for Claude Code, Codex from garrettw/php-arch-skills. It costs 91 tokens per session (1,593 once invoked), scanned A, original, MPL-2.0.

Framework-specific guidance for applying clean architecture, domain-driven design, and hexagonal architecture in PHP frameworks. It explains how to connect framework controllers, dependency injection, and database tools to the application's core logic.

In plain words
What is it for?
Use it when building or maintaining applications in Laravel, Symfony, Slim, CakePHP, CodeIgniter, Yii, Laminas, Mezzio, Zend Framework, or similar PHP frameworks.
Why use it?
It helps prevent framework details and database code from spreading through business rules. It also warns against adding complex structure when a simpler approach is enough.

Skill for Claude CodeCodex

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/garrettw/php-arch-skills/framework-integration
Any agent
npx skills add garrettw/php-arch-skills --skill framework-integration
Clone the repo
git clone --depth 1 https://github.com/garrettw/php-arch-skills

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 framework-integration

README.md
[![agentmods](https://agentmods.dev/badge/skills/garrettw/php-arch-skills/framework-integration.svg)](https://agentmods.dev/skills/garrettw/php-arch-skills/framework-integration)
Your own site
<a href="https://agentmods.dev/skills/garrettw/php-arch-skills/framework-integration"><img src="https://agentmods.dev/badge/skills/garrettw/php-arch-skills/framework-integration.svg" alt="Measured on agentmods" height="20"></a>
Per session 91 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,593 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 $0.00091 $0.01593
Opus 5 $0.00046 $0.00796
Sonnet 5 $0.00018 $0.00319
Haiku 4.5 $0.00009 $0.00159

Measured 3d ago against content hash 99d1e972bce2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

framework-integration 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 3d 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.

skills/framework-integration/SKILL.md · 68 lines

How it starts

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

Framework Integration for Clean Architecture & DDD

This skill assumes familiarity with the framework-agnostic skills (domain-modeling, application-layer, infrastructure-boundaries, etc.). It provides framework-specific mappings for ports, adapters, DI wiring, and common anti-patterns.

Note that not every feature needs full DDD wiring. The domain-modeling skill defines lighter defaults — a Transaction Script (one procedure per request) or a Table Module (one class per table operating on a recordset) — for simple or data-centric features. This skill still applies to those patterns: keep the framework controller thin and delegate to the script/module, and keep the framework ORM in an adapter rather than treating it as the domain. Reach for the full DDD port/adapter wiring below only when the feature's rules justify it.

When to Apply This Guidance

Use this skill when the project already decided which framework to use and needs to apply clean architecture patterns within that framework. Do not use it to choose a framework.

Available References

Category Framework Reference File
Modern Laravel references/laravel.md
Modern Symfony references/symfony.md
Modern Slim references/slim.md
Modern CakePHP 5.x references/cakephp-5.md
Modern CodeIgniter 4 references/codeigniter-4.md
Modern Yii 3 references/yii-3.md
Modern Laminas references/laminas.md
Modern Mezzio references/mezzio.md
Legacy Zend Framework 1 references/zend-framework-1.md
Legacy Zend Framework 2 references/zend-framework-2.md
Legacy CakePHP 2.x references/cakephp-2.md
Legacy CakePHP 3.x/4.x references/cakephp-3-4.md
Legacy Yii 1.1 references/yii-1.md
Legacy Yii 2 references/yii-2.md
Legacy CodeIgniter 3 references/codeigniter-3.md

Read the full file on GitHub · 68 lines

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. 3d ago First seen · 68 lines · 91 tokens per session scan A 99d1e972bce2

Subscribe to this mod's changes

framework-integration is a skill published in the GitHub repository garrettw/php-arch-skills (11 stars, last pushed 1mo ago), licensed MPL-2.0. It adds 91 tokens to every session and 1,593 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-31.

Related

Other skills, from other repositories

bun-api

Bun runtime API reference for TypeScript scripts. Covers Bun.file(), Bun.write(), Bun.$() shell, Bun.spawn(), Bun.Glob, Bun.env, bun:sqlite, Bun.sql() for PostgreSQL/MySQL via DATABASEURL, Bun.s3 for S3-compatible storage, Bun.redis for Redis/Valkey, Bun.Archive for tarballs, Bun.Image image processing, Bun.WebView…

dmythro/agent-skills · 229 tokens

bun-cli

Bun CLI reference for package management, script running, testing, bundling, and compilation. Covers bun install/add/remove/update, bun run, bun test, bun build, bunx, bun patch, bun audit fix, bun dedupe, bun prune, bun why, bun pm, bun repl, bunfig.toml, bun.lock, workspace catalogs, isolated installs and the global…

dmythro/agent-skills · 159 tokens

typescript-guardian

Focuses specifically on TypeScript type safety - any usage, unsound generics, interface design, and type narrowing. Use for a deep type-system review, not general code quality.

codebygarv/Ai-skills · 41 tokens

sdk-getting-started-writer

Crafts developer quickstart guides, language SDK installation snippets, and copy-pasteable curl/Python/TypeScript samples.

codebygarv/Ai-skills · 33 tokens

bitrix-console-commands

Covers Bitrix CLI tools — php bitrix/bitrix.php, generators make:module/make:controller/make:tablet/make:entity/make:service/make:event/make:eventhandler/make:message/make:messagehandler/make:component/make:request, kernel commands (orm:annotate, messenger:consume, translate:index, update:, dev:locator-codes…

bxmaximum/bitrix-framework-skills · 155 tokens

bitrix-request-response

HttpRequest/HttpResponse, Json/AjaxJson/Redirect, Uri, UuidGenerator. Use instead of $GET/$POST and raw headers.

bxmaximum/bitrix-framework-skills · 36 tokens