Skip to content

AsteroidHunter/did-ai-write-this

Repository files navigation

░█▀▄░▀█▀░█▀▄░░░█▀█░▀█▀
░█░█░░█░░█░█░░░█▀█░░█░
░▀▀░░▀▀▀░▀▀░░░░▀░▀░▀▀▀

░█░█░█▀▄░▀█▀░▀█▀░█▀▀░░░▀█▀░█░█░▀█▀░█▀▀░▀▀█
░█▄█░█▀▄░░█░░░█░░█▀▀░░░░█░░█▀█░░█░░▀▀█░░▀░
░▀░▀░▀░▀░▀▀▀░░▀░░▀▀▀░░░░▀░░▀░▀░▀▀▀░▀▀▀░░▀░

did-ai-write-this is a simple command-line tool with a skill wrapped around it that enables your agents, or you, to check whether a given piece of text is ai generated or not 🤖

(I created this simple tool for internal use when I discovered one my agent's referencing outdated information from an AI-generated blog. It is possible this problem will only grow as time passes, and epistemic defenses for agent's will be necessary as we offload more and more tasks to them for knowledge work.)

How it works

This tool uses Pangram's models to determine whether a text is generated or not. It is true that most AI detection software doesn't work, except Pangram.

A screen grab from Emi & Spero (2024) that shows Pangram's accuracy at detecting generated text.

For most domains, the chance that Pangram will flag a human-written piece of text as AI-generated is 1 out of 2500-10000 -- these are really good odds! I may add support for other AI detection software later, but for now, Pangram is it.


Once installed, you can use it as follows:

  1. Within Claude Code:
    /did-ai-write-this <text, file path, or URL>
    
    Or just ask in plain language whether something is AI-written.
  2. On the command line:
    did-ai-write-this <text or file path>
    

Installation

  1. Clone the repository and enter it:

    git clone https://github.com/AsteroidHunter/did-ai-write-this.git
    cd did-ai-write-this
  2. Run the installer:

    ./install.sh
  3. Follow the interactive prompts. The installer checks for Python 3.9+ (and offers to install it via uv if it's missing), asks for your Pangram API key, and installs the skill into ~/.claude/skills/did-ai-write-this/ along with a did-ai-write-this command in ~/.local/bin.

    Don't have a key yet? Sign up at https://www.pangram.com/ -- free research credits are available if you have a .edu email.

Uninstallation

  1. From the cloned repository, run:
    ./uninstall.sh
  2. Confirm at the prompt. This removes the skill directory (~/.claude/skills/did-ai-write-this/), the did-ai-write-this shim in ~/.local/bin, and the install log. uv and any uv-managed Python are left in place, since other tools may rely on them.

About

A Pangram CLI tool / claude code skill for your agents to detect AI generated text

Topics

Resources

License

Stars

Watchers

Forks

Contributors