Logo de Guardrails

Guardrails

Organização
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.

Visão geral

Publicado porai-analyst-lab
Repositórioai-analyst-plugin
Nome da habilidadeguardrails
Estrelas
34
Forks
13
Arquivos incluídos
Somente instruções
LicençaMIT
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    As habilidades de IA são escritas em Markdown simples, não em código específico de um provedor. Por isso, funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Sem arquivos extras

    Tudo de que o modelo precisa está nas instruções — sem arquivos extras para sincronizar.

  • Código aberto

    Publicada por ai-analyst-lab no GitHub. Leia os arquivos da habilidade antes de instalá-la.

Instalação

Instale a habilidade de IA Guardrails no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL abaixo, que aponta para a pasta da habilidade, e confirme.
    https://github.com/ai-analyst-lab/ai-analyst-plugin/tree/main/ai-analyst-plus/skills/guardrails
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Adicionar habilidade → Via URL do GitHub. Depois, cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse agente.

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
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Guardrails em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Guardrails automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Guardrails não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo seguirá.

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

Perguntas frequentes

O que a habilidade de IA Guardrails faz?

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.

Por que usar Guardrails no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. A habilidade Guardrails é escrita em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. No TypingMind, você usa suas próprias chaves de API e paga diretamente aos provedores, em vez de pagar uma assinatura por licença de usuário. Suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Guardrails no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/ai-analyst-lab/ai-analyst-plugin/tree/main/ai-analyst-plus/skills/guardrails. O TypingMind lê o arquivo SKILL.md e instala a habilidade para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Guardrails?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Guardrails?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Guardrails com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Guardrails é gratuita?

Sim. A habilidade é publicada no GitHub por ai-analyst-lab sob a licença MIT. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, templates ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas que ele pode acionar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA dá ao modelo o conhecimento e as orientações de que ele precisa: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver lista completa

Crie seu próprio espaço de trabalho com IA agora

Inscreva-se na nossa newsletter para receber avisos sobre novos recursos e futuros sorteios 👇