npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

agentic-seo

v1.0.0

Published

Audit your documentation and website for AI agent readiness (Agentic Engine Optimization)

Readme

agentic-seo

Audit your documentation and website for Agentic Engine Optimization (AEO): ensure your content is discoverable, parseable, and useful to AI coding agents.

AI coding agents like Claude Code, Cursor, Cline, and Aider consume documentation fundamentally differently from humans. They issue single HTTP requests, strip HTML, count tokens, and either use your content as context or silently discard it. agentic-seo checks whether your documentation is ready for this new reality.

Quick Start

# Audit current directory (auto-detects framework)
npx agentic-seo

# Audit a specific directory
npx agentic-seo ./my-docs-site

# Audit a live URL
npx agentic-seo --url https://docs.example.com

# Scaffold missing AEO files
npx agentic-seo init

What It Checks

agentic-seo runs 10 checks across 5 categories, scoring your site out of 100:

Discovery (25 points)

| Check | Points | What it looks for | |---|---|---| | robots-txt | 10 | AI crawlers not blocked, explicit allow rules | | llms-txt | 10 | Structured index with descriptions and token counts | | agents-md | 5 | AGENTS.md/CLAUDE.md with project context |

Content Structure (25 points)

| Check | Points | What it looks for | |---|---|---| | content-structure | 15 | Heading hierarchy, semantic HTML, code examples, tables | | markdown-availability | 10 | Markdown source available, low HTML noise, no JS dependency |

Token Economics (25 points)

| Check | Points | What it looks for | |---|---|---| | token-budget | 15 | Per-page token counts, no oversized pages | | meta-tags | 10 | AI-friendly meta tags, descriptions, token count metadata |

Capability Signaling (15 points)

| Check | Points | What it looks for | |---|---|---| | skill-md | 10 | Capability descriptions, inputs, constraints | | agent-permissions | 5 | Agent access rules and rate limits |

UX Bridge (10 points)

| Check | Points | What it looks for | |---|---|---| | copy-for-ai | 10 | Copy-for-AI buttons, copy-to-clipboard, raw view links |

Grading

| Grade | Score | Meaning | |---|---|---| | A | 90-100% | Excellent agent readiness | | B | 75-89% | Good with minor improvements needed | | C | 60-74% | Functional but missing key signals | | D | 40-59% | Significant gaps in agent readiness | | F | 0-39% | Not optimized for AI agents |

Installation

# Global install
npm install -g agentic-seo

# Or use npx (no install needed)
npx agentic-seo

Usage

Audit a Local Directory

# Auto-detects framework (Next.js, Docusaurus, 11ty, Astro, Hugo, etc.)
agentic-seo ./my-project

# Explicitly specify build output directory
agentic-seo --output-dir ./my-project/build

Supported frameworks: Next.js, Docusaurus, Eleventy, Astro, Hugo, Jekyll, Gatsby, VitePress, MkDocs, Sphinx, Vite.

Audit with Local Server

# Spin up a server and run HTTP-based checks
agentic-seo --serve ./build

Audit a Live URL

agentic-seo --url https://docs.example.com

CI Mode

# Exit with code 1 if score below threshold
agentic-seo --json --threshold 60

# Just the score
agentic-seo score --json

Scaffold AEO Files

# Create missing llms.txt, AGENTS.md, skill.md, agent-permissions.json
agentic-seo init

Run Specific Checks

agentic-seo --checks robots-txt,llms-txt,token-budget

Configuration

Create .aeorc.json in your project root, or add an "aeo" key to package.json:

{
  "outputDir": "_site",
  "checks": {
    "token-budget": { "maxTokensPerPage": 25000 },
    "robots-txt": { "requiredAgents": ["ClaudeBot", "GPTBot"] }
  },
  "ignore": ["**/node_modules/**", "**/vendor/**"],
  "threshold": 60
}

Programmatic API

import { audit, auditWithServer } from 'agentic-seo';

// Audit a directory
const report = await audit('./my-site');
console.log(report.grade);      // 'B'
console.log(report.percentage);  // 78
console.log(report.findings.errors); // [{ severity: 'error', message: '...' }]

// Audit with a local server
const report2 = await auditWithServer('./build');

// Access individual checkers
import { checkers } from 'agentic-seo';

How It Works

agentic-seo does not require an API key. All checks are structural and heuristic:

  1. Framework Detection: Auto-detects your build tool and locates the output directory
  2. File Analysis: Checks for robots.txt, llms.txt, AGENTS.md, skill.md, and agent-permissions.json
  3. Content Analysis: Parses HTML with Cheerio and Markdown with Remark to evaluate structure
  4. Token Counting: Uses gpt-tokenizer to measure real token counts per page
  5. Agent Simulation: Evaluates what AI agents would actually see when fetching your pages

CLI Options

Options:
  --url, -u         Audit a live URL
  --serve, -s       Start local server and audit via HTTP
  --json            Output results as JSON
  --verbose, -v     Show all findings including info messages
  --threshold, -t   Minimum score percentage (exit 1 if below)
  --checks          Comma-separated checker IDs to run
  --output-dir      Explicitly specify build output directory
  --help            Show help
  --version         Show version

Where to Start

If you're new to AEO, here's the recommended priority order:

  1. Audit robots.txt: Prevents silent agent lockout (10 min)
  2. Add llms.txt: Immediate discoverability gains (a few hours)
  3. Measure token counts: High-leverage insight into page sizes (weekend project)
  4. Write skill.md: Start with your most-used APIs
  5. Add "Copy for AI" buttons: Low effort, high signal for human+agent workflows
  6. Set up AI traffic monitoring: Gives you data to justify further investment

Disclaimer

This is not an official Google project and is not endorsed by Google or Google Search. The concepts, checks, and recommendations in this tool are a best-effort community offering based on publicly available research and emerging practices around AI agent documentation consumption. Scores and recommendations should be taken as directional guidance, not as guarantees of any particular outcome.

License

MIT