ai-safety-guardrails
Skill3 starsChanged 4 months agoMITView on GitHub
Design safety experiences for AI products - content moderation UX, bias detection surfaces, harm prevention patterns, and responsible AI interfaces. Use when: AI safety UX, content moderation, responsible AI, AI bias UX, harm prevention, content filtering UX, AI refusal design, safety disclaimers.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- roanbrasil/engineer-grade-agent-skillstheir own version, first seen Jun 17, 2026
- kienbui1995/magic-powerstheir own version, first seen Apr 10, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- roanbrasil/engineer-grade-agent-skills★ 8same name
- kienbui1995/magic-powers★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository12 other files it gives its agents.
- ai-accessibility-auditSkill
- ai-agent-uxSkill
- ai-conversation-architectSkill
- ai-error-resilienceSkill
- ai-feedback-loopsSkill
- ai-journey-mapperSkill
- ai-multimodal-outputSkill
- ai-onboarding-calibrationSkill
- ai-personalization-ethicsSkill
- ai-prompt-uxSkill
- ai-trust-transparencySkill
- ai-ux-evalSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 89
When AI output may contain bias, surface it proactively:
- Distinctive: line 125
When a safety failure occurs in production:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AI Safety Guardrails
Design the user-facing layer of AI safety - how products prevent harm, communicate restrictions, handle sensitive content, and maintain accountability. The SHIELD framework ensures safety mechanisms protect users without destroying the user experience.
Core Principle
Safety and usability are not opposites. The best safety design is invisible when everything is fine and clear when it matters. Safety should feel like a guardrail on a mountain road - you forget it's there until you need it, and when you need it, you're grateful it's solid.
The SHIELD Framework
| Letter | Principle | Design Question |
| S | Scope the Risks | Have you mapped every way this AI could produce harm? |
| H | Human Oversight Gates | Are there human checkpoints before high-risk AI actions take effect? |
| I | Inform on Restriction | When the AI restricts output, does it explain why and what alternatives exist? |
| E | Escalation Paths | Can users challenge a restriction through a clear, fair process? |
| L | Log Everything | Is there an auditable record of safety decisions? |
| D | Degrade Gracefully | When safety mechanisms activate, does the product still provide value? |
The Harm Taxonomy for AI Products
Design different safety responses for different harm types:
| Harm Category | Examples | Severity | UX Response |
| Misinformation | Hallucinated facts, fabricated citations, false statistics | High | Citation requirements, confidence indicators, verification prompts |
| Bias amplification | Stereotyping in outputs, skewed recommendations, unfair treatment | High | Bias detection indicators, diverse output prompts, fairness disclaimers |
| Privacy leakage | AI revealing personal data, memorized training content | Critical | Input sanitization, output scanning, PII detection alerts |
| Harmful instructions | Dangerous activities, self-harm, illegal guidance | Critical | Hard block + resource referral (crisis lines, safety info) |
| Manipulation | Persuasion without disclosure, dark patterns, emotional exploitation | High | Transparency requirements, intent disclosure |
| Overreliance | Users making critical decisions solely based on AI output | Medium | Decision-support framing, "consult a professional" nudges |
| Exclusion | AI that works poorly for certain languages, cultures, or accessibility needs | Medium | Coverage transparency, alternative pathways, inclusion testing |
The Refusal Design Spectrum
How an AI says "no" is as important as when it says "no."
Refusal Patterns (Good to Bad)
| Pattern | User Experience | When to Use |
| Redirect | "I can't do X, but I can help with Y instead." | When a safe alternative exists |
| Explain & Educate | "I can't do X because [reason]. Here's what you can do instead." | When the user may not understand the restriction |
| Acknowledge & Decline | "I understand you're asking about X. I'm not able to help with that." | When the topic is sensitive but the user's intent may be legitimate |
| Hard Block | "I can't assist with this request." + safety resources if relevant | When the request is clearly harmful |
Refusal Anti-Patterns
| Anti-Pattern | Why It Fails | Better Alternative |
| "I'm sorry, I can't do that" with no explanation | Frustrating, feels arbitrary | Explain the category of restriction |
| Moralizing ("You shouldn't ask about that") | Patronizing, assumes bad intent | State the limitation without judging the user |
| Refusing adjacent-but-safe requests | Over-filtering kills utility | Tune safety to the actual risk, not surface-level keyword matching |
| Different refusal messages for the same category | Inconsistency confuses users | Standardize refusal language by harm category |
| Silent content modification | Changing the output without telling the user | Always disclose when output has been modified for safety |
Content Sensitivity Indicators
The Content Sensitivity Scale
| Level | Label | Indicator | Example Content |
| L0 | Safe | No indicator needed | General information, creative writing, code |
| L1 | Informational Caution | Subtle note: "Verify independently" | Historical facts, statistics, regulatory info |
| L2 | Professional Domain | Badge: "Consult a professional" | Medical symptoms, legal questions, financial advice |
| L3 | Sensitive Topic | Warning banner: "This topic requires careful consideration" | Mental health, political topics, cultural sensitivities |
| L4 | High Risk | Prominent disclaimer + verification required | Medical diagnosis, legal counsel, crisis situations |
| L5 | Restricted | Hard gate + human oversight | Topics that could cause direct harm |
Bias Detection Surfaces
User-Visible Bias Indicators
When AI output may contain bias, surface it proactively:
| Indicator | When to Show | What It Communicates |
| Demographic coverage note | When output involves people or groups | "This analysis covers [groups included]. Other perspectives may differ." |
| Data recency badge | When training data may reflect outdated norms | "Based on data through [date]. Social norms and best practices evolve." |
| Perspective diversity score | When output represents a viewpoint | "This represents one perspective. For alternative viewpoints, try [suggestion]." |
| Representation audit | When generating images or creative content | Audit generated content for demographic representation before presenting |
Safety Disclaimer Architecture
Disclaimer Placement Decision Matrix
| Content Type | Where to Place Disclaimer | Format |
| General AI outputs | Footer, one-time acknowledgment | "AI-generated content. Verify important information." |
| Medical/legal/financial | Inline, every relevant response | Bold banner: "This is not professional advice. Consult [type] professional." |
| Creative/subjective content | No disclaimer needed | None - over-disclaiming creative content undermines its value |
| Code generation | Inline warning for security-sensitive code | "Review this code for security vulnerabilities before deploying." |
| Data analysis | Methodology note | "Based on the data provided. Results depend on data quality and completeness." |
Disclaimer Fatigue Prevention
| Problem | Solution |
| Users ignore repeated disclaimers | Vary the language; use contextual phrasing, not boilerplate |
| Disclaimers on everything undermine all disclaimers | Reserve prominent disclaimers for genuinely high-risk content |
| Legal disclaimers written for lawyers, not users | Write safety information in plain language at a 6th-grade reading level |
| Disclaimer blocks the content | Place disclaimers alongside content, not before it (users skip blockers) |
Incident Response UX
When a safety failure occurs in production:
The Safety Incident Flow
| Phase | UX Action | Timeline |
| Detection | System detects harmful output was served | Automated (seconds) or user-reported |
| Containment | Flag affected outputs, prevent further distribution | Within minutes |
| User notification | Inform affected users clearly and honestly | Within hours |
| Remediation | Correct the output, improve the guardrail | Within days |
| Post-incident | Publish what happened, what was fixed, and what changed | Within 1 week |
User Notification for Safety Incidents
| Do | Don't |
| Be specific about what was wrong | Use vague "we're improving our systems" language |
| Explain what the user should do (e.g., disregard specific output) | Assume users will figure it out |
| Describe what changed to prevent recurrence | Pretend it didn't happen |
| Offer a way to contact the team with questions | Hide behind a no-reply email |
Anti-Patterns
| Pattern | Why It Fails |
| Safety theater (prominent disclaimers on safe content, none on risky content) | Users learn to ignore all safety signals |
| Blocking entire topics instead of nuanced handling | Legitimate use cases get caught in the filter (e.g., medical professionals researching symptoms) |
| Making safety someone else's problem ("Use at your own risk") | Transfers liability without reducing harm |
| Safety only at the output layer | Input validation, contextual understanding, and output filtering all need safety design |
| One-size-fits-all safety for all user types | A medical professional and a teenager need different safety calibrations |
Quick Reference
| Task | Framework Element | Key Deliverable |
| Design safety for new AI product | Full SHIELD framework + Harm Taxonomy | Risk map + safety response matrix |
| Design AI refusal experience | Refusal Design Spectrum | Refusal language guidelines + redirect patterns |
| Add content warnings | Content Sensitivity Scale (L0-L5) | Sensitivity level assignment per content type |
| Audit AI product for bias | Bias Detection Surfaces | Bias indicator system + user-visible audit patterns |
| Handle a safety incident | Safety Incident Flow | Incident response playbook with user notification templates |
Integration
Works with: ai-error-resilience (safety failures as a subset of errors), ai-trust-transparency (transparency about safety filtering), ai-agent-ux (safety boundaries for autonomous actions), ai-personalization-ethics (preventing personalization-driven harm), ai-ux-eval (scores the trust dimension).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

