Agent skill · Code Review & Quality

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.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
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.

Facts
Files in the skill folder: 2
SKILL.md size: 24 KB
Bundled scripts: none
Version: 2.1.3
Declared author: Francesco Marinoni Moretto
Path: skills/ai-llm/clarity-gate-francostino-opencode-skills-anti/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.

Review
written from the skill's own SKILL.md · Aug 5, 2026

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.
From the SKILL.md

# 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 inside
Steps it walks through
  1. What's New in v2.1
  2. Specifications
  3. Validation Codes
  4. HITL Claim Validation (§1.3.2-1.3.3)
  5. Body Structure (§1.2.1)
  6. SOT Table Validation (§3.1)
  7. Bundled Scripts
  8. scripts/claimid.py
  9. scripts/documenthash.py
  10. The Key Distinction
  11. Critical Limitation
  12. When to Use
  13. The 9 Verification Points
  14. Relationship to Spec Suite
Ships with 1 file
  • metadata.json
Commands it runs
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
More from claude-skill-registry
All skills →
About this skill
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.

Keep going