$npx -y skills add humanizerai/agent-skills --skill detect-aiAnalyze text to detect if it was written by AI. Returns a score from 0-100 with detailed metrics. Use when checking content before publishing or submitting.
| 1 | # Detect AI Content |
| 2 | |
| 3 | Analyze text to determine if it was written by AI using the HumanizerAI API. |
| 4 | |
| 5 | ## How It Works |
| 6 | |
| 7 | When the user invokes `/detect-ai`, you should: |
| 8 | |
| 9 | 1. Extract the text from $ARGUMENTS |
| 10 | 2. Call the HumanizerAI API to analyze the text |
| 11 | 3. Present the results in a clear, actionable format |
| 12 | |
| 13 | ## API Call |
| 14 | |
| 15 | Make a POST request to `https://humanizerai.com/api/v1/detect`: |
| 16 | |
| 17 | ``` |
| 18 | Authorization: Bearer $HUMANIZERAI_API_KEY |
| 19 | Content-Type: application/json |
| 20 | |
| 21 | { |
| 22 | "text": "<user's text>" |
| 23 | } |
| 24 | ``` |
| 25 | |
| 26 | ## API Response Format |
| 27 | |
| 28 | The API returns JSON like this: |
| 29 | |
| 30 | ```json |
| 31 | { |
| 32 | "score": { |
| 33 | "overall": 82, |
| 34 | "perplexity": 96, |
| 35 | "burstiness": 15, |
| 36 | "readability": 23, |
| 37 | "satPercent": 3, |
| 38 | "simplicity": 35, |
| 39 | "ngramScore": 8, |
| 40 | "averageSentenceLength": 21 |
| 41 | }, |
| 42 | "wordCount": 82, |
| 43 | "sentenceCount": 4, |
| 44 | "verdict": "ai" |
| 45 | } |
| 46 | ``` |
| 47 | |
| 48 | **IMPORTANT:** The main AI score is `score.overall` (not `score` directly). This is the score to display to the user. |
| 49 | |
| 50 | ## Present Results Like This |
| 51 | |
| 52 | ``` |
| 53 | ## AI Detection Results |
| 54 | |
| 55 | **Score:** [score.overall]/100 ([verdict]) |
| 56 | **Words Analyzed:** [wordCount] |
| 57 | |
| 58 | ### Metrics |
| 59 | - Perplexity: [score.perplexity] |
| 60 | - Burstiness: [score.burstiness] |
| 61 | - Readability: [score.readability] |
| 62 | - N-gram Score: [score.ngramScore] |
| 63 | |
| 64 | ### Recommendation |
| 65 | [Based on score.overall, suggest whether to humanize] |
| 66 | ``` |
| 67 | |
| 68 | ## Score Interpretation (use score.overall) |
| 69 | |
| 70 | - 0-20: Human-written content |
| 71 | - 21-40: Likely human, minor AI patterns |
| 72 | - 41-60: Mixed signals, could be either |
| 73 | - 61-80: Likely AI-generated |
| 74 | - 81-100: Highly likely AI-generated |
| 75 | |
| 76 | ## Error Handling |
| 77 | |
| 78 | If the API call fails: |
| 79 | 1. Check if HUMANIZERAI_API_KEY is set |
| 80 | 2. Suggest the user get an API key at https://humanizerai.com |
| 81 | 3. Provide the error message for debugging |