edersilvaa/lex.1/opencode
Claude Code and agent skill by edersilvaa/lex.1
- community
Checking that the SKILL.md file is still in the repository.
Delegate coding to OpenCode CLI (features, PR review).
Install
npx vskill@latest install edersilvaa/lex.1/opencodeSKILL.md
The same SKILL.md was published earlier as edersilvaa/lex.1/opencode.
OpenCode CLI
Use OpenCode as an autonomous coding worker orchestrated by Hermes terminal/process tools. OpenCode is a provider-agnostic, open-source AI coding agent with a TUI and CLI.
When to Use
- User explicitly asks to use OpenCode
- You want an external coding agent to implement/refactor/review code
- You need long-running coding sessions with progress checks
- You want parallel task execution in isolated workdirs/worktrees
Prerequisites
- OpenCode installed:
npm i -g opencode-ai@latestorbrew install anomalyco/tap/opencode - Auth configured:
opencode auth loginor set provider env vars (OPENROUTER_API_KEY, etc.) - Verify:
opencode auth listshould show at least one provider - Git repository for code tasks (recommended)
pty=truefor interactive TUI sessions
Binary Resolution (Important)
Shell environments may resolve different OpenCode binaries. If behavior differs between your terminal and Hermes, check:
If needed, pin an explicit binary path:
One-Shot Tasks
Use opencode run for bounded, non-interactive tasks:
Attach context files with -f:
Show model thinking with --thinking:
Force a specific model:
Interactive Sessions (Background)
For iterative work requiring multiple exchanges, start the TUI in background:
Important: Do NOT use /exit — it is not a valid OpenCode command and will open an agent selector dialog instead. Use Ctrl+C (\x03) or process(action="kill") to exit.
TUI Keybindings
| Key | Action | |
|---|---|---|
Enter | Submit message (press twice if needed) | |
Tab | Switch between agents (build/plan) | |
Ctrl+P | Open command palette | |
Ctrl+X L | Switch session | |
Ctrl+X M | Switch model | |
Ctrl+X N | New session | |
Ctrl+X E | Open editor | |
Ctrl+C | Exit OpenCode |
Resuming Sessions
After exiting, OpenCode prints a session ID. Resume with:
Common Flags
| Flag | Use | |
|---|---|---|
run 'prompt' | One-shot execution and exit | |
--continue / -c | Continue the last OpenCode session | |
--session <id> / -s | Continue a specific session | |
--agent <name> | Choose OpenCode agent (build or plan) | |
--model provider/model | Force specific model | |
--format json | Machine-readable output/events | |
--file <path> / -f | Attach file(s) to the message | |
--thinking | Show model thinking blocks | |
--variant <level> | Reasoning effort (high, max, minimal) | |
--title <name> | Name the session | |
--attach <url> | Connect to a running opencode server |
Procedure
- Verify tool readiness:
terminal(command="opencode --version")terminal(command="opencode auth list")
- For bounded tasks, use
opencode run '...'(no pty needed). - For iterative tasks, start
opencodewithbackground=true, pty=true. - Monitor long tasks with
process(action="poll"|"log"). - If OpenCode asks for input, respond via
process(action="submit", ...). - Exit with
process(action="write", data="\x03")orprocess(action="kill"). - Summarize file changes, test results, and next steps back to user.
PR Review Workflow
OpenCode has a built-in PR command:
Or review in a temporary clone for isolation:
Parallel Work Pattern
Use separate workdirs/worktrees to avoid collisions:
Session & Cost Management
List past sessions:
Check token usage and costs:
Pitfalls
- Interactive
opencode(TUI) sessions requirepty=true. Theopencode runcommand does NOT need pty. /exitis NOT a valid command — it opens an agent selector. Use Ctrl+C to exit the TUI.- PATH mismatch can select the wrong OpenCode binary/model config.
- If OpenCode appears stuck, inspect logs before killing:
process(action="log", session_id="<id>")- Avoid sharing one working directory across parallel OpenCode sessions.
- Enter may need to be pressed twice to submit in the TUI (once to finalize text, once to send).
Verification
Smoke test:
Success criteria:
- Output includes
OPENCODE_SMOKE_OK - Command exits without provider/model errors
- For code tasks: expected files changed and tests pass
Rules
- Prefer
opencode runfor one-shot automation — it's simpler and doesn't need pty. - Use interactive background mode only when iteration is needed.
- Always scope OpenCode sessions to a single repo/workdir.
- For long tasks, provide progress updates from
processlogs. - Report concrete outcomes (files changed, tests, remaining risks).
- Exit interactive sessions with Ctrl+C or kill, never
/exit.
Security
- Security scanPassed, 96 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingengine/lex-engine/skills/autonomous-ai-agents/opencode/SKILL.md
Popularity
- Repository stars
- 3
- Repository forks
- 1
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/edersilvaa/lex.1/opencode)