Opcode
SkillAI & modelsUse when working with Opcode command catalogs such as op.conf or agent.op.conf; edit and run user-controlled op commands, and maintain agent-owned reusable commands only when the local agent executable is an Opcode alias.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Opcode skill
What this skill tells your AI
The instructions your AI receives, as published by dannyben/opcode in skill/SKILL.md and read by ahel’s review.
Opcode is a repo-local command catalog. Treat it as a lightweight makefile:
small named commands live in a config file, then run as op CODE [ARGS] or,
for a named catalog, <name> CODE [ARGS].
User-Controlled op.conf
Use this path when the user asks to add, edit, inspect, or run commands in the project's normal Opcode catalog.
-
Read the existing
op.confbefore editing it. If the user asks for an interactive edit, useop --edit; if they ask Codex to make the change, edit the file directly. -
Preserve the user's organization and wording. Add only the requested command or the smallest useful helper around it.
-
Use normal Opcode syntax:
code: command to run multi: first command second command #? usage text shown by op ? greet: echo "hello ${2:-Mr.} $1" #? Say hello #$ NAME [TITLE]Arguments declared on a
#$line are included inop ?. Bare names are required, while names in brackets are optional. The command continues to access them positionally through$1,$2, and$@. -
Run commands through Opcode when that is what the user asked for:
op CODE op CODE ARG1 ARG2 op --show op --edit op --add CODE COMMAND... op ? op --syntax -
Remember that
op.confis user-controlled. Do not fill it with agent-only workarounds unless the user asks for that.
Agent Mode
Use this path only when the agent command is available and is actually an
Opcode alias.
Check both conditions:
command -v agent
agent -h 2>/dev/null | head -n1
The first command must find agent, and the first help line must contain
opcode. If either check fails, do not create or rely on agent.op.conf; keep
using normal repo commands or ask the user before setting up an alias.
When agent mode is available, prefer a repo-local agent.op.conf for commands
that help agents succeed on the first run. This is for repeatable environment
setup, sandbox-safe validation, fixture commands, or common flags that agents
would otherwise rediscover after a failed attempt.
When creating agent.op.conf, start it with this header:
# agent opcode (https://github.com/dannyben/opcode)
Then add focused commands, for example:
# agent opcode (https://github.com/dannyben/opcode)
test:
GOCACHE=/tmp/example-go-cache go test ./...
#? Run the agent-safe test command
Agent-mode rules:
- Keep
agent.op.confseparate from the user'sop.conf. - Prefer short reusable names such as
agent test,agent check, oragent build. - Encode recurring environment variables, config flags, or local setup in the command instead of rerunning a failing raw command and then correcting it.
- Do not add one-off exploratory commands that are unlikely to be reused.
- After adding a command, run it via
agent CODEwhen practical.
Config Discovery
Canonical op looks for:
opcode, then op.conf
A renamed executable such as agent looks for:
agent.op.conf, then agent.conf
Renamed executables do not fall back to opcode or op.conf. Use
op --syntax or agent --syntax for the current syntax summary.
Signals
- GitHub stars
- 28
- Forks
- 3
- Last commit
- Aug 2026
Advanced
- Catalog kind
- skill
- Gateway key
opcode- Source
- github.com/dannyben/opcode