doublecheck
Three-layer verification pipeline for AI output. Extracts verifiable claims, finds supporting or contradicting sources via web search, runs adversarial review for hallucination patterns, and produces a structured verification report with source links for human review.
What this skill does
# Doublecheck Run a three-layer verification pipeline on AI-generated output. The goal is not to tell the user what is true -- it is to extract every verifiable claim, find sources the user can check independently, and flag anything that looks like a hallucination pattern. ## Activation Doublecheck operates in two modes: **active mode** (persistent) and **one-shot mode** (on demand). ### Active Mode When the user invokes this skill without providing specific text to verify, activate persistent doublecheck mode. Respond with: > **Doublecheck is now active.** I'll verify factual claims in my responses before presenting them. You'll see an inline verification summary after each substantive response. Say "full report" on any response to get the complete three-layer verification with detailed sourcing. Turn it off anytime by saying "turn off doublecheck." Then follow ALL of the rules below for the remainder of the conversation: **Rule: Classify every response before sending it.** Before producing any substantive response, determine whether it contains verifiable claims. Classify the response: | Response type | Contains verifiable claims? | Action | |--------------|---------------------------|--------| | Factual analysis, legal guidance, regulatory interpretation, compliance guidance, or content with case citations or statutory references | Yes -- high density | Run full verification report (see high-stakes content rule below) | | Summary of a document, research, or data | Yes -- moderate density | Run inline verification on key claims | | Code generation, creative writing, brainstorming | Rarely | Skip verification; note that doublecheck mode doesn't apply to this type of content | | Casual conversation, clarifying questions, status updates | No | Skip verification silently | **Rule: Inline verification for active mode.** When active mode applies, do NOT generate a separate full verification report for every response. Instead, embed verification directly into your response using this pattern: 1. Generate your response normally. 2. After the response, add a `Verification` section. 3. In that section, list each verifiable claim with its confidence rating and a source link where available. Format: ``` --- **Verification (N claims checked)** - [VERIFIED] "Claim text" -- Source: [URL] - [VERIFIED] "Claim text" -- Source: [URL] - [PLAUSIBLE] "Claim text" -- no specific source found - [FABRICATION RISK] "Claim text" -- could not find this citation; verify before relying on it ``` For active mode, prioritize speed. Run web searches for citations, specific statistics, and any claim you have low confidence about. You do not need to search for claims that are common knowledge or that you have high confidence about -- just rate them PLAUSIBLE and move on. If any claim rates DISPUTED or FABRICATION RISK, call it out prominently before the verification section so the user sees it immediately. When auto-escalation applies (see below), place this callout at the top of the full report, before the summary table: ``` **Heads up:** I'm not confident about [specific claim]. I couldn't find a supporting source. You should verify this independently before relying on it. ``` **Rule: Auto-escalate to full report for high-risk findings.** If your inline verification identifies ANY claim rated DISPUTED or FABRICATION RISK, do not produce inline verification. Instead, place the "Heads up" callout at the top of your response and then produce the full three-layer verification report using the template in `assets/verification-report-template.md`. The user should not have to ask for the detailed report when something is clearly wrong. **Rule: Full report for high-stakes content.** If the response contains legal analysis, regulatory interpretation, compliance guidance, case citations, or statutory references, always produce the full verification report using the template in `assets/verification-report-template.md`. Do not use inline verification for these content types -- the stakes are too high for the abbreviated format. **Rule: Discoverability footer for inline verification.** When producing inline verification (not a full report), always append this line at the end of the verification section: ``` _Say "full report" for detailed three-layer verification with sources._ ``` **Rule: Offer full verification on request.** If the user says "full report," "run full verification," "verify that," "doublecheck that," or similar, run the complete three-layer pipeline (described below) and produce the full report using the template in `assets/verification-report-template.md`. ### One-Shot Mode When the user invokes this skill and provides specific text to verify (or references previous output), run the complete three-layer pipeline and produce a full verification report using the template in `assets/verification-report-template.md`. ### Deactivation When the user says "turn off doublecheck," "stop doublecheck," or similar, respond with: > **Doublecheck is now off.** I'll respond normally without inline verification. You can reactivate it anytime. --- ## Layer 1: Self-Audit Re-read the target text with a critical lens. Your job in this layer is extraction and internal analysis -- no web searches yet. ### Step 1: Extract Claims Go through the target text sentence by sentence and pull out every statement that asserts something verifiable. Categorize each claim: | Category | What to look for | Examples | |----------|-----------------|---------| | **Factual** | Assertions about how things are or were | "Python was created in 1991", "The GPL requires derivative works to be open-sourced" | | **Statistical** | Numbers, percentages, quantities | "95% of enterprises use cloud services", "The contract has a 30-day termination clause" | | **Citation** | References to specific documents, cases, laws, papers, or standards | "Under Section 230 of the CDA...", "In *Mayo v. Prometheus* (2012)..." | | **Entity** | Claims about specific people, organizations, products, or places | "OpenAI was founded by Sam Altman and Elon Musk", "GDPR applies to EU residents" | | **Causal** | Claims that X caused Y or X leads to Y | "This vulnerability allows remote code execution", "The regulation was passed in response to the 2008 financial crisis" | | **Temporal** | Dates, timelines, sequences of events | "The deadline is March 15", "Version 2.0 was released before the security patch" | Assign each claim a temporary ID (C1, C2, C3...) for tracking through subsequent layers. ### Step 2: Check Internal Consistency Review the extracted claims against each other: - Does the text contradict itself anywhere? (e.g., states two different dates for the same event) - Are there claims that are logically incompatible? - Does the text make assumptions in one section that it contradicts in another? Flag any internal contradictions immediately -- these don't need external verification to identify as problems. ### Step 3: Initial Confidence Assessment For each claim, make an initial assessment based only on your own knowledge: - Do you recall this being accurate? - Is this the kind of claim where models frequently hallucinate? (Specific citations, precise statistics, and exact dates are high-risk categories.) - Is the claim specific enough to verify, or is it vague enough to be unfalsifiable? Record your initial confidence but do NOT report it as a finding yet. This is input for Layer 2, not output. --- ## Layer 2: Source Verification For each extracted claim, search for external evidence. The purpose of this layer is to find URLs the user can visit to verify claims independently. ### Search Strategy For each claim: 1. **Formulate a search query** that would surface the primary source. For citations, search for the exact title or case name. For statistics, search for the specific number and topic. For factual claims, search for the key entities and relationships. 2. **Run the search** us
Related in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.