PHPackages                             mohamed-ashraf-elsaed/claude-kit - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. mohamed-ashraf-elsaed/claude-kit

ActiveLibrary[Testing &amp; Quality](/categories/testing)

mohamed-ashraf-elsaed/claude-kit
================================

One command sets up Claude Code (and any AI coding agent) on a Laravel project: engineering rules, a quality gate (PHPStan, Pint, Pest), skills, git hooks, and stack-aware frontend tooling.

v0.3.0(3w ago)3242↓71.4%MITPHPPHP ^8.2CI passing

Since Jul 5Pushed 3w agoCompare

[ Source](https://github.com/mohamed-ashraf-elsaed/claude-kit)[ Packagist](https://packagist.org/packages/mohamed-ashraf-elsaed/claude-kit)[ Docs](https://github.com/mohamed-ashraf-elsaed/claude-kit)[ RSS](/packages/mohamed-ashraf-elsaed-claude-kit/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (5)Dependencies (20)Versions (6)Used By (0)

 [![claude-kit — one command sets up Claude Code and a quality gate for Laravel](https://raw.githubusercontent.com/mohamed-ashraf-elsaed/claude-kit/main/.github/banner.svg)](https://raw.githubusercontent.com/mohamed-ashraf-elsaed/claude-kit/main/.github/banner.svg)

claude-kit
==========

[](#claude-kit)

 **Set up [Claude Code](https://claude.com/claude-code) — and any AI coding agent — on a Laravel project in one command.**
 Engineering rules, a quality gate (PHPStan · Pint · Pest), skills, feature-doc scaffolding, and stack-aware frontend tooling.

 [![Latest version](https://camo.githubusercontent.com/daa7fd0ad6c9149c596f8dae39e2b6ff1e590d5225be983b735aac7f108bb5e4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6f68616d65642d6173687261662d656c736165642f636c617564652d6b69742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mohamed-ashraf-elsaed/claude-kit) [![Tests](https://camo.githubusercontent.com/509bf17f579546a75cdca201c14c2eb0682153cfd42a6113f0ed254642d14160/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d6f68616d65642d6173687261662d656c736165642f636c617564652d6b69742f74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/mohamed-ashraf-elsaed/claude-kit/actions/workflows/tests.yml) [![Lint](https://camo.githubusercontent.com/63f1775b397f5011f4caeaaf99e613f5308bba0e41987e191ecb3148dcbb4460/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d6f68616d65642d6173687261662d656c736165642f636c617564652d6b69742f6c696e742e796d6c3f6272616e63683d6d61696e266c6162656c3d6c696e74267374796c653d666c61742d737175617265)](https://github.com/mohamed-ashraf-elsaed/claude-kit/actions/workflows/lint.yml) [![PHP version](https://camo.githubusercontent.com/3937f9bd83d7c0a3ca764bea156310ae9264ae8f235dd49d745e19e7eac0e8bf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6d6f68616d65642d6173687261662d656c736165642f636c617564652d6b69743f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mohamed-ashraf-elsaed/claude-kit) [![Downloads](https://camo.githubusercontent.com/cc7cdb36756f2a67409cee22173942b3842a8763286cac7e61e75a6aff0a039c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6f68616d65642d6173687261662d656c736165642f636c617564652d6b69742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mohamed-ashraf-elsaed/claude-kit) [![License](https://camo.githubusercontent.com/e4dbdd47838b9d01b4b605e30fea3538cc0ed56a164abeee397604dd407286eb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d6f68616d65642d6173687261662d656c736165642f636c617564652d6b69743f7374796c653d666c61742d737175617265)](LICENSE)

---

`claude-kit` packages a battle-tested setup so every Laravel project — and every developer — gets the same guardrails instead of hand-copying config between repos: a Stop-hook + pre-commit **quality gate**, reusable Claude Code **skills**, PHPStan level 7 + strict-rules, Pint, Pest with an optional coverage floor, an architecture test suite that actually runs, feature-doc scaffolding, and **stack-aware frontend tooling** (Vue, React, Livewire, Blade, or none).

### Who it's for

[](#who-its-for)

- Teams putting **Claude Code**, **Cursor**, or **GitHub Copilot** to work on a **Laravel** codebase and wanting consistent, enforced conventions.
- Anyone who wants **one command** for PHPStan + Pint + Pest + git hooks instead of wiring them by hand.
- Projects that need **AI coding guardrails** an agent can't skip — the same gate runs at commit time, at the end of every Claude turn, and in CI.

Table of contents
-----------------

[](#table-of-contents)

- [Requirements](#requirements)
- [Installation](#installation)
- [What it installs](#what-it-installs)
- [Choosing what to install](#choosing-what-to-install)
- [The hybrid update model](#the-hybrid-update-model)
- [The quality gate](#the-quality-gate)
- [Documentation](#documentation)
- [Contributing](#contributing)
- [Security](#security)
- [License](#license)

Requirements
------------

[](#requirements)

- PHP **8.2+**
- Laravel **11, 12, or 13**
- [Claude Code](https://claude.com/claude-code) (to use the rules, hooks, and skills)
- A coverage driver (`pcov` or Xdebug) only if you ask the gate to enforce coverage

Installation
------------

[](#installation)

```
composer require --dev mohamed-ashraf-elsaed/claude-kit
php artisan claude-kit:install
```

claude-kit itself depends only on Laravel — it will not pull Pint, PHPStan, or a test runner into your project, and it will not move a version you already have. The installer detects your frontend stack (Inertia + Vue, Inertia + React, Livewire, Blade, or API-only), asks which parts to scaffold, works out the exact tooling your answers need, and offers to install it:

```
The selected tooling is not installed yet: laravel/pint, larastan/larastan, pestphp/pest
Run `composer require --dev laravel/pint larastan/larastan pestphp/pest` now? (yes/no) [yes]

```

Anything already in your project is left out of that list. Decline it, or run with `--no-interaction`, and the command is printed for you to run yourself.

Note

**If that command fails on Pest, it is an upstream conflict, not claude-kit.**Current Pest releases conflict with `phpunit/phpunit` newer than 12.5.30, and the Laravel 13 skeleton pins a newer PHPUnit — so `composer require --dev pestphp/pest` cannot resolve on a fresh Laravel 13 app even with claude-kit uninstalled. Re-running the same command with `-W` resolves it by letting composer downgrade PHPUnit to 12.5.30. claude-kit never adds `-W` for you; accepting that downgrade is your decision.

Then:

```
composer install   # wires the git pre-commit hook
composer lint      # once, to normalize Laravel's shipped files
npm install        # only if a frontend stack was set up
```

Not published to Packagist yet? Install straight from GitHub by adding this to your `composer.json` and running `composer require --dev mohamed-ashraf-elsaed/claude-kit:dev-main`:

```
{
    "repositories": [
        { "type": "vcs", "url": "https://github.com/mohamed-ashraf-elsaed/claude-kit" }
    ]
}
```

What it installs
----------------

[](#what-it-installs)

PartWhat lands in your project**.claude core**`.claude/settings.json` (hook wiring + permission allowlist, **deep-merged** into any existing file), the reusable skills for your stack, and `.mcp.json` (Laravel Boost).**CLAUDE.md**Short and specific: project identity, the quality gate, the feature-doc rule, and an index of the installed rules — inside `claude-kit:begin`/`end` markers, so re-running refreshes it without touching your own additions.**Rules**`.claude/rules/` — one file per selected architecture layer, a clean-code rule (strict / balanced / relaxed), a stack-specific frontend rule, and the always-on anti-overengineering + anti-assumption rules. Path-scoped where it makes sense, so they load only when relevant.**Agents**Read-only `design-reviewer` (output vs the stated design) and `docs-reviewer` (output vs supplied docs).**Workflow skills**`/commit`, `/deploy` (both you-only), `/dead-code`, `/codemap`.**Quality gate**`phpstan.neon` (your level, Larastan and strict-rules toggles), `pint.json`, a **generated** `tests/Arch/ArchTest.php` matching your layers — plus a `tests/Arch` testsuite added to your `phpunit.xml` so it actually runs — `.githooks/pre-commit`, an edit-time PHPStan hook, and merged composer scripts.**Frontend**Stack-matching `eslint.config.js` / `.prettierrc` / `tsconfig.json`, plus merged `package.json` scripts and devDependencies. Skipped for API-only projects.**Docs**`features/_TEMPLATE/` + `features/README.md`, `.editorconfig`, `.gitattributes`.**CI**Generic GitHub Actions `tests.yml` and `lint.yml`.Nothing is clobbered. An identical file is left alone, a file you have edited is asked about (keep / replace / show diff), `settings.json` and `CLAUDE.md` are merged rather than replaced, and `composer.json` / `package.json` keep your entries. The conventions claude-kit writes are opinionated defaults — read them and adapt them to how your team actually works.

Choosing what to install
------------------------

[](#choosing-what-to-install)

`claude-kit:install` is a **fully interactive configurator** — it asks what you want rather than assuming:

- **Code style:** Pint on/off
- **Static analysis:** PHPStan on/off → level (0–9) → Larastan on/off → strict-rules on/off → analyse each edited file? → block or warn only
- **Tests:** on/off → runner (Pest / PHPUnit) → coverage minimum → architecture tests
- **Architecture:** any of Services · Repositories · Data Objects · Value Objects · Actions · Contracts. A layer you decline gets no rule, no `arch()`block, and no mention in CLAUDE.md
- **Clean code:** strict / balanced / relaxed — three concrete rule variants
- **Hooks:** Stop hook (which checks + how many consecutive clean runs), git pre-commit hook, feature-doc requirement
- **Reviewers:** `design-reviewer`, `docs-reviewer`
- **Workflow skills:** `/commit` (your convention, verbatim), `/deploy` (your command, or a marked TODO — never a guess), `/dead-code`, `/codemap`
- **Behavioural rules:** anti-overengineering, anti-assumption; plus the git-worktree workflow rule and a concise output style
- **Skills:** which bundled skills to install — plus optional search &amp; install of more via [skills.sh](https://www.skills.sh) (`npx skills find` / `add`)
- **Extras:** CLAUDE.md + rules, feature-doc templates, `.editorconfig`, MCP, CI

Your answers are recorded in `.claude/claude-kit.json`, which the quality gate and `claude-kit:update` read.

```
php artisan claude-kit:install                      # interactive (recommended)
php artisan claude-kit:install --stack=inertia-react # preselect the stack
php artisan claude-kit:install --no-interaction      # accept sensible defaults
php artisan claude-kit:install --force               # replace existing files

php artisan claude-kit:update                        # refresh what you installed
```

- **Stacks:** `inertia-vue`, `inertia-react`, `livewire`, `blade`, `none`

The hybrid update model
-----------------------

[](#the-hybrid-update-model)

- **Machinery** — `quality-checks.sh` and the Stop hook — lives in `vendor/mohamed-ashraf-elsaed/claude-kit/runtime/` and is *referenced*, so `composer update` propagates fixes to every project automatically.
- **Content you own** — `CLAUDE.md`, the rules, the skills, the agents, the feature templates, the linter configs, and the generated `phpstan.neon` — is written into your repo so you can customise it freely.
- `php artisan claude-kit:update` refreshes that copied content: a file you never touched is updated silently, a file you edited is never replaced without asking.

The quality gate
----------------

[](#the-quality-gate)

`vendor/mohamed-ashraf-elsaed/claude-kit/runtime/quality-checks.sh` is the single source of truth. It runs Pint, PHPStan at your level, and your test runner with your coverage floor, then the frontend checks your `package.json` actually defines. The same script backs the git pre-commit hook, Claude's Stop hook, and CI — so the gate is identical everywhere.

- The Stop hook requires **N consecutive clean runs** (default 2) before Claude may finish a turn, and can be limited to a subset of the checks.
- Coverage needs the `pcov` or Xdebug extension; without it, the gate warns instead of blocking on coverage only.
- Disable the feature-doc requirement with `CLAUDE_KIT_FEATURE_DOCS=0`.

Documentation
-------------

[](#documentation)

Full guides live in the [wiki](https://github.com/mohamed-ashraf-elsaed/claude-kit/wiki)and the [`docs/`](docs/) directory:

- [Installation](docs/Installation.md)
- [Usage](docs/Usage.md)
- [Configuration](docs/Configuration.md)
- [Frontend stacks](docs/Frontend-Stacks.md)
- [Quality gate](docs/Quality-Gate.md)
- [Skills](docs/Skills.md)
- [Architecture](docs/Architecture.md)
- [Publishing to Packagist](docs/Publishing.md)
- [Upgrading](docs/Upgrading.md)
- [FAQ](docs/FAQ.md)

Contributing
------------

[](#contributing)

Contributions are welcome! Please read [CONTRIBUTING.md](CONTRIBUTING.md) and the [Code of Conduct](CODE_OF_CONDUCT.md). Releases follow [SemVer](https://semver.org); see [RELEASING.md](RELEASING.md).

Security
--------

[](#security)

Please report vulnerabilities privately — see [SECURITY.md](SECURITY.md).

License
-------

[](#license)

The MIT License. See [LICENSE](LICENSE).

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance95

Actively maintained with recent releases

Popularity19

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~6 days

Total

5

Last Release

25d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cc554f2d0e27d196758e968c9aca637d84850c4bad1b4f490f9edfe38877862e?d=identicon)[MohamedAshrafElsaed](/maintainers/MohamedAshrafElsaed)

---

Top Contributors

[![mohamed-ashraf-elsaed](https://avatars.githubusercontent.com/u/110828041?v=4)](https://github.com/mohamed-ashraf-elsaed "mohamed-ashraf-elsaed (10 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

aiai-agentsanthropicclaudeclaude-codecode-qualitycursordeveloper-toolsgithub-copilotlarastanlaravelllmmcppestphpphpstanpintquality-gatescaffoldingstatic-analysispestPHPStanlaravelstatic analysisCode stylescaffoldingmcpaicode qualitylarastancursorclaudellmanthropiccoding-standardsdeveloper-toolsclaude-codePintai-agentsgithub-copilotgit-hooksconventionsdeveloper-experiencequality-gate

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/mohamed-ashraf-elsaed-claude-kit/health.svg)

```
[![Health](https://phpackages.com/badges/mohamed-ashraf-elsaed-claude-kit/health.svg)](https://phpackages.com/packages/mohamed-ashraf-elsaed-claude-kit)
```

###  Alternatives

[laravel/ai

The official AI SDK for Laravel.

1.1k4.6M332](/packages/laravel-ai)[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.5k60.6M10.6k](/packages/larastan-larastan)[laravel/boost

Laravel Boost accelerates AI-assisted development by providing the essential context and structure that AI needs to generate high-quality, Laravel-specific code.

3.6k26.0M831](/packages/laravel-boost)[erag/laravel-lang-sync-inertia

A powerful Laravel package for syncing and managing language translations across backend and Inertia.js (Vue/React/Svelte) frontends, offering effortless localization, auto-sync features, and smooth multi-language support for modern Laravel applications.

5031.3k](/packages/erag-laravel-lang-sync-inertia)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9922.4M147](/packages/roots-acorn)[calebdw/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

16132.2k4](/packages/calebdw-larastan)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
