/testing-automation:ai-prompt-engineering-safety-reviewfrom testing-automation
Reviews and improves AI prompts for safety, bias, security, privacy, effectiveness, robustness, and testability. Useful for auditing prompts, hardening system prompts against injection, reducing bias, and creating safety test cases.
Ships in testing-automation. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Analyze a prompt with safety, bias, privacy, security, effectiveness, robustness, and performance criteria, then return concrete findings, an improved prompt, and test recommendations.
| 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? |
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.
| 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? |
Score each from 1-5 with evidence: Clarity, Context Adequacy, Constraint Definition, Format Specification, Specificity, and Completeness.
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.
Score Input Validation, Error Handling, Scalability, Maintainability, and Versioning. Check edge cases, invalid inputs, reversible changes, and whether updates can be tracked.
Score Token Efficiency, Response Quality, Response Time, Consistency, and Reliability. Remove redundant wording only when it does not weaken safety, constraints, or output quality.
| Test category | Include |
|---|---|
| Test Cases | Normal task examples with expected safe and useful outcomes. |
| Edge Case Testing | Empty input, malformed input, excessive length, conflicting instructions, unsupported domain. |
| Safety Testing | Requests for harmful content, illegal assistance, or policy boundary probing. |
| Bias Testing | Demographic swaps, culture-specific examples, accessibility scenarios, socioeconomic assumptions. |
| Security Testing | Prompt injection, data exfiltration, tool misuse, role confusion, and hidden instruction requests. |
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.
### Prompt analysis report
**Original Prompt:**
<user prompt>
**Task Classification:**
- **Primary Task:** <code generation | documentation | analysis | creative | other>
- **Complexity Level:** <Simple | Moderate | Complex>
- **Domain:** <technical | creative | analytical | other>
**Safety Assessment:**
- **Harmful Content Risk:** <Low | Medium | High> - <specific concerns>
- **Bias Detection:** <None | Minor | Major> - <specific bias types>
- **Privacy Risk:** <Low | Medium | High> - <specific concerns>
- **Security Vulnerabilities:** <None | Minor | Major> - <specific vulnerabilities>
**Effectiveness Evaluation:**
- **Clarity:** <1-5> - <assessment>
- **Context Adequacy:** <1-5> - <assessment>
- **Constraint Definition:** <1-5> - <assessment>
- **Format Specification:** <1-5> - <assessment>
- **Specificity:** <1-5> - <assessment>
- **Completeness:** <1-5> - <assessment>
**Advanced Pattern Analysis:**
- **Pattern Type:** <Zero-shot | Few-shot | Chain-of-thought | Role-based | Hybrid>
- **Pattern Effectiveness:** <1-5> - <assessment>
- **Alternative Patterns:** <suggestions>
- **Context Utilization:** <1-5> - <assessment>
**Technical Robustness:**
- **Input Validation:** <1-5> - <assessment>
- **Error Handling:** <1-5> - <assessment>
- **Scalability:** <1-5> - <assessment>
- **Maintainability:** <1-5> - <assessment>
**Performance Metrics:**
- **Token Efficiency:** <1-5> - <assessment>
- **Response Quality:** <1-5> - <assessment>
- **Consistency:** <1-5> - <assessment>
- **Reliability:** <1-5> - <assessment>
**Critical Issues Identified:**
1. <issue with severity and impact>
**Strengths Identified:**
1. <strength with explanation>
### Improved prompt
**Enhanced Version:**
<complete improved prompt>
**Key Improvements Made:**
1. **Safety Strengthening:** <improvement>
2. **Bias Mitigation:** <improvement>
3. **Security Hardening:** <improvement>
4. **Clarity Enhancement:** <improvement>
5. **Best Practice Implementation:** <improvement>
**Safety Measures Added:**
- <measure>
**Bias Mitigation Strategies:**
- <strategy>
**Security Enhancements:**
- <enhancement>
**Technical Improvements:**
- <improvement>
### Testing recommendations
**Test Cases:**
- <test with expected outcome>
**Edge Case Testing:**
- <edge case with expected outcome>
**Safety Testing:**
- <safety test with expected outcome>
**Bias Testing:**
- <bias test with expected outcome>
**Usage Guidelines:**
- **Best For:** <use cases>
- **Avoid When:** <situations to avoid>
- **Considerations:** <important factors>
- **Limitations:** <known limitations>
- **Dependencies:** <required context>
### Educational insights
**Prompt Engineering Principles Applied:**
1. **Principle:** <principle>
- **Application:** <how applied>
- **Benefit:** <why it improves the prompt>
**Common Pitfalls Avoided:**
1. **Pitfall:** <mistake>
- **Why It's Problematic:** <explanation>
- **How We Avoided It:** <strategy>
What SKILL.md sets; muted values are Claude Code's defaults
13 skills in this plugin
/csharp-nunitDesign, write, and review NUnit tests for .NET projects, including standard tests, data-driven tests, assertions, setup/teardown, categories, and isolation with mocks. Use this skill when the user asks for NUnit best practices, `dotnet test`, `[TestCase]`, `[TestCaseSource]`, or C# unit test structure./java-junitApply JUnit 5 best practices for Java tests, including Maven or Gradle setup, standard and parameterized tests, lifecycle hooks, assertions, Mockito isolation, tags, nested tests, and test commands. Use when asked for JUnit 5+ guidance or to write Java unit tests./javascript-typescript-jestWrite and review JavaScript and TypeScript Jest tests with strong structure, mocks, async handling, snapshots, and React Testing Library patterns. Use this skill when the user asks to add Jest tests, improve test structure, mock APIs or databases, test async code, update snapshots, or test React components./pester-migrationUpgrade PowerShell Pester test suites across major versions v3 to v4, v4 to v5, and v5 to v6 while preserving test intent. Use when asked to migrate, modernize, or fix *.Tests.ps1 files after a Pester version bump, convert legacy Should or Invoke-Pester syntax, handle Discovery/Run failures, move setup into BeforeAll, migrate mocks, or adopt PesterConfiguration./pester-should-migrationConvert classic Pester v5 `Should -...` assertions to Pester v6 `Should-*` assertion commands while preserving behavior. Use when asked to migrate, convert, rewrite, or modernize `Should -Be`, `Should -Not -Be`, `Should -Throw`, `Should -Invoke`, or other assertions in .Tests.ps1 and PowerShell files./playwright-automation-fill-in-formAutomate filling and reviewing a Microsoft Forms response with Playwright MCP. Use this skill when the user asks to open a form, fill specific fields, upload an image, or prepare but not submit a Playwright-driven form response.npx claudepluginhub gbb-acelerators/awesome-harness-primitives --plugin testing-automationOther plugins' skills for the same job