Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use when deploying to production, handling sensitive data, or the workflow needs safety constraints, input validation, and security boundaries.
.claude/skills/sharpdeveye-guard/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-11 | ✗→✓ | ▲ Improved | -20% | 0% |
| case-16 | ✗→✓ | ▲ Improved | -23% | 0% |
| case-19 | ✗→✓ | ▲ Improved | 10% | 0% |
| case-14 | ✓→✗ | ▼ Worse | -57% | 0% |
| case-20 | ✓→✗ | ▼ Worse | -65% | 0% |
Invoke /agent-workflow — it contains workflow principles, anti-patterns, and the Context Gathering Protocol. Follow the protocol before proceeding — if no workflow context exists yet, you MUST run /teach-maestro first.
Consult the guardrails-safety reference in the agent-workflow skill for the full defense-in-depth framework.
Add safety boundaries to a workflow. Guards protect against malicious inputs, unintended outputs, data leakage, cost explosion, and all the ways an autonomous system can go wrong in the real world.
Before adding guards, understand what you're protecting against:
| Threat | Risk Level | Guard Type | |--------|-----------|-----------| | Prompt injection | High | Input sanitization, instruction hierarchy | | PII leakage | High | Output filtering, data masking | | Cost explosion | High | Token budgets, rate limits | | Unauthorized actions | Medium | Permission scoping, confirmation gates | | Hallucination | Medium | Source attribution, fact checking | | Service abuse | Medium | Rate limiting, authentication |
Input Guards
textBefore processing any input: 1. Validate against schema (reject malformed) 2. Check size limits (reject oversized) 3. Sanitize for injection patterns 4. Rate limit check (reject if exceeded) 5. Authentication/authorization check
Output Guards
textBefore returning any output: 1. Schema validation (format correct?) 2. PII scan (names, emails, SSNs, etc.) 3. Content policy check 4. Confidence threshold check 5. Source attribution present?
Cost Guards
textBefore every model/API call: 1. Check remaining budget 2. Estimate request cost 3. If estimate > remaining budget → reject or use cheaper alternative 4. After call → update spent amount 5. Circuit breaker check (too many failures?)
Permission Guards
textFor every tool call: 1. Is this tool allowed for this user/context? 2. Is this a destructive operation? → require confirmation 3. Is this accessing data the user is authorized for? 4. Log the access for audit trail
After adding guards, run /evaluate with adversarial test scenarios to verify guards hold under attack.
NEVER:
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-05 | pass→pass | 13,663 | 11,660 | -15% | 1 | 1 | 0% | 2,083 | 2,069 | -1% | 0 | 0 | — |
case-01 | fail→fail | 36,366 | 18,730 | -48% | 1 | 1 | 0% | 4,062 | 3,529 | -13% | 0 | 0 | — |
case-02 | fail→fail | 21,207 | 20,135 | -5% | 1 | 1 | 0% | 3,309 | 3,848 | +16% | 0 | 0 | — |
case-03 | fail→fail | 51,587 | 29,060 | -44% | 1 | 1 | 0% | 6,153 | 6,204 | +1% | 0 | 0 | — |
case-04 | fail→fail | 12,992 | 18,325 | +41% | 1 | 1 | 0% | 1,976 | 3,137 | +59% | 0 | 0 | — |
case-06 | pass→pass | 6,146 | 10,174 | +66% | 1 | 1 | 0% | 985 | 1,911 | +94% | 0 | 0 | — |
case-07 | pass→pass | 9,927 | 11,475 | +16% | 1 | 1 | 0% | 1,637 | 2,502 | +53% | 0 | 0 | — |
case-08 | pass→pass | 6,377 | 2,881 | -55% | 1 | 1 | 0% | 878 | 1,024 | +17% | 0 | 0 | — |
case-09 | pass→pass | 8,897 | 3,169 | -64% | 1 | 1 | 0% | 1,293 | 970 | -25% | 0 | 0 | — |
case-10 | pass→pass | 9,327 | 3,399 | -64% | 1 | 1 | 0% | 1,440 | 1,129 | -22% | 0 | 0 | — |
case-11 | fail→pass | 10,083 | 3,689 | -63% | 1 | 1 | 0% | 1,563 | 1,252 | -20% | 0 | 0 | — |
case-12 | pass→pass | 12,987 | 8,048 | -38% | 1 | 1 | 0% | 2,058 | 1,853 | -10% | 0 | 0 | — |
case-13 | pass→pass | 12,410 | 13,629 | +10% | 1 | 1 | 0% | 1,872 | 2,412 | +29% | 0 | 0 | — |
case-14 | pass→fail | 12,804 | 3,520 | -73% | 1 | 1 | 0% | 1,944 | 838 | -57% | 0 | 0 | — |
case-15 | pass→pass | 8,605 | 5,269 | -39% | 1 | 1 | 0% | 1,346 | 1,355 | +1% | 0 | 0 | — |
case-16 | fail→pass | 8,722 | 2,793 | -68% | 1 | 1 | 0% | 1,350 | 1,036 | -23% | 0 | 0 | — |
case-17 | fail→fail | 8,388 | 2,378 | -72% | 1 | 1 | 0% | 1,189 | 970 | -18% | 0 | 0 | — |
case-18 | pass→pass | 13,557 | 10,486 | -23% | 1 | 1 | 0% | 1,930 | 2,210 | +15% | 0 | 0 | — |
case-19 | fail→pass | 11,409 | 8,931 | -22% | 1 | 1 | 0% | 1,757 | 1,925 | +10% | 0 | 0 | — |
case-20 | pass→fail | 16,395 | 3,113 | -81% | 1 | 1 | 0% | 2,475 | 867 | -65% | 0 | 0 | — |
case-21 | pass→pass | 13,275 | 14,810 | +12% | 1 | 1 | 0% | 2,332 | 3,343 | +43% | 0 | 0 | — |
case-22 | pass→pass | 14,717 | 19,233 | +31% | 1 | 1 | 0% | 2,432 | 4,096 | +68% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 20 counted toward the lift figure. The other 2 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +5 percentage points is the difference between those two pass rates over the 20 comparable cases. 2 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.