USE SWAMP WITH OPENCODE
Prerequisites
- Swamp installed
- OpenCode installed
Initialize the repository
$ swamp repo init --tool opencodeYou will see output like:
20:46:55.801 INF repo·init Initialized swamp repository at "/path/to/your/repo" (tool: "opencode")What this sets up
Swamp adds its rules and skill list to AGENTS.md, copies bundled skills to
.agents/skills/, and installs an audit plugin at
.opencode/plugins/swamp-audit.ts that tracks command usage. Your own project
instructions coexist in AGENTS.md via managed sections — swamp only touches
its own delimited block.
Use alongside another agent
Enroll multiple tools by repeating --tool on swamp repo init. Each tool's
scaffolding is written independently, so AGENTS.md and another tool's
instructions file (such as CLAUDE.md) coexist in the same repository.
$ swamp repo init --tool opencode --tool claudeTo enroll an additional tool in an existing repository, run swamp repo upgrade
with the full intended list — upgrade replaces the enrolled tools, so any tool
you want to keep must appear in the command:
$ swamp repo upgrade --tool opencode --tool claudeVerify it works
Open OpenCode in your repository and type:
I am new to swampThe agent matches the getting-started skill and walks you through creating your first model.
Upgrading
When a new version of swamp is released, upgrade the repository to get updated skills, instructions, and plugin:
$ swamp repo upgradeThe managed section in AGENTS.md is replaced with the latest content. Anything
you wrote outside the managed section is preserved. The audit plugin is
overwritten with the latest version.