Docs/Extend

Foreign packages

Install pi and opencode-style packages from git — skills, slash commands and always-on rules — with zero per-plugin code and no code execution.

Source: crates/gray/src/foreign.rs

gray plugin install <git-url> takes three things from any package, all Markdown. Package code — hooks, MCP servers, lifecycle scripts — is never executed.

In the packageBecomes
skills/*/SKILL.mdskills, through the normal loader
commands/*.md · .opencode/command/*.mdslash commands whose body runs as a prompt, with $ARGUMENTS substituted
AGENTS.mdrules appended to every turn's system prompt

Mode switches

An optional gray.json adds a generic mode switch. A listed command writes its arguments to the state file, and the file's content is appended to the injected rules — which is how a /ponytail ultra-style switch works without any package-specific code in Gray.

gray.json
{"state_file": ".mode", "state_prefix": "Level: ", "state_commands": ["ponytail"]}

Corrupt manifests, path-traversal state files and missing files all read as “the package stays static” — never an error, never a half-state.

Join the Discord

Chat with the people building and running Gray. Show what you made with it.

Join Discord →

Need help?

Open an issue on GitHub, run /feedback from the REPL, or ask in Discord.

Open an issue →