Agent skill · Testing & QA

policy-qa

Answer policy questions with strict citations. Refuses to answer without sources.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill policy-qa --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 12 KB
Bundled scripts: none
Version: 1.0.0
Requires: - mcp: "postgres" # pgvector for policy corpus - mcp: "python" # retrieval and ranking
Path: skills/analysis/policy-qa/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Policy Q&A Skill ## Purpose Answer policy and SOP questions with strict source attribution. Refuses to answer without relevant sources. Designed for compliance-sensitive environments. ## Usage ```python # Ask policy question answer = policy_qa( question="What is the approval workflow for journal entries over $100K?", top_k=5, min_confidence=0.8 ) ``` ## Workflow ### 1. Embed Question ```python from sentence_transformers import SentenceTransformer def embed_question(question, model_name='sentence-transformers/all-MiniLM-L6-v2'): """Embed question using same model as policy corpus""" model = SentenceTransformer(model_name) embedding = model.encode(question) return embedding.tolist() ``` ### 2. Retrieve from pgvector ```python import psycopg2 def retrieve_policy_sources(question_embedding, top_k=5): """Retrieve similar policy chunks from pgvector""" conn = psycopg2.connect(os.environ['POSTGRES_URL']) cursor = conn.cursor() # Vector similarity search query = """ SELECT id, text, document_name, section, page_number, url, 1 - (embedding <=> %s::vector) AS similarity FROM policy_chunks WHERE 1 - (embedding <=> %s::vector) > 0.3 -- Minimum similarity threshold ORDER BY embedding <=> %s::

What's inside
Steps it walks through
  1. Purpose
  2. Usage
  3. Workflow
  4. 1. Embed Question
  5. 2. Retrieve from pgvector
  6. 3. Rank by Relevance
  7. 4. Check Confidence Threshold
  8. 5. Generate Answer with Citations
  9. 6. Format Response with Sources
  10. 7. Audit Logging
  11. Full Workflow Example
  12. Evaluation
  13. Policy Corpus Ingestion
  14. Schema
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
What does the policy-qa skill do?

Answer policy questions with strict citations. Refuses to answer without sources.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill policy-qa --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going