跳到正文
cccskills
免费在 GitHub 公开

prompt-governance

This skill should be used when the user asks to "audit prompts for safety", "check prompts for injection vulnerabilities", "manage a prompt catalog", "version control prompts", or "review prompt quality and compliance".

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(4)

  • SKILL.md5.7 KB
  • references/prompt-governance-framework.md2.9 KB
  • scripts/prompt_auditor.py13.7 KB
  • scripts/prompt_catalog_manager.py13.2 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Prompt Governance

Category: Engineering Domain: AI Governance

Overview

The Prompt Governance skill provides tools for auditing prompts for security vulnerabilities, bias, and safety issues, plus managing a versioned catalog of approved prompts. Essential for organizations deploying LLM-based applications at scale.

Clarify First

Before auditing or cataloging, settle the inputs below. When one is missing or vague and would change the result, ask about it; when it wouldn't, use a sensible default and say which one you used.

  • Target prompt(s): the exact file/text to audit or the catalog dir to manage (the subject of every check).
  • Task: audit vs catalog management: selects prompt_auditor.py vs prompt_catalog_manager.py and the whole workflow.
  • Check focus: injection / bias / safety (sets which auditor checks run and the pass/fail bar).

Ask about the two or three inputs that matter most for this request, not the whole list. If the user wants a result straight away, produce it and state your assumptions at the top.

Quick Start

# Audit a prompt for security and safety issues
python scripts/prompt_auditor.py --file system_prompt.txt

# Audit with specific focus
python scripts/prompt_auditor.py --text "You are a helpful assistant..." --checks injection,bias,safety

# Initialize a prompt catalog
python scripts/prompt_catalog_manager.py --init --catalog-dir ./prompts

# Add a prompt to the catalog
python scripts/prompt_catalog_manager.py --add --name "customer-support-v1" --file prompt.txt --catalog-dir ./prompts

# List all prompts in catalog
python scripts/prompt_catalog_manager.py --list --catalog-dir ./prompts

Tools Overview

ToolPurposeKey Flags
prompt_auditor.pyAudit prompts for injection, bias, and safety--file, --text, --checks, --format
prompt_catalog_manager.pyManage versioned prompt catalog--init, --add, --list, --diff, --catalog-dir

Workflows

Prompt Review Process

  1. Author writes or modifies a prompt
  2. Run prompt_auditor.py for automated checks
  3. Review findings and address critical issues
  4. Add approved prompt to catalog with prompt_catalog_manager.py
  5. Deploy from catalog (never from ad-hoc sources)

Prompt Versioning

  1. Store all prompts in the catalog; each --add with changed content gets the next patch version (1.0.0, 1.0.1, ...), and identical content is rejected as a duplicate
  2. Use --diff to compare versions before promotion
  3. Move the latest version through draft, review, approved and deployed with --status; keep the catalog directory in version control for the audit trail
  4. There is no rollback command, and re-adding an earlier version's text is rejected as a duplicate. To roll back, redeploy the previous version's text from versions/<name>_v<x_y_z>.txt and mark the bad latest version retired with --status retired (the CLI changes the latest version only)

Scope & Limitations

In Scope:

  • Pattern-based audit of a prompt with prompt_auditor.py across four check groups: injection, bias, safety and quality, selectable with --checks.
  • A local, file-based prompt catalog with prompt_catalog_manager.py: init, add with automatic version numbers and a content hash, list, search, diff between versions, and status changes (draft, review, approved, deployed, retired).
  • The prompt review and versioning workflows, and the policies, audit categories, severity levels, catalog schema and review checklist in references/prompt-governance-framework.md.

Out of Scope:

  • Testing a deployed model or application against live injection or jailbreak attempts (see engineering/ai-security/).
  • Measuring output quality or task accuracy of a prompt (see engineering/agentic-evaluation-framework/).
  • Writing or tuning prompts (see engineering/senior-prompt-engineer/) and reducing token cost (see engineering/llm-cost-optimizer/).
  • Regulatory AI governance such as the EU AI Act or ISO/IEC 42001 (see ra-qm-team/eu-ai-act-specialist/ and ra-qm-team/iso42001-ai-management/).
  • Serving prompts to an application or rolling them back at runtime. The catalog records versions and status only.

Important Caveats:

  • The auditor matches regular expressions against prompt text. It catches known phrasings, misses reworded or new ones, and can flag harmless text. A clean audit is not evidence that a prompt is safe or unbiased.
  • The auditor and the catalog are not linked. New catalog entries are stored with audit status pending, and running the auditor does not update it.
  • The catalog is a local directory with a JSON index and no access control, locking or signing. Approval and audit trail depend on the user's own version control and review process.

Reference Documentation

Common Patterns

Prompt Lifecycle

Draft -> Audit -> Review -> Approve -> Deploy -> Monitor -> Retire

Governance Checklist

  • No injection vulnerabilities
  • No harmful content generation potential
  • Appropriate bias mitigation
  • Clear scope boundaries
  • Output format constraints
  • Error handling instructions

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

This skill should be used when the user asks to "check accessibility", "audit WCAG compliance", "scan HTML for a11y issues", "check color contrast", or "find accessibility violations in web pages".

中文简介正在准备中。当前显示原文说明。

borghei/Claude-Skills9692026年10月23日 更新

Design and run statistically rigorous A/B tests and experiments. Use when planning experiments, calculating sample sizes, designing test variants, selecting metrics, analyzing results, or when someone says "let's test that."

中文简介正在准备中。当前显示原文说明。

borghei/Claude-Skills9692026年10月23日 更新

Design and analyze A/B tests: sample size, test duration, and statistical significance for conversion experiments. Use when setting up an A/B test, calculating sample size, designing an experiment, or analyzing results.

中文简介正在准备中。当前显示原文说明。

borghei/Claude-Skills9692026年10月23日 更新

Sales execution across pipeline, discovery, demos, negotiation, and closing. Use when qualifying opportunities, running MEDDIC discovery, building account plans, handling objections, structuring proposals, or forecasting pipeline.

中文简介正在准备中。当前显示原文说明。

borghei/Claude-Skills9692026年10月23日 更新

Design ad creative across Google, Meta, LinkedIn, Twitter/X, and TikTok with platform format specs, headline formulas, and A/B testing. Use when writing ad copy, generating headline variations, creating ad sets, or validating creative.

中文简介正在准备中。当前显示原文说明。

borghei/Claude-Skills9692026年10月23日 更新

aeo

免费

Answer Engine Optimization (AEO): optimize content to be cited by LLMs (ChatGPT, Claude, Perplexity, Gemini) in their answers. Use when designing content for LLM citation, auditing citability, or structuring Q&A schema.

中文简介正在准备中。当前显示原文说明。

borghei/Claude-Skills9692026年10月23日 更新

查看 borghei 的全部技能

报告此技能的问题