New to Claude Skills? Learn how to install them →

danielmiessler on GitHub

DetectAI

Free

Determine if text is AI-generated with dual methods.

Get this skill

Free · Opens the source repo

What DetectAI does

DetectAI is a specialized tool designed to assess whether a given piece of text appears to be generated by an AI. It employs two distinct methods to provide a comprehensive evaluation: a heuristic audit and an empirical detection score. The heuristic audit identifies specific AI writing patterns, such as inflated vocabulary and uniform rhythm, using a catalog of known indicators. This method is free and does not require any setup, making it accessible for immediate use. Additionally, it explains the reasons behind each flagged pattern, offering insights into the text's characteristics.

The second method, the empirical score, utilizes the Pangram API to generate a probability score indicating the likelihood that the text is AI-generated. This score is calibrated against known human writing, providing a meaningful context for interpretation. However, this method requires an API key and incurs costs based on usage. Users can run both methods simultaneously, allowing for a comparison of the heuristic flags and the empirical score, which can reveal discrepancies that are useful for deeper analysis.

DetectAI is particularly beneficial for writers, editors, and researchers who need to evaluate the authenticity of text. It is especially useful in environments where distinguishing between human and AI-generated content is critical, such as academic writing, content creation, and editorial processes. By providing both qualitative and quantitative assessments, DetectAI helps users make informed decisions about the nature of the text they are working with.

When to use it

Use DetectAI when you need to verify if a piece of writing is machine-generated, especially in contexts where authenticity is crucial.

When not to use it

This tool is not suitable for rewriting text or for plagiarism detection, nor can it assess the quality of writing.

What you can build with it

Audit a Blog Post

You have a draft blog post and want to ensure it hasn't been unintentionally influenced by AI writing. Use DetectAI's heuristic audit to flag any AI patterns.

Evaluate Academic Papers

When reviewing submissions for an academic journal, use DetectAI to assess whether the papers are AI-generated, ensuring the integrity of the submissions.

Compare Drafts

You have multiple drafts of a piece and want to determine which one reads more human. Use the empirical scoring method to compare AI percentages across drafts.

How to install DetectAI

View source

1. Install with the skills CLI

npx skills add danielmiessler/lifeos/DetectAI --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by danielmiessler

DetectAI

What It Does

Answers one question — how much does this text read as machine-generated? — with two independent measures:

  • Heuristic audit. Flags known AI tells (inflated vocabulary, the "not X, it's Y" tic, recycled transitions, uniform rhythm) against a severity-tiered pattern catalog. Free, instant, and it explains why each flag fired.
  • Empirical score. Runs the text through the Pangram detection model and returns a real probability — AI% / AI-assisted% / human% — plus per-segment counts. Costs money, needs an API key, and doesn't care what your word list says.

The two disagree often, and that disagreement is the useful part. Text can clear every pattern on the list and still score 100% AI, which tells you the tells are structural, not lexical.

The Problem

"Does this sound like AI?" gets answered by vibes, and vibes are wrong in both directions. Heuristic word-lists flag legitimate writing and miss AI text that avoided the obvious words. Detector scores look authoritative but saturate — Pangram will confidently call a short human paragraph 100% AI. Neither measure alone is trustworthy, and a raw number with no baseline is close to meaningless.

This skill runs both, and anchors the empirical score against known-human writing so the number has something to be read against.

Setup — Pangram API key (required for scoring)

The heuristic audit works with no setup. The empirical score needs a key.

  1. Create an account or log in at pangram.com, open the API tab, and generate a key.
  2. Add prepaid credits (from $5, or enable auto-refill). Realtime checks bill about $0.05 per 1,000 words.
  3. Put the key in ~/.claude/.env:
    PANGRAM_API_KEY=your-key-here
    
  4. Verify:
    bun ~/.claude/LIFEOS/TOOLS/PangramScore.ts --file <a-file-you-wrote.md>
    

Full setup, alternatives, and troubleshooting (402/429 handling, endpoint override, key precedence): Setup.md.

Workflow Routing

WorkflowTriggerFile
Detect"scan for AI tells", "flag AI patterns", "does this sound like AI", "audit this for AI-isms" — heuristic, no key neededWorkflows/Detect.md
Score"score this for AI", "is this AI generated", "AI detection score", "pangram", "compare these drafts" — empirical, needs keyWorkflows/Score.md

Asked simply "is this AI?" with a key configured, run both and report them side by side — the heuristic explains, the score measures.

Gotchas

  • Short samples are unreliable. Detectors are weakest under ~5 sentences. Pangram leans toward decisive 100/0 calls and will flag a short human paragraph as 100% AI. Verified in testing: a plain-voice human paragraph and deliberate AI slop both scored 100% at roughly four sentences each. Score passages of a few hundred words or don't bother.
  • An absolute score without a baseline says little. Score known-human writing in the same batch. If the human baseline also maxes out, the detector is saturating on the genre and length, not on the text. The A-vs-B comparison is the trustworthy part.
  • It measures detectability, not quality. A low AI% means "reads human," not "reads well."
  • One detector is not ground truth. Pangram is among the strongest available and still has real false-positive rates. Report it as a strong signal, never a verdict — and never accuse a person of AI authorship on one score.
  • Every call bills and polls. The API is async (submit, then poll to STAGE_SUCCESS). Don't loop it on trivial snippets; batch comparisons run sequentially, one call each.
  • HTTP 402 means out of credits, not a bad key. 429 means rate limited — realtime checks cap at 5 QPS. Neither is an auth failure; don't rotate the key over them.
  • Never degrade writing to beat a detector. Injected typos, broken sentences, and "humanizer" laundering damage the prose and don't fix the underlying problem. If text must read human, the fix is a human in the loop.

Examples

  • "Scan this post for AI tells, don't change it" → Detect: tiered P0/P1/P2 flag report, each marked clear-problem vs judgment-call, no edits.
  • "Is this AI generated?" → Score: single Pangram run, headline verdict plus AI/AI-assisted/human percentages, with the length caveat stated if the sample is short.
  • "Which of these three drafts reads most human?" → Score in batch-compare mode: one call per draft, ranked table, relative comparison foregrounded over absolute numbers.
  • "Did my rewrite actually help?" → Score before and after, with two known-human passages scored in the same batch as calibration.

Execution Log

echo '{"ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'","skill":"DetectAI","workflow":"WORKFLOW_USED","input":"8_WORD_SUMMARY","status":"ok|error","duration_s":SECONDS}' >> ~/.claude/LIFEOS/MEMORY/SKILLS/execution.jsonl

Frequently asked questions about DetectAI

Similar skills