agents-env is designed to solve the problem of repeatedly maintaining skills and rules across multiple AI agents. It stores skills centrally in a shared storage (defaulting to .agents/skills/), stores rules centrally in a single file AGENTS.md, and then declares, through the registry config/agents.json, the location and connection method by which each agent reads skills and rules; the scripts use this to automatically create relative symbolic links and entry files.
Main capabilities include:
- Skill management: fetch skills from a source repository into the shared storage, support filtering by path and name, and support forced updates (replacing the entire skill and backing up the original skill to <store>.local.bak/<name>).
- Link management: create relative symbolic links for each agent according to the registry, support two modes, link-each (link each skill individually) and link-dir (link the entire directory), and clean up links that point to the storage but are no longer valid.
- Instruction management: generate for each agent a small entry file pointing to AGENTS.md, with content rendered from a template, supporting template variants for different agents; skip if identical content already exists, and back up and overwrite if the content differs.
- Scope: supports user level (available to all projects) and project level (available only to the current repository); the storage location is determined by shared.skills_root in the registry.
- Install as commands: the two scripts can be installed to ~/.local/bin, after which setup-skills and setup-instructions can be run directly, with support for --update to update and --dry-run to preview.
- Clean up dangling links: the prune subcommand can remove dangling symbolic links under agent skill directories and the storage directory, deleting only links, not real files or directories.
Usage:
- Run ./setup-skills.sh or ./setup-instructions.sh from a repository checkout, or run them via a curl pipe.
- Common command examples:
- Fetch and link skills: ./setup-skills.sh --repo <source repository URL> --scope user
- Rebuild links only: ./setup-skills.sh --scope user
- Generate instruction entries: ./setup-instructions.sh --scope user
- Install as commands: curl ... | bash -s -- --install
- Update commands: setup-skills --update
- Preview: --dry-run
Applicable scenarios:
- Multiple AI agents (such as Claude, Cursor, etc.) need to share the same set of skills and rules.
- Team collaboration requires unified skill configuration within a project.
- You want to avoid version inconsistencies and link errors caused by manually copying skills.
Limitations:
- The registry must correctly configure each agent's read location and link mode.
- The scripts are shell scripts and depend on Git and symbolic link support.
- They do not check whether an agent is installed; you can configure first and install later.
- The update command does not automatically add missing commands; it only updates already installed content.
- The specific list of supported agents must be referenced from the registry and is not fully listed in the materials.