Content quality report

Readability scores, keyword density, and a URL-ready slug from a block of text — a one-pass content-quality check for writers and SEO tools.

When to use this pack

A content writer or SEO agent has drafted copy and wants a quality gate before publishing: Is the reading level appropriate for the audience? Which words dominate (keyword stuffing check)? What's the ideal URL slug? Running readability-score, word-frequency, and slug-generate individually produces three disconnected results; this pack sequences them and assembles a single quality card with pass/warn/fail signals the caller can act on. Useful for CMS pre-publish checks, blog-post pipelines, newsletter QA, and any agent that writes prose and needs a confidence score before shipping.

Tools in this pack

Workflow

  1. Call readability-score with the full text. Returns fleschReadingEase, fleschKincaidGrade, gunningFog, automatedReadability, plus word/sentence/syllable counts. The decisive metric depends on the audience: grade level < 8 is good for general web content, < 12 for professional/technical, > 12 for academic. Flesch Reading Ease > 60 is 'easy', 30-60 is 'moderate', < 30 is 'difficult'. Flag a warning if grade > 12 and the caller didn't explicitly request academic tone.
  2. Call word-frequency with the same text and top=10. Returns the top 10 words (stop-words filtered) and top 10 bigrams. Check for keyword concentration: if any single word accounts for > 5% of total non-stop-word occurrences, flag it as potential keyword stuffing. The bigram list surfaces repeated phrases — useful for catching unintentional repetition ('in order to', 'as well as').
  3. Call slug-generate with the text's title or first sentence (caller provides or you extract the first sentence). Returns a clean URL slug plus its length. If length > 60, suggest truncation (Google typically displays ~60 chars in search results). Final payload: { readability: { fleschEase, gradeLevel, fogIndex, level: 'easy'|'moderate'|'difficult' }, keywords: { top: [{word, count, pct}], bigrams: [{bigram, count}], stuffingWarning: boolean }, slug: { value, length, truncateWarning: boolean }, wordCount, sentenceCount, qualityScore: 'pass'|'warn'|'review' }.

Run it in Claude

claude mcp add agent402 -s user -- npx -y agent402-mcp@latest

Then paste this prompt into Claude:

Run a content quality check using Agent402. Example text: "Artificial intelligence is transforming the way businesses operate. Companies across every industry are adopting AI tools to automate repetitive tasks, analyze large datasets, and make better decisions. The impact of AI on productivity has been significant, with studies showing up to 40% improvement in certain workflows." Title for slug: "How AI Is Transforming Business Operations".

(1) readability-score with text=<the input text> — returns {words, sentences, syllables, fleschReadingEase, fleschKincaidGrade, gunningFog, automatedReadability}. Compute level: fleschReadingEase >= 60 ? 'easy' : fleschReadingEase >= 30 ? 'moderate' : 'difficult'. Initialize warnings = []. If fleschKincaidGrade > 12, push 'Grade level above 12 — may be too complex for general audiences'.

(2) word-frequency with text=<the input text>, top=10 — returns {words: [{word, count}], bigrams: [{bigram, count}], totalWords, uniqueWords}. For each word in top 10: compute pct = (count / totalWords * 100).toFixed(1). If any pct > 5, push 'Potential keyword stuffing: "{word}" at {pct}%'. Set stuffingWarning = any pct > 5.

(3) slug-generate with text=<title or first sentence>, maxLength=60 — returns {slug, length}. Set truncateWarning = original slug would have been > 60 chars.

Compute qualityScore: 'review' if fleschKincaidGrade > 14 or stuffingWarning; 'warn' if fleschKincaidGrade > 10 or any word pct > 3; else 'pass'.

Final return: {readability: {fleschEase: fleschReadingEase, gradeLevel: fleschKincaidGrade, fogIndex: gunningFog, level}, keywords: {top: words.map(w => ({...w, pct})), bigrams, stuffingWarning}, slug: {value: slug, length, truncateWarning}, wordCount: words count from step 1, sentenceCount: sentences from step 1, qualityScore, warnings}. Budget ~$0.003 paid; all 3 tools are pure-CPU (PoW-eligible, free with compute payment).

← All skill packs