/antidote:antidotefrom antidote
Prevents AI agents from patching symptoms instead of root causes. Prompts structural fixes like stricter types, deleted code paths, or library use before adding guards, workarounds, or validation.
Ships in antidote. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
AI agents often fix symptoms. A bug appears, and the agent adds a check for that one path. The check does not remove the bug. It only hides it on that path. The next path that uses the same data does not have the check. The bug comes back. After many patches, the code holds together with guards that no one remembers.
Before you write a fix, ask this: "What is the smallest change that makes this fix unnecessary?" Use a stricter type, delete a code path, or use a library. This work looks larger than a patch, but it costs less over time. A patch is cheap today and expensive tomorrow. A structural fix is the reverse.
The goal is the smallest correct fix. Sometimes the fix is a library. Sometimes it is a type. Sometimes it is a deleted code path. Sometimes it is a few honest lines. Do not add a dependency by reflex.
A library helps when the problem is hard and already solved: retries, caching, pagination, circuit breakers, state machines, config validation, and date parsing. Check what the project already uses before you add a new one.
A library does not help when the custom code it replaces is only a few lines. Importing a package to avoid one conditional is its own kind of overcomplication. Now you carry its API, its versions, and its bugs. The line to watch is not "custom code exists." It is "custom code re-implements something hard that a good library already does well."
# PATCH: clear the field on every write path; miss one, and the bug returns
def sanitize_order(order):
if order["kind"] == "digital":
order["shipping_address"] = None
return order
# FIX: the variant has no such field, so nothing can set it
class DigitalOrder(BaseModel):
kind: Literal["digital"]
download_url: str
class PhysicalOrder(BaseModel):
kind: Literal["physical"]
shipping_address: Address
# PATCH: every caller defends against the same bad shape
def process(data):
if data is None: return
if "items" not in data: return
for item in data.get("items") or []:
if not item or "name" not in item: continue
...
# FIX: validate once at the boundary, then trust the type
class RequestData(BaseModel):
items: list[Item]
def process(data: RequestData):
for item in data.items:
... # item.name is guaranteed
You can use the same mechanism in any language. TypeScript, Zod, Go structs, Rust enums, Kotlin sealed classes, and Java records let you make an invalid state impossible. You do not need to detect it later.
When the user asks for an audit, do these steps:
If a new developer adds a code path tomorrow without reading your fix, does the bug come back?
If the answer is yes, you wrote a patch. Go back and find the root cause.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
root-cause, code-quality, refactoring, defensive-programming
npx claudepluginhub avtr99/antidote --plugin antidoteOther plugins' skills for the same job