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 package | Becomes |
|---|---|
| skills/*/SKILL.md | skills, through the normal loader |
| commands/*.md · .opencode/command/*.md | slash commands whose body runs as a prompt, with $ARGUMENTS substituted |
| AGENTS.md | rules 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.
{"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 →