A 4.6M-token code review, Swamp cuts it to 506K
Avi Chawla calls the open-source project Swamp Skills 2.0: repeated skills are compiled into workflows, code manages the flow, and the model only makes judgments. In the official comparison, tokens are about 8x fewer and time is halved.

A code review task: the skill in Codex ran about 4.6 million tokens, 23 agents, and 12.8 minutes. After Swamp changed the same task into a workflow, it was about 506K tokens, 3 agents, and 6.6 minutes. The official comparison Avi Chawla gave in the tweet is roughly 8x fewer tokens and half the time.
Tokens can be roughly understood as the billing unit for text the model reads and writes, and they also occupy the context window. An agent is a model instance that can call tools on its own and work through steps. A workflow here means handing the steps and what comes next to code, with the model appearing only at steps that require judgment.
Avi calls Swamp Skills 2.0. It is open source, with the repository at https://github.com/swamp-club/swamp . The approach is not complicated: you describe a repeated task once, and the agent breaks it into reusable behaviors. Each behavior has typed inputs and outputs, and ordinary code decides which one runs next. The model is one step in the workflow and is no longer responsible for deciding where the whole process goes.
This solves the old problem with skills. Skills can already package up repeated processes, but the agent still rereads the skill and redecides every step on each run. One commenter replied that their agent rereads the same set of steps every day, like a new employee on their first day. Tokens are burning, and waiting happens too.
Swamp connects to coding agents you already have, including nine: Claude Code, Codex, Cursor, OpenCode, Kiro, Amp, Copilot CLI, Pi, and Antigravity. Workflows can be triggered from an agent, CLI, scheduled task, or API. Each run is recorded, data is versioned and queryable. Secrets are fetched from a vault, injected only when needed, and masked in outputs. By default, run data is stored in .swamp/.
The animation below was made by Avi and the team and shows the difference between Swamp and Skills.
8x fewer tokens sounds like the most eye-catching part. What is more worth looking at is where the savings come from. Avi says most of the savings come from replacing the coordinating agent with ordinary code. One commenter added a sharp point: calculated per single agent, the token count is about the same; the difference is that the skill run started 23 agents. In other words, the money was spent on having the model repeatedly coordinate the process, and the judgment itself may not need that many tokens.
There is a counterintuitive point here: compiling repeated processes into programs, saving tokens is only the surface benefit. Deterministic steps no longer redecide every round, waiting gets shorter, and run records are queryable—those are the more practical changes. Leave judgment to the model, and hand the pipeline to code.
The risk is in the same place. Once a process is fixed, if a step hits an edge case, a fixed workflow is harder to fall back on than a skill. In that long article about Claude subagents and agent teams, Avi warns that the most common failures in multi-agent systems include vague task descriptions leading to duplicated work, verification agents declaring completion without verifying, and token costs compounding. His decomposition principle is to split by context boundary, not by role. If two subtasks need a lot of overlapping information, keep them in the same agent; only split them out when the context can truly be isolated. Writing code in parallel is especially dangerous: several agents will make different implicit assumptions about the same data model, and it is hard to catch when merging.
So the usage can be a bit simpler: keep using skill during the prototyping stage, and once a task starts repeating, have the agent turn it into a Swamp workflow. When converting, keep the branches that require judgment, and do not hard-code the judgment as well. swamp start opens a browser, asks you to log in to a Swamp Club account, and then select a workspace and an agent on your machine. Install on macOS / Linux:
curl -fsSL https://swamp-club.com/install.sh | sh
Windows PowerShell:
irm https://swamp-club.com/install.ps1 | iex
Repository again: https://github.com/swamp-club/swamp . Whether to star it is up to you.
发布时间: 2026-11-16 21:30