lifephp/composer-ai-instructions

Composer plugin that collects extra.ai-instructions from installed packages into an AGENTS.md-style .ai/packages.md index.

Maintainers

Package info

gitlab.com/life9/php-life/composer-ai-instructions

Issues

Type:composer-plugin

pkg:composer/lifephp/composer-ai-instructions

Transparency log

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

v1.0.0 2026-08-23 23:02 UTC

This package is auto-updated.

Last update: 2026-08-23 21:06:40 UTC


README

GitLab Pipeline Status Packagist License Packagist Dependency Version

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:

TonnyJe

Conclusion

This package is property of Antonín Jehlář © 2026