clarity-gate
Pre-ingestion verification for epistemic quality in RAG systems. Ensures documents are properly qualified before entering knowledge bases. Produces CGD (Clarity-Gated Documents) and validates SOT (Source of Truth) files.
npx skills add majiayu000/claude-skill-registry --skill clarity-gate-francostino-opencode-skills-anti --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
What it does
Pre-ingestion verification for epistemic quality in RAG systems. Produces Clarity-Gated Documents (CGD) and validates Source of Truth (SOT) files.
How it works
The skill offers capabilities including document-verification, epistemic-quality, rag-preparation, cgd-generation, and sot-validation. It operates via the Clarity Gate Format Specification v2.1 to output a CGD file with fields such as clarity-gate-version, processed-date, processed-by, clarity-status, hitl-status, hitl-pending-count, points-passed, rag-ingestable, and document-sha256. It includes bundled Python scripts:
- scripts/claim_id.py computes stable, hash-based claim IDs for HITL tracking using a hashing procedure and test vectors.
- scripts/document_hash.py computes a document SHA-256 hash with full canonicalization and verification options. The CGD output requires a YAML frontmatter and an end marker:
<!-- CLARITY_GATE_END -->
Clarity Gate: <clarity-status> | <hitl-status>
It defines validation codes (E-ST10, W-ST11, etc.) and a HITL verification process with Round A (Derived Data Confirmation) and Round B (True HITL Verification).
When to use it
- Before ingesting documents into RAG systems
- Before sharing documents with other AI systems
- When a document contains projections, estimates, or hypotheses
- Before publishing claims that haven't been validated
What it can touch
Declared tools: claude-code. It relies on bundled scripts (claim_id.py and document_hash.py) for deterministic computations and on the CLARITY_GATE_FORMAT_SPEC.md for formatting rules.
Caveats
- Risk: Clarity Gate verifies FORM, not TRUTH; cannot verify factual correctness.
- Mandatory HITL verification is required before PASS; they emphasize human-in-the-loop.
- The described feature set is v2.1 with codes like E-ST10, W-ST11, E-TB01, etc., and outputs CGD files per the specification.
# Clarity Gate v2.1 **Purpose:** Pre-ingestion verification system that enforces epistemic quality before documents enter RAG knowledge bases. Produces Clarity-Gated Documents (CGD) compliant with the Clarity Gate Format Specification v2.1. **Core Question:** "If another LLM reads this document, will it mistake assumptions for facts?" **Core Principle:** *"Detection finds what is; enforcement ensures what should be. In practice: find the missing uncertainty markers before they become confident hallucinations."* --- ## What's New in v2.1 | Feature | Description | |---------|-------------| | **Claim Completion Status** | PENDING/VERIFIED determined by field presence (no explicit status field) | | **Source Field Semantics** | Actionable source (PENDING) vs. what-was-found (VERIFIED) | | **Claim ID Format Guidance** | Hash-based IDs preferred, collision analysis for scale | | **Body Structure Requirements** | HITL Verification Record section mandatory when claims exist | | **New Validation Codes** | E-ST10, W-ST11, W-HC01, W-HC02, E-SC06 (FORMAT_SPEC); E-TB01-07 (SOT validation) | | **Bundled Scripts** | `claim_id.py` and `document_hash.py` for deterministic computations | --- ## Speci
- What's New in v2.1
- Specifications
- Validation Codes
- HITL Claim Validation (§1.3.2-1.3.3)
- Body Structure (§1.2.1)
- SOT Table Validation (§3.1)
- Bundled Scripts
- scripts/claimid.py
- scripts/documenthash.py
- The Key Distinction
- Critical Limitation
- When to Use
- The 9 Verification Points
- Relationship to Spec Suite
Generate claim ID python scripts/claim_id.py "Base price is $99/mo" "api-pricing/1" Run test vectors python scripts/claim_id.py --test Compute hash python scripts/document_hash.py my-doc.cgd.md Verify existing hash python scripts/document_hash.py --verify my-doc.cgd.md Run normalization tests python scripts/document_hash.py --test
What does the clarity-gate skill do?
Pre-ingestion verification for epistemic quality in RAG systems. Ensures documents are properly qualified before entering knowledge bases. Produces CGD (Clarity-Gated Documents) and validates SOT (Source of Truth) files.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill clarity-gate-francostino-opencode-skills-anti --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.
