Review and improve AI prompts for safety, bias, security, privacy, effectiveness, robustness, and testability. Use this skill when the user asks to audit a prompt, harden a system prompt, identify prompt injection risk, reduce bias, improve guardrails, or produce a safer enhanced prompt.
Analyze a prompt with safety, bias, privacy, security, effectiveness, robustness, and performance criteria, then return concrete findings, an improved prompt, and test recommendations.
When to invoke
"Review this prompt for safety issues."
"Harden this system prompt against prompt injection."
"Check this prompt for bias and privacy risk."
"Improve this AI prompt while keeping it effective."
"Create test cases for prompt safety and reliability."
Criteria
Safety assessment
Risk
Check
Harmful Content Risk
Could output generate harmful, dangerous, or inappropriate content?
Violence & Hate Speech
Could output promote violence, hate speech, or discrimination?
Misinformation Risk
Could output spread false or misleading information?
Illegal Activities
Could output promote illegal activities or personal harm?
Bias detection and mitigation
Check Gender Bias, Racial Bias, Cultural Bias, Socioeconomic Bias, and Ability Bias. Identify whether the prompt assumes stereotypes, excludes groups, overgeneralizes attributes, or uses examples that skew the model's behavior.
Security and privacy assessment
Area
Review question
Data Exposure
Could the prompt expose sensitive or personal data?
Prompt Injection
Can untrusted input override instructions or leak hidden context?
Information Leakage
Could output reveal system, model, policy, credential, or private implementation details?
Access Control
Does the prompt respect role, tenant, repository, and data-boundary constraints?
Effectiveness evaluation
Score each from 1-5 with evidence: Clarity, Context Adequacy, Constraint Definition, Format Specification, Specificity, and Completeness.
Advanced pattern analysis
Identify Prompt Pattern as Zero-shot, Few-shot, Chain-of-thought, Role-based, or Hybrid. Evaluate Pattern Effectiveness, Alternative Patterns, Context Utilization, and Constraint Implementation. Do not recommend hidden chain-of-thought disclosure; prefer brief rationale, structured reasoning summaries, or checklist outputs.
Technical robustness
Score Input Validation, Error Handling, Scalability, Maintainability, and Versioning. Check edge cases, invalid inputs, reversible changes, and whether updates can be tracked.
Performance optimization
Score Token Efficiency, Response Quality, Response Time, Consistency, and Reliability. Remove redundant wording only when it does not weaken safety, constraints, or output quality.
Improvement rules
Always prioritize safety over functionality.
Flag potential risks with specific mitigation strategies.
Consider edge cases and misuse scenarios.
Recommend constraints and guardrails that are enforceable by the prompt.
Preserve the user's legitimate objective while refusing or redirecting unsafe parts.
Include educational insights only when they help the user maintain the prompt.
Use industry best practices from Microsoft, OpenAI, and Google AI without inventing unsupported compliance claims.
Testing recommendations
Test category
Include
Test Cases
Normal task examples with expected safe and useful outcomes.
Prompt injection, data exfiltration, tool misuse, role confusion, and hidden instruction requests.
Gotchas
Do not optimize away guardrails: token efficiency is secondary to enforceable safety constraints.
Do not score without evidence: every Low/Medium/High, None/Minor/Major, or 1-5 score needs a concise reason.
Do not rewrite unsafe intent into a more effective harmful prompt: redirect to safe alternatives.
Do not claim a prompt is secure because it says so: evaluate how untrusted input is delimited and constrained.
Pattern vocabulary
Use exact prompt-pattern labels where helpful: Zero-shot/Few-shot/Chain-of-thought/Role-based/Hybrid, zero-shot, few-shot, and role-based. Check for ability-based stereotypes, whether the prompt is self-documenting, and whether it reliably produces high-quality outputs.
Safety, bias, security, privacy, effectiveness, robustness, and performance were reviewed.
Every score or severity includes evidence.
The improved prompt preserves legitimate intent and adds enforceable guardrails.
Unsafe intent is redirected rather than optimized.
Test recommendations include normal, edge, safety, bias, and security cases.
The final answer follows the output template and includes an enhanced prompt when safe to provide.
1---2name: ai-prompt-engineering-safety-review-23description: Review and improve AI prompts for safety, bias, security, privacy, effectiveness, robustness, and testability. Use this skill when the user asks to audit a prompt, harden a system prompt, identify prompt injection risk, reduce bias, improve guardrails, or produce a safer enhanced prompt.4---56# AI prompt engineering safety review78Analyze a prompt with safety, bias, privacy, security, effectiveness, robustness, and performance criteria, then return concrete findings, an improved prompt, and test recommendations.910## When to invoke1112- "Review this prompt for safety issues."13- "Harden this system prompt against prompt injection."14- "Check this prompt for bias and privacy risk."15- "Improve this AI prompt while keeping it effective."16- "Create test cases for prompt safety and reliability."1718## Criteria1920### Safety assessment2122| Risk | Check |23| --- | --- |24| Harmful Content Risk | Could output generate harmful, dangerous, or inappropriate content? |25| Violence & Hate Speech | Could output promote violence, hate speech, or discrimination? |26| Misinformation Risk | Could output spread false or misleading information? |27| Illegal Activities | Could output promote illegal activities or personal harm? |2829### Bias detection and mitigation3031Check Gender Bias, Racial Bias, Cultural Bias, Socioeconomic Bias, and Ability Bias. Identify whether the prompt assumes stereotypes, excludes groups, overgeneralizes attributes, or uses examples that skew the model's behavior.3233### Security and privacy assessment3435| Area | Review question |36| --- | --- |37| Data Exposure | Could the prompt expose sensitive or personal data? |38| Prompt Injection | Can untrusted input override instructions or leak hidden context? |39| Information Leakage | Could output reveal system, model, policy, credential, or private implementation details? |40| Access Control | Does the prompt respect role, tenant, repository, and data-boundary constraints? |4142### Effectiveness evaluation4344Score each from 1-5 with evidence: Clarity, Context Adequacy, Constraint Definition, Format Specification, Specificity, and Completeness.4546### Advanced pattern analysis4748Identify Prompt Pattern as Zero-shot, Few-shot, Chain-of-thought, Role-based, or Hybrid. Evaluate Pattern Effectiveness, Alternative Patterns, Context Utilization, and Constraint Implementation. Do not recommend hidden chain-of-thought disclosure; prefer brief rationale, structured reasoning summaries, or checklist outputs.4950### Technical robustness5152Score Input Validation, Error Handling, Scalability, Maintainability, and Versioning. Check edge cases, invalid inputs, reversible changes, and whether updates can be tracked.5354### Performance optimization5556Score Token Efficiency, Response Quality, Response Time, Consistency, and Reliability. Remove redundant wording only when it does not weaken safety, constraints, or output quality.5758## Improvement rules5960- Always prioritize safety over functionality.61- Flag potential risks with specific mitigation strategies.62- Consider edge cases and misuse scenarios.63- Recommend constraints and guardrails that are enforceable by the prompt.64- Preserve the user's legitimate objective while refusing or redirecting unsafe parts.65- Include educational insights only when they help the user maintain the prompt.66- Use industry best practices from Microsoft, OpenAI, and Google AI without inventing unsupported compliance claims.6768## Testing recommendations6970| Test category | Include |71| --- | --- |72| Test Cases | Normal task examples with expected safe and useful outcomes. |73| Edge Case Testing | Empty input, malformed input, excessive length, conflicting instructions, unsupported domain. |74| Safety Testing | Requests for harmful content, illegal assistance, or policy boundary probing. |75| Bias Testing | Demographic swaps, culture-specific examples, accessibility scenarios, socioeconomic assumptions. |76| Security Testing | Prompt injection, data exfiltration, tool misuse, role confusion, and hidden instruction requests. |7778## Gotchas7980- **Do not optimize away guardrails**: token efficiency is secondary to enforceable safety constraints.81- **Do not score without evidence**: every Low/Medium/High, None/Minor/Major, or 1-5 score needs a concise reason.82- **Do not rewrite unsafe intent into a more effective harmful prompt**: redirect to safe alternatives.83- **Do not claim a prompt is secure because it says so**: evaluate how untrusted input is delimited and constrained.8485## Pattern vocabulary8687Use exact prompt-pattern labels where helpful: `Zero-shot/Few-shot/Chain-of-thought/Role-based/Hybrid`, `zero-shot`, `few-shot`, and `role-based`. Check for `ability-based` stereotypes, whether the prompt is `self-documenting`, and whether it reliably produces `high-quality` outputs.8889## Output template9091```markdown92### Prompt analysis report9394**Original Prompt:**95<user prompt>9697**Task Classification:**98- **Primary Task:** <code generation | documentation | analysis | creative | other>99- **Complexity Level:** <Simple | Moderate | Complex>100- **Domain:** <technical | creative | analytical | other>101102**Safety Assessment:**103- **Harmful Content Risk:** <Low | Medium | High> - <specific concerns>104- **Bias Detection:** <None | Minor | Major> - <specific bias types>105- **Privacy Risk:** <Low | Medium | High> - <specific concerns>106- **Security Vulnerabilities:** <None | Minor | Major> - <specific vulnerabilities>107108**Effectiveness Evaluation:**109- **Clarity:** <1-5> - <assessment>110- **Context Adequacy:** <1-5> - <assessment>111- **Constraint Definition:** <1-5> - <assessment>112- **Format Specification:** <1-5> - <assessment>113- **Specificity:** <1-5> - <assessment>114- **Completeness:** <1-5> - <assessment>115116**Advanced Pattern Analysis:**117- **Pattern Type:** <Zero-shot | Few-shot | Chain-of-thought | Role-based | Hybrid>118- **Pattern Effectiveness:** <1-5> - <assessment>119- **Alternative Patterns:** <suggestions>120- **Context Utilization:** <1-5> - <assessment>121122**Technical Robustness:**123- **Input Validation:** <1-5> - <assessment>124- **Error Handling:** <1-5> - <assessment>125- **Scalability:** <1-5> - <assessment>126- **Maintainability:** <1-5> - <assessment>127128**Performance Metrics:**129- **Token Efficiency:** <1-5> - <assessment>130- **Response Quality:** <1-5> - <assessment>131- **Consistency:** <1-5> - <assessment>132- **Reliability:** <1-5> - <assessment>133134**Critical Issues Identified:**1351. <issue with severity and impact>136137**Strengths Identified:**1381. <strength with explanation>139140### Improved prompt141142**Enhanced Version:**143<complete improved prompt>144145**Key Improvements Made:**1461. **Safety Strengthening:** <improvement>1472. **Bias Mitigation:** <improvement>1483. **Security Hardening:** <improvement>1494. **Clarity Enhancement:** <improvement>1505. **Best Practice Implementation:** <improvement>151152**Safety Measures Added:**153- <measure>154155**Bias Mitigation Strategies:**156- <strategy>157158**Security Enhancements:**159- <enhancement>160161**Technical Improvements:**162- <improvement>163164### Testing recommendations165166**Test Cases:**167- <test with expected outcome>168169**Edge Case Testing:**170- <edge case with expected outcome>171172**Safety Testing:**173- <safety test with expected outcome>174175**Bias Testing:**176- <bias test with expected outcome>177178**Usage Guidelines:**179- **Best For:** <use cases>180- **Avoid When:** <situations to avoid>181- **Considerations:** <important factors>182- **Limitations:** <known limitations>183- **Dependencies:** <required context>184185### Educational insights186187**Prompt Engineering Principles Applied:**1881. **Principle:** <principle>189 - **Application:** <how applied>190 - **Benefit:** <why it improves the prompt>191192**Common Pitfalls Avoided:**1931. **Pitfall:** <mistake>194 - **Why It's Problematic:** <explanation>195 - **How We Avoided It:** <strategy>196```197198## Quality gate199200- [ ] Safety, bias, security, privacy, effectiveness, robustness, and performance were reviewed.201- [ ] Every score or severity includes evidence.202- [ ] The improved prompt preserves legitimate intent and adds enforceable guardrails.203- [ ] Unsafe intent is redirected rather than optimized.204- [ ] Test recommendations include normal, edge, safety, bias, and security cases.205- [ ] The final answer follows the output template and includes an enhanced prompt when safe to provide.
Run npx skillmds@latest add paulasilvatech/ai-prompt-engineering-safety-review-2 in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Review and improve AI prompts for safety, bias, security, privacy, effectiveness, robustness, and testability. Use this skill when the user asks to audit a prompt, harden a system prompt, identify prompt injection risk, reduce bias, improve guardrails, or produce a safer enhanced prompt. It is listed under AI & ML on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
paulasilvatech (@paulasilvatech) published this skill. Their other Agent Skills are listed on their SkillMD profile.