# Agent Skills
Krayin 2.2 ships AI agent skills as part of the core repo. The moment you clone krayin/laravel-crm, your AI coding assistant โ Claude Code, Cursor, Codex, GitHub Copilot, or Kilo Code โ picks up Krayin-specific context automatically. No separate install, no npx command, no extra repository.
Skills don't replace this documentation. They give the agent enough Krayin-aware context to follow the conventions documented here without you having to paste them into every prompt.
Before 2.2 these skills lived in the standalone krayin/agent-skills (opens new window) repo and were installed via
npx skills add. That flow still works, but core Krayin 2.2 onwards ships the same skills in-tree โ preferring the in-repo version is the recommended path.
# ๐งฉ What you get
Two skills bundled inside Krayin 2.2's source tree:
| Skill | Activates when... | Covers |
|---|---|---|
crm-package-development | You're creating or modifying CRM packages โ migrations, models, repositories, routes, controllers, views, configs, menus, ACL, system configuration. | The full package-development surface: directory layout, Concord contracts + proxies, the Prettus repository pattern, admin menus, Blade Components, ACL wiring. |
pest-testing | You're writing tests, adding assertions, debugging test failures, or mentioning test / spec / TDD / coverage / expects / assertion. | Pest PHP idioms tuned for Krayin โ feature vs. unit tests, datasets, mocking, fixtures. |
Each skill is a Markdown file under the per-tool config directory (.claude/skills/, .cursor/, .codex/, .kilocode/). The top-level AGENTS.md (opens new window) at the repo root is the entry point that every AI tool reads to discover the skills.
# ๐ ๏ธ Supported AI tools
Any AI assistant that respects the standard AGENTS.md convention works out of the box. Confirmed integrations:
| Tool | How it picks up the skills |
|---|---|
| Claude Code | Reads .claude/skills/ automatically on session start. |
| Cursor | Reads .cursor/skills/ + AGENTS.md. |
| Codex (OpenAI) | Reads .codex/skills/ and AGENTS.md. |
| GitHub Copilot | Reads .github/skills/ and AGENTS.md. |
| Kilo Code | Reads .kilocode/skills/ and AGENTS.md |
If your tool reads AGENTS.md or one of the dot-directories above, you're set โ no per-tool configuration on your side.
# โจ๏ธ 1. Clone Krayin 2.2
That's it for setup. The skills are part of the source tree:
git clone --branch 2.2 https://github.com/krayin/laravel-crm.git
cd laravel-crm
Inside, you'll find:
laravel-crm/
โโโ AGENTS.md # entry point โ every AI tool reads this
โโโ .ai/ # generic AI rules
โโโ .claude/skills/ # Claude Code skills
โโโ .codex/ # Codex rules
โโโ .cursor/ # Cursor rules
โโโ .kilocode/ # Kilo Code rules
โโโ bin/
โ โโโ validate-skills.sh # sanity-check helper
โโโ packages/Webkul/...
Open the directory in your AI-enabled IDE and the relevant skill activates the next time you ask a Krayin-specific question.
# ๐งช 2. Verify
# A. Run the bundled validator
The repo ships a shell script that checks every skill file is well-formed:
bash bin/validate-skills.sh
A clean exit (no errors) means the skill files are wired correctly.
# B. Ask the agent something Krayin-specific
Open your AI assistant inside the project and try:
Create a new package called Webkul/Example with a service provider.
You should see the agent automatically:
- Place files under
packages/Webkul/Example/src/. - Generate a three-part Concord model (Contract + Eloquent class + Proxy).
- Extend
Webkul\Core\Eloquent\Repositoryfor the repository class, withmodel()returning the Contract FQCN. - Register the service provider in
bootstrap/providers.phpand theModuleServiceProviderinconfig/concord.php.
For pest-testing:
Write a Pest feature test for the Lead create endpoint.
The agent should reach for Pest's it(...) / expect(...) style and Krayin-appropriate setup (RefreshDatabase, admin auth helper, repository assertions).
If the suggestions look like generic Laravel (flat app/ classes, no Contract/Proxy, no Concord registration), your tool isn't reading the in-repo skills โ double-check that you opened the project at the repo root (not a sub-directory), and that AGENTS.md is present.
# ๐ Keep the skills up to date
Because the skills live inside the Krayin source tree, upgrading Krayin upgrades the skills. Pull the latest 2.2 and your AI tool starts using the new conventions immediately:
git pull origin 2.2
bash bin/validate-skills.sh
If you maintain a long-lived fork of Krayin, periodically merge upstream so your AI tool isn't suggesting outdated patterns.
# ๐ก Tips
- Skills are per-project, not per-tool. Cloning Krayin gives the skills to every AI assistant that supports
AGENTS.mdโ you don't need to install or configure each one separately. - Pair with AI Context Files. Skills give Claude Code / Cursor / Codex on-demand, deeply-scoped context. The
llms.txtcompanion file is for tools that don't yet readAGENTS.md(ChatGPT web, in-house RAG, older Copilot setups). - The standalone krayin/agent-skills (opens new window) repo still exists for projects on older Krayin versions or developers who want the skills in a fresh project. The in-repo version is the source of truth from 2.2 onwards.
# ๐ Next steps
- AI Context Files โ
llms.txt/llms-full.txtfor AI tools that don't readAGENTS.md. - Requirements โ system prerequisites before you install Krayin itself.
- Installation โ install Krayin (the CRM).
- Package Development โ the conventions the
crm-package-developmentskill teaches your agent.
โ Installation AI Context Files โ