All skills
Skillintermediate

agentsys for OpenCode

Professional-grade slash commands adapted for OpenCode.

Claude Code Knowledge Pack7/10/2026

Overview

agentsys for OpenCode

Professional-grade slash commands adapted for OpenCode.

Quick Install

git clone https://github.com/agent-sh/agentsys.git
cd agentsys
./adapters/opencode/install.sh

Prerequisites

Available Commands

/deslop - AI Slop Cleanup

Remove debugging code, old TODOs, and other AI slop.

opencode
> /deslop
> /deslop apply
> /deslop apply src/ 10

What it does:

  • Scans for console.logs, print statements, old TODOs
  • Generates report or auto-applies fixes
  • Runs verification tests
  • Preserves functionality with minimal diffs

/next-task - Intelligent Task Prioritization

Discover what to work on next with AI analysis.

opencode
> /next-task
> /next-task bug
> /next-task --include-blocked

What it does:

  • Analyzes GitHub Issues (required)
  • Validates tasks aren't already implemented
  • Scores by impact, urgency, effort
  • Provides top 5 recommendations with evidence

Requires: GitHub CLI (gh)


/audit-project - Multi-Agent Code Review

Comprehensive review with specialized AI agents.

opencode
> /audit-project
> /audit-project --recent
> /audit-project --domain security
> /audit-project --resume

What it does:

  • Deploys 10 specialized agents
  • Adapts to your tech stack
  • Finds bugs, security issues, performance problems
  • Iterates until no open issues remain

/ship - Complete PR Workflow

Ship from commit to production with validation.

opencode
> /ship
> /ship --strategy rebase

What it does:

  1. Commits changes with AI message
  2. Creates PR with description
  3. Waits for CI to pass
  4. Runs quality reviews
  5. Merges to main
  6. Deploys to dev/prod
  7. Validates deployments
  8. Auto-rollback on failure

Requires: Git, GitHub CLI (gh)


OpenCode-Specific Features

OpenCode provides additional features you can combine with agentsys commands:

File Includes with @

Include file contents in your prompt:

opencode
> /audit-project @src/main.py @tests/test_main.py

This adds the file contents to the context before running the review.

Bash Output with !

Include bash command output:

opencode
> /deslop apply !git diff --name-only

This runs git diff --name-only and includes the output in the prompt.

Combined Usage

opencode
> /next-task @PLAN.md !gh issue list

Analyzes tasks with PLAN.md content and current GitHub issues.


Installation Details

The installer:

  1. Creates ~/.config/opencode/commands/
  2. Copies command files with path adjustments
  3. Installs shared libraries (platform detection, patterns)
  4. Creates environment setup scripts

File Structure

~/.config/opencode/commands/
├── deslop.md
├── next-task.md
├── audit-project.md
├── ship.md
├── lib/
│   ├── platform/
│   │   ├── detect-platform.js
│   │   └── verify-tools.js
│   ├── patterns/
│   │   ├── review-patterns.js
│   │   └── slop-patterns.js
│   └── utils/
│       └── context-optimizer.js
├── env.sh
└── README.md

Usage Examples

Clean up with file filter

opencode
> /deslop apply @src/app.js

# Changeset 1/3: Remove console.log statements
# - src/app.js: Removed 3 console.log calls
# [OK] Tests passed

Review specific files

opencode
> /audit-project @src/auth.py @src/api.py

# Iteration 1: Found 4 issues (2 critical, 2 high)
# [OK] Fixed SQL injection in auth.py:45
# [OK] Fixed race condition in api.py:123

Next task with context

opencode
> /next-task @PLAN.md !gh issue list

# Top 5 Priority Tasks:
# (includes analysis from PLAN.md and GitHub issues)

Ship with diff review

opencode
> !git diff
> /ship --strategy rebase

# (reviews the diff you just displayed, then ships)

Platform Support

Auto-Detected CI Platforms

GitHub Actions · GitLab CI · CircleCI · Jenkins · Travis CI

Auto-Detected Deployment Platforms

Railway · Vercel · Netlify · Fly.io · Platform.sh · Render

Auto-Detected Project Types

Node.js · Python · Rust · Go · Java


Updating

To update commands:

cd /path/to/agentsys
git pull origin main
./adapters/opencode/install.sh

Troubleshooting

Commands not showing up

  1. Restart OpenCode TUI
  2. Check installation: ls ~/.config/opencode/commands/
  3. Re-run installer

Commands only work in TUI

Currently, OpenCode slash commands are only available in the TUI (Terminal User Interface), not from the CLI directly. Feature request exists to add CLI support.

Path errors

Re-run installer to fix path substitutions:

./adapters/opencode/install.sh

Node.js not found

Ensure Node.js 18+ is installed:

node --version  # Should be v18.0.0 or higher

GitHub CLI authentication

gh auth login
gh auth status

Differences from Claude Code

FeatureClaude CodeOpenCode
InstallationMarketplaceManual script
UpdatesAutomaticRe-run installer
File IncludesBuilt-in@filename syntax
Bash OutputBuilt-in!command syntax
Multi-agentFull supportMay vary

Support


Resources


Made for the OpenCode community