Guardrails logo

Guardrails

Organization
ai-analyst-lab
guardrails

Pair every success metric with guardrail metrics and check for trade-offs before presenting improvements as wins. Trigger when defining a metric or spec, and on any positive metric movement: "X improved", "X is up", "X increased", "better performance on X", "we're seeing gains in X". Never present a metric improvement without the guardrail check; an improvement with a degraded guardrail is a trade-off, not a win.

Overview

Publisherai-analyst-lab
Repositoryai-analyst-plugin
Skill nameguardrails
Stars
34
Forks
13
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by ai-analyst-lab on GitHub. Read the source before you install it.

Installation

Install the Guardrails AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/ai-analyst-lab/ai-analyst-plugin/tree/main/ai-analyst-plus/skills/guardrails
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ai-analyst-lab/ai-analyst-plugin.git /tmp/ai-analyst-plugin
mkdir -p .claude/skills
cp -r /tmp/ai-analyst-plugin/ai-analyst-plus/skills/guardrails .claude/skills/guardrails
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Guardrails in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Guardrails on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Guardrails is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Skill: Guardrails Awareness

Purpose

Ensure that every success metric is paired with at least one guardrail metric, and that positive findings are checked for trade-offs before being presented as wins.

When to Use

Apply this skill in two situations:

  1. When defining metrics — after using the Metric Spec skill, check whether the metric has a guardrail pair
  2. When reporting positive findings — before presenting any improvement, check whether a related guardrail metric degraded

Instructions

What Are Guardrails?

A guardrail metric is a metric you don't want to degrade while optimizing a success metric. Guardrails protect against winning the metric game while losing the business game.

SUCCESS METRIC:  The metric you're trying to improve
GUARDRAIL:       The metric that must not get worse

The rule: Never celebrate an improvement on a success metric without checking its guardrail(s). An improvement with a degraded guardrail is a trade-off, not a win.

Common Guardrail Pairs

Success MetricGuardrail(s)Why
Conversion rateAverage order value, Return rateAggressive discounts inflate conversion but erode margin and invite returns
Signup rateActivation rate, 7-day retentionLowering the signup bar brings in unqualified users who churn immediately
Revenue per userUser satisfaction (NPS/CSAT), Support ticket volumeMonetization pressure degrades experience
Feature adoptionCore workflow completion, Session durationForcing feature usage may disrupt existing workflows
Time to complete (speed)Error rate, Quality scoreRushing degrades accuracy
Cost reductionQuality, Customer satisfactionCutting costs can degrade service
Engagement (DAU, sessions)Revenue per user, Churn rateEngagement tricks (notifications, dark patterns) don't translate to value
Support resolution timeCustomer satisfaction, Reopen rateFast close ≠ good close if tickets reopen

How to Apply

When Defining Metrics

After specifying a metric using the Metric Spec skill, add a guardrail section:

markdown
### Guardrails
| Guardrail Metric | Acceptable Range | Check Frequency |
|-----------------|-----------------|-----------------|
| [guardrail 1] | [must stay above X / must not increase by >Y%] | [same cadence as success metric] |
| [guardrail 2] | [threshold] | [cadence] |

Rules for selecting guardrails:

  1. At least one guardrail per success metric
  2. The guardrail should measure a different dimension of value (e.g., if success is quantity, guardrail is quality)
  3. The guardrail must be measurable with available data
  4. If no obvious guardrail exists, use customer satisfaction or support ticket volume as defaults

Guardrail selection framework: When choosing guardrails, think about what could go wrong if you optimize the success metric aggressively. Ask yourself:

  • Quality vs. Quantity: If the success metric measures volume (signups, orders, sessions), check quality metrics (conversion rate, AOV, retention)
  • Speed vs. Accuracy: If the success metric measures speed (time to resolution, checkout time), check accuracy/quality (error rate, reopen rate, customer satisfaction)
  • Revenue vs. Experience: If the success metric measures revenue (RPU, monetization rate), check experience metrics (NPS, support tickets, churn)
  • Short-term vs. Long-term: If the success metric measures immediate outcomes, check long-term health (retention, LTV, repeat purchase rate)

When guardrail data is unavailable:

  1. First priority: Check if the guardrail can be proxied (e.g., if CSAT data doesn't exist, use support ticket volume or product return rate as a quality signal)
  2. Second priority: Document the missing guardrail as a known risk and recommend tracking it for future iterations
  3. Do NOT skip the guardrail check entirely — use whatever quality signals are available, even if imperfect
  4. Example: "Conversion rate improved 20%, but we lack return rate data to confirm quality. As a partial guardrail check, AOV increased 5% (suggesting legitimate demand, not discount-driven conversions). Recommend adding return rate tracking."
When Reporting Positive Findings

Before presenting any statement like "[metric] improved by X%," run this check:

GUARDRAIL CHECK
□ Identified guardrail metric(s) for [success metric]
□ Computed guardrail metric(s) over the same time period
□ Compared guardrail to baseline / acceptable range
□ Result: [CLEAR / TRADE-OFF / DEGRADED]

Verdicts:

VerdictGuardrail StatusHow to Present
CLEARGuardrail stable or improvedPresent the improvement as a win
TRADE-OFFGuardrail slightly degraded (<10% relative)Present the improvement AND the trade-off: "Conversion improved 15%, but AOV decreased 5%. Net revenue impact is +8%."
DEGRADEDGuardrail significantly degraded (>10% relative)Do NOT present as a win. Present as: "Conversion improved 15%, but return rate doubled. The net impact may be negative — further investigation needed."

Note on thresholds: The 10% threshold is a starting point, not a universal rule. Adjust based on context:

  • High-impact guardrails (e.g., customer churn, security incidents): Even 5% degradation may be DEGRADED
  • Volatile guardrails (e.g., daily engagement metrics): 10-15% degradation may be normal variance, use TRADE-OFF
  • Revenue-critical guardrails (e.g., AOV, margin): Compute absolute dollar impact to determine severity, not just percentages
  • When in doubt: Err on the side of caution — flag smaller degradations and let stakeholders decide if the trade-off is acceptable

Guardrail Escalation

When a guardrail is degraded:

  1. Quantify both sides — compute the success metric gain AND the guardrail loss in the same units (usually dollars or users)
  2. Compute net impact — is the gain larger than the loss?
  3. Flag uncertainty — guardrail degradation often has delayed effects (e.g., returns take weeks to materialize, churn shows up months later). Note this.
  4. Recommend investigation — "The conversion improvement looks positive, but the return rate increase warrants investigation before concluding this is a net win."

Output Format

When guardrails are checked, add this section to the analysis report:

markdown
## Guardrail Check

| Success Metric | Change | Guardrail | Change | Verdict |
|---------------|--------|-----------|--------|---------|
| [metric] | +X% | [guardrail 1] | [no change / +Y% / -Z%] | CLEAR / TRADE-OFF / DEGRADED |
| | | [guardrail 2] | [change] | [verdict] |

**Net assessment:** [The improvement is real / The improvement comes with a trade-off / The improvement may be net negative]

Examples

Example 1: Clear Win

markdown
## Guardrail Check

| Success Metric | Change | Guardrail | Change | Verdict |
|---------------|--------|-----------|--------|---------|
| Checkout conversion | +12% | Avg order value | +2% (stable) | CLEAR |
| | | Return rate | -1% (improved) | CLEAR |

**Net assessment:** The conversion improvement is a genuine win. Both guardrails are stable or improving.

Example 2: Trade-Off

markdown
## Guardrail Check

| Success Metric | Change | Guardrail | Change | Verdict |
|---------------|--------|-----------|--------|---------|
| Signup rate | +25% | 7-day activation | -8% | TRADE-OFF |
| | | 30-day retention | -3% (within normal range) | CLEAR |

**Net assessment:** The signup rate improvement is partially offset by lower activation. The new signups are less qualified. Recommend segmenting the new signups to identify which acquisition channel is bringing lower-quality users.

Example 3: Degraded Guardrail

markdown
## Guardrail Check

| Success Metric | Change | Guardrail | Change | Verdict |
|---------------|--------|-----------|--------|---------|
| Resolution time | -40% (faster) | Reopen rate | +85% | DEGRADED |
| | | CSAT score | -22% | DEGRADED |

**Net assessment:** The faster resolution time is coming at the cost of quality. Tickets are being closed prematurely and reopened, and customer satisfaction has dropped significantly. This is NOT a net improvement. Recommend reverting the process change and investigating sustainable ways to reduce resolution time.

Anti-Patterns

  1. Never report a success metric improvement without checking guardrails — a 20% conversion lift with a 30% return rate increase is not a win
  2. Never define a metric without at least one guardrail — every metric can be gamed; guardrails prevent it
  3. Never dismiss a small guardrail degradation — small degradations compound and may have delayed effects (churn shows up months later)
  4. Never use the same metric as both success and guardrail — they must measure different dimensions of value
  5. Never skip the net impact calculation — "conversion up, returns up" is not actionable without knowing which effect is larger

Frequently asked questions

What does the Guardrails AI skill do?

Pair every success metric with guardrail metrics and check for trade-offs before presenting improvements as wins. Trigger when defining a metric or spec, and on any positive metric movement: "X improved", "X is up", "X increased", "better performance on X", "we're seeing gains in X". Never present a metric improvement without the guardrail check; an improvement with a degraded guardrail is a trade-off, not a win.

Why use Guardrails on TypingMind?

Because you install it once and use it with any model. Guardrails is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Guardrails in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ai-analyst-lab/ai-analyst-plugin/tree/main/ai-analyst-plus/skills/guardrails. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Guardrails?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Guardrails?

As many as you like. As long as a model supports skills, you can use Guardrails with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Guardrails AI skill free?

Yes. It is published on GitHub by ai-analyst-lab under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇