🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

afdocs

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

afdocs

Test your documentation site against the Agent-Friendly Documentation Spec

Source
npmnpm
Version
0.17.4
Version published
Weekly downloads
6.9K
-10.64%
Maintainers
1
Weekly downloads
 
Created
Source

AFDocs logo

AFDocs

CI npm

Test your documentation site against the Agent-Friendly Documentation Spec. AFDocs runs 23 checks across 7 categories to measure how well AI coding agents can discover, navigate, and consume your docs.

Powering Agent Score by Fern.

Status: Early development (0.x) Check IDs, CLI flags, and output formats may change between minor versions. Implements spec v0.5.0 (2026-04-25).

Quick start

npx afdocs check https://docs.example.com --format scorecard
Agent-Friendly Docs Scorecard
==============================

  Overall Score: 72 / 100 (C)

  Category Scores:
    Content Discoverability           72 / 100 (C)
    Markdown Availability             60 / 100 (C)
    Page Size and Truncation Risk     45 / 100 (D)
    ...

  Interaction Diagnostics:
    [!] Markdown support is undiscoverable
        Your site serves markdown at .md URLs, but agents have no way to
        discover this. ...

  Check Results:
    Content Discoverability
      PASS  llms-txt-exists        llms.txt found at /llms.txt
      WARN  llms-txt-size          llms.txt is 65,000 characters
            Fix: If it grows further, split into nested llms.txt files ...
      FAIL  llms-txt-directive-html No directive detected in HTML of any tested page
            Fix: Add a visually-hidden element near the top of each page ...

Install

npm install -g afdocs

Or as a dev dependency for CI:

npm install -D afdocs

Requires Node.js 22 or later.

Documentation

Full documentation is available at afdocs.dev:

Responsible use

AFDocs makes HTTP requests to the sites it checks. It enforces delays between requests (200ms default), caps concurrent connections, and honors Retry-After headers.

License

MIT

Keywords

agent

FAQs

Package last updated on 30 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts