Type to search the docs and updates.

Browse documentation
DocsGuides

Ship agent support with your library

Ship an agent skill and the launch configuration for your MCP server in one pack. Projects that use agnostic-ai add the pack to their sources. Your installer can apply the same pack to coding tool files in other projects.

Write the pack

Keep the pack with your library. This example uses vendor/example/demo/agent-pack/ after installation.

agent-pack/
├── skills/demo/SKILL.md
└── mcps/demo.yaml

Save this skill as skills/demo/SKILL.md.

---
name: demo
description: Help users start a Demo project.
---

Read the project's configuration before suggesting changes. Use the Demo server for API questions when it is connected.

Save the server as mcps/demo.yaml. This library offers a Composer proxy, a PHAR file, and a global command.

name: demo
type: stdio
command-candidates:
  - command: ./vendor/bin/demo
    args: [mcp]
  - command: php
    args: [demo.phar, mcp]
    when-exists: demo.phar
  - command: demo
    args: [mcp]

The first matching candidate supplies the command and arguments. The proxy and archive are checked from the consuming project root. The final bare command is the fallback. Bare executables such as php need to be on the coding tool's PATH when it starts the server. Start Claude Code from the project root when an executable or argument uses a relative path. Skills · Choose an MCP command

Phel is an example of this install layout. Composer puts the package under vendor/phel-lang/phel-lang/ and its proxy at ./vendor/bin/phel. For Phel's planned stdio server, the candidates are ./vendor/bin/phel with [mcp], php with [phel.phar, mcp] and when-exists: phel.phar, and phel with [mcp]. Users of the standalone PHAR would obtain the pack separately. Phel installation · Planned Phel server · Planned installer

Add the pack to an agnostic-ai project

From the consuming project root, add the pack after installing the library.

agnostic-ai packs add ./vendor/example/demo/agent-pack --name demo
agnostic-ai sync

If a Composer path repository links the package outside the project, repeat packs add after installing the dependency in a new checkout. packs update requires local sources inside the project. Manage packs

Apply the pack from a library installer

For a project without agnostic-ai.yaml, have your installer call agnostic-ai with the pack path and flags as separate arguments. Run from the consuming project root. Preview the changes first.

agnostic-ai packs apply ./vendor/example/demo/agent-pack --targets claude,codex,cursor --dry-run --json

Review the proposed commands and arguments before applying the pack. Some coding tools start project servers without asking.

agnostic-ai packs apply ./vendor/example/demo/agent-pack --targets claude,codex,cursor --json

Check the exit status before reading the JSON. Each item in targets identifies the tool, its native files, and its entries. Read each entry's action and any reason to report what happened. Apply behavior and conflicts

On uninstall, remove the entries the applied pack still owns. User edits stay in place.

agnostic-ai packs apply ./vendor/example/demo/agent-pack --remove