Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Guardrails AI — LLM output validation and guardrails. Define guardrails as XML/JSON specs, validate outputs against structural and semantic constraints, correct/retry on failure, and audit model behavior.
.claude/skills/mkurman-guardrails-ai/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-07 | ✗→✓ | ▲ Improved | -21% | 0% |
| case-01 | ✓→✓ | = Same ✓ | -19% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 32% | 0% |
| case-03 | ✓→✓ | = Same ✓ | -2% | 0% |
| case-04 | ✓→✓ | = Same ✓ | -4% | 0% |
Guardrails AI provides a guardrails framework for LLM applications with structured output validation, type safety, retry/reprompt logic, and risk management. Uses RAIL (Reliable AI Markup Language) specs or Pydantic models.
bashuv pip install guardrails-ai
pythonimport guardrails as gd rail_spec = ( '<rail version="0.1">' '<output>' ' <string name="summary" description="Brief summary" format="length: 1-100"/>' ' <integer name="sentiment" format="valid-choices: {1, 0, -1}"/>' '</output>' '<prompt>' 'Summarize this text: {{text}}' '</prompt>' '</rail>' ) guard = gd.Guard.from_rail_string(rail_spec) raw, validated = guard(text="I loved this movie!") print(validated) # {"summary": "...", "sentiment": 1}
pythonfrom pydantic import BaseModel from guardrails import Guard class Extraction(BaseModel): name: str age: int = 0 guard = Guard.from_pydantic(Extraction) result = guard("John is 25 years old")
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | pass→pass | 3,884 | 1,635 | -58% | 1 | 1 | 0% | 691 | 557 | -19% | 0 | 0 | — |
case-02 | pass→pass | 2,731 | 1,395 | -49% | 1 | 1 | 0% | 420 | 555 | +32% | 0 | 0 | — |
case-03 | pass→pass | 4,287 | 2,010 | -53% | 1 | 1 | 0% | 715 | 698 | -2% | 0 | 0 | — |
case-04 | pass→pass | 5,536 | 3,314 | -40% | 1 | 1 | 0% | 945 | 903 | -4% | 0 | 0 | — |
case-05 | pass→pass | 11,302 | 2,912 | -74% | 1 | 1 | 0% | 1,070 | 793 | -26% | 0 | 0 | — |
case-06 | pass→pass | 7,589 | 3,083 | -59% | 1 | 1 | 0% | 1,256 | 846 | -33% | 0 | 0 | — |
case-07 | fail→pass | 7,153 | 3,562 | -50% | 1 | 1 | 0% | 1,245 | 984 | -21% | 0 | 0 | — |
case-08 | pass→pass | 10,232 | 2,077 | -80% | 1 | 1 | 0% | 1,791 | 709 | -60% | 0 | 0 | — |
case-09 | pass→pass | 7,440 | 3,925 | -47% | 1 | 1 | 0% | 1,339 | 966 | -28% | 0 | 0 | — |
case-10 | pass→pass | 11,213 | 4,451 | -60% | 1 | 1 | 0% | 1,933 | 1,057 | -45% | 0 | 0 | — |
case-11 | pass→pass | 9,891 | 2,670 | -73% | 1 | 1 | 0% | 1,550 | 736 | -53% | 0 | 0 | — |
case-12 | pass→pass | 12,126 | 9,060 | -25% | 1 | 1 | 0% | 2,047 | 1,788 | -13% | 0 | 0 | — |
case-13 | pass→pass | 3,011 | 2,273 | -25% | 1 | 1 | 0% | 512 | 741 | +45% | 0 | 0 | — |
case-14 | pass→pass | 6,657 | 3,912 | -41% | 1 | 1 | 0% | 1,180 | 987 | -16% | 0 | 0 | — |
case-15 | fail→fail | 8,558 | 6,345 | -26% | 1 | 1 | 0% | 1,729 | 1,483 | -14% | 0 | 0 | — |
case-16 | pass→pass | 5,136 | 2,345 | -54% | 1 | 1 | 0% | 862 | 715 | -17% | 0 | 0 | — |
case-17 | pass→pass | 3,344 | 1,498 | -55% | 1 | 1 | 0% | 544 | 513 | -6% | 0 | 0 | — |
case-18 | pass→pass | 2,323 | 1,950 | -16% | 1 | 1 | 0% | 369 | 522 | +41% | 0 | 0 | — |
case-19 | pass→pass | 1,810 | 1,674 | -8% | 1 | 1 | 0% | 291 | 607 | +109% | 0 | 0 | — |
case-20 | pass→pass | 10,430 | 4,267 | -59% | 1 | 1 | 0% | 2,093 | 1,071 | -49% | 0 | 0 | — |
case-21 | fail→fail | 9,340 | 5,433 | -42% | 1 | 1 | 0% | 1,692 | 1,356 | -20% | 0 | 0 | — |
case-22 | pass→pass | 7,944 | 4,654 | -41% | 1 | 1 | 0% | 1,550 | 1,221 | -21% | 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. The headline lift of +5 percentage points is the difference between those two pass rates over the 22 comparable cases.
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.