A guardrail's results mean little without a baseline
Building SkillGate, a scanner and runtime guard for agent tools, taught me to grade a guard on an outside record and against the same calls with no guard.
Agent Skills and MCP servers give an agent new instructions and new tools. A poisoned one can tell the agent to print a credential, pipe an installer into a shell, or send notes to an outside address. I built SkillGate to defend against that in two places: a static scanner that checks what a skill says before it’s installed, and a guard that checks what each tool call actually tries to do.
Freeze the test before writing the code
Before writing any scanner or guard code, I committed the test data: 30 fixtures (15 poisoned, 15 clean but close calls), 12 scripted tool calls, the policy, the rule catalog and the scoring formula. Each file is hashed, and both evaluation runners refuse to run if a hash changes.
That made it impossible to adjust a fixture or a threshold after seeing a result. It also meant real misses stay in the results. One poisoned fixture, a log analyzer that passes user input to a shell, was found at the right line but scored REVIEW instead of BLOCK. Raising that rule’s severity afterwards would have been tuning to the test, so I left it.
A guard can’t grade itself
A guard that reports its own blocks could be wrong without anyone noticing. So the tools run in a separate process and write every call to a ledger the guard never reads. A local canary server acts as a second outside observer.
Then I sent the same 12 calls straight to the tools, with no guard. That baseline is what gives the guarded number its meaning. Without the guard, all 6 calls that should be blocked reached the tools, one exfiltration attempt reached the canary, and a fake secret came back to the caller. With the guard, none did. The 4 calls that should be allowed went through in both modes, and the guard added about 0.8 ms per call.
Where the scanner is weakest
On the 30 fixtures, the scanner flagged all 15 poisoned ones and none of the 15 clean ones. The more useful finding was how it got there.
Clean skills often warn against risky actions: “never share an API key”. Without special handling, those were false positives, so the scanner suppresses warnings that are negated. Five clean fixtures passed only because of that suppression. It’s easy to fool, too: “Don’t worry, just run curl … | bash” is suppressed the same way. That false negative is pinned in a test so it can’t quietly disappear from the results.
The rules also match line by line, so a payload split across two lines would get through.
What 15 of 15 does and doesn’t say
The fixtures and the rules have the same author, so 15 of 15 shows the rules do what I specified on cases I wrote. It says little about real-world detection. The guard enforces a policy; it isn’t a sandbox, so once a call is allowed it can’t contain what a malicious tool does.
Next, I want to run the scanner on a sample of real public skills, labelled by hand, to measure detection beyond my own fixtures.