USE SWAMP WITH KIRO
Prerequisites
- Swamp installed
- Kiro installed (IDE or CLI)
Initialize the repository
$ swamp repo init --tool kiroYou will see output like:
20:46:56.756 INF repo·init Initialized swamp repository at "/path/to/your/repo" (tool: "kiro")What this sets up
Swamp writes six files, split between the IDE and the CLI.
IDE-facing (Kiro IDE):
.kiro/steering/swamp-rules.md— steering file with swamp rules..kiro/skills/— bundled swamp skills (swamp-model,swamp-workflow, and the rest)..vscode/settings.local.json— trustedswamp *commands.
CLI-facing (kiro-cli):
.kiro/agents/swamp.json— agent config. Declares skill resources and an explicit tool list (read,write,shell,grep,glob,thinking,todo), restrictsshelltoswamp .*, and wires in thepostToolUseaudit hook..kiro/hooks/swamp-audit.kiro.hook—postToolUsehook that records shell commands viaswamp audit record --from-hook --tool kiro..kiro/settings/cli.json— setschat.defaultAgenttoswampso plainkiro-cli chatloads the swamp agent and the audit hook runs.
Verify it works
In Kiro IDE, select swamp-getting-started from the / skills menu.
In kiro-cli, type:
I am new to swampThe agent matches the getting-started skill and walks you through creating your first model.
Record and view agent commands
Every shell command the swamp agent runs through kiro-cli chat is appended to
.swamp/audit/commands-YYYY-MM-DD.jsonl by the audit hook. View recent rows:
$ swamp audit --hours 1Each row shows the command, cwd, timestamp, session ID, and success/failure.
To verify end-to-end, run something like docker ps in kiro-cli chat, then in
another terminal run swamp audit --hours 1. You should see that command in the
output.
If you already use a custom kiro-cli default agent
If .kiro/settings/cli.json already sets chat.defaultAgent to something other
than swamp, swamp leaves it alone and logs a warning at init. Your preference
wins, but the audit hook will not run through the default agent. To record agent
commands, either:
- change
chat.defaultAgenttoswampin.kiro/settings/cli.json, or - invoke
kiro-cli chat --agent swampexplicitly.
Upgrading
When a new version of swamp is released, upgrade the repository to get updated skills and configuration:
$ swamp repo upgradeThe steering file, agent config, and .kiro.hook are overwritten with the
latest versions. .kiro/settings/cli.json and .vscode/settings.local.json are
merged to preserve any keys you added.