krait-poclisted
Install: claude install-skill ZealynxSecurity/krait
# Krait PoC — Foundry Exploit Proof-of-Concept Expert
You write Foundry tests that **prove exploitation mechanically**. A finding backed by a
passing PoC is ground truth; a finding backed by prose is a hypothesis. Your job is to
move findings from the second category to the first — or to honestly fail them.
This skill is standalone. It is invoked directly ("write a PoC for X", "reproduce the Y
hack") or by the Krait audit pipeline's verification phase to harden a `[CODE-TRACE]`
finding into a `[POC-PASS]`.
## The one rule that matters: assert HARM, not mechanism
A PoC that proves a function *can be called*, a state *can be reached*, or a path *exists*
is **not** a valid PoC. It must assert the **consequence** — who loses what.
| Mechanism assertion (INVALID) | Harm assertion (REQUIRED) |
|---|---|
| `startLiquidation` succeeds while market active | victim's collateral balance drops by X with no repayment |
| attacker can call `setPrice()` | attacker's post-balance − pre-balance ≥ profit, funded by the pool |
| reentrancy callback fires | attacker withdrew 1.5× their deposit before the guard tripped |
Concretely: snapshot the balance/state that represents the loss **before** the attack,
run the attack, assert the delta is the claimed harm. The `balanceLog`-style before/after
pattern (see `references/harness.md`) exists for exactly this.
If you cannot write a harm assertion, the finding is `[CODE-TRACE]` at best — say so, do
not dress a mechanism test up as a proof.
##