lifephp / composer-ai-instructions
Composer plugin that collects extra.ai-instructions from installed packages into an AGENTS.md-style .ai/packages.md index.
Package info
gitlab.com/life9/php-life/composer-ai-instructions
Type:composer-plugin
pkg:composer/lifephp/composer-ai-instructions
Requires
- php: >=8.4
- composer-plugin-api: ^2.2
Requires (Dev)
- composer/composer: ^2.7
- nette/tester: ^2.5
- orisai/coding-standard: ^3.11
- phpstan/phpstan: ^2.1
This package is auto-updated.
Last update: 2026-08-23 21:06:40 UTC
README
Quickstart
A Composer plugin that collects extra.ai-instructions from installed packages into an
AGENTS.md-style index at the root of your project — so AI coding agents working in your
project automatically get usage instructions for the dependencies you use, without you
copy-pasting anything.
Installation
composer require --dev lifephp/composer-ai-instructions
Composer will prompt for plugin execution permission — accept it, or add explicitly:
{
"config": {
"allow-plugins": {
"lifephp/composer-ai-instructions": true
}
}
}
On every composer install/composer update, it regenerates:
.ai/packages.md— an index of every installed package that ships AI instructions..ai/packages/<vendor>-<package>.md— that package's always-relevant instructions..ai/skills/<vendor>-<package>/<skill>.md— task-specific skills, copied byte-for-byte so their own structure (including any frontmatter) survives untouched, meant to be loaded selectively rather than all at once.
All three are machine-owned — never hand-edit them, they get wiped and regenerated every
run. Point your own project's AGENTS.md at .ai/packages.md yourself; this plugin never
touches AGENTS.md/CLAUDE.md directly.
Declaring instructions in your own package
{
"extra": {
"ai-instructions": {
"version": 1,
"instructions": ["ai/usage.md"],
"skills": {
"some-skill": "ai/some-skill.skill.md"
}
}
}
}
Full contract for package authors (validation rules, path safety, why the manifest is pure
data with no executable fields): ai/usage.md — this package documents
itself using its own mechanism.
Development
This package is currently maintained by:
Conclusion
This package is property of Antonín Jehlář © 2026