# Agent Friendly Code

> Public dashboard ranking open-source repos by how friendly they are to AI coding agents (Claude Code, Cursor, Devin, GPT-5 Codex, Gemini CLI, Aider, OpenHands, Pi) — per model, across GitHub, GitLab, and Bitbucket.

The scoring engine evaluates sixteen static signals per repository — twelve cross-agent (AGENTS.md / CLAUDE.md, CI configuration, test suite, README, linter / formatter, type config, license, contributing guide, reproducible dev environment, pre-commit hooks, dependency manifest, codebase size) plus four agent-specific instruction files (`.cursor/rules/*.mdc` for Cursor, `GEMINI.md` for Gemini CLI, `.openhands/setup.sh` for OpenHands, `.aider.conf.yml` for Aider). Each AI coding agent has its own weight profile across those signals, so the same repository can score differently for different agents.

## Models evaluated

- Claude Code — Loads CLAUDE.md at the start of every conversation per Anthropic's memory docs, so AGENTS.md / CLAUDE.md and a fast test loop carry the most weight.
- Cursor — Per Cursor's Rules docs, reads `.cursor/rules/*.mdc` and AGENTS.md as the canonical repo-side input. Type config and a clean README still aid the codebase index but aren't the docs-cited signal.
- Devin — Operates from a sandboxed Ubuntu VM and runs an 8-step machine setup (deps, secrets, language versions, lint/test commands) per Cognition's repo-setup docs. CI config files alone aren't what the docs ask for — a runnable dev environment is.
- GPT-5 Codex — Reads AGENTS.md before doing any work per OpenAI's Codex docs — the strictest AGENTS.md adherent of any agent here. Hierarchical (per-directory) AGENTS.md and AGENTS.override.md are first-class.
- Gemini CLI — Reads hierarchical `GEMINI.md` (global → workspace → component-level) at every prompt per Gemini CLI's docs. The long-context advantage favors repos that split context per directory rather than docs-heavy in general.
- Aider — Auto-lints on every edit by default; runs the configured test command after edits when `--test-cmd` is set (per Aider's lint/test docs). A green linter and a declared test command translate directly into successful commits.
- OpenHands — Runs in a sandboxed container and executes `.openhands/setup.sh` at session start per OpenHands' repo-customization docs. Root AGENTS.md is now the preferred always-on instruction surface (microagents are deprecated in favor of it).
- Pi — Minimal terminal coding harness. Loads `AGENTS.md` (or `CLAUDE.md`) at startup — global, parent dirs, then cwd — per the Pi coding-agent README. Sandboxing is deferred to user-installed extensions.

## Key pages

- [Leaderboard](https://agentfriendlycode.com/): Per-model leaderboard across GitHub, GitLab, and Bitbucket
- [About](https://agentfriendlycode.com/about): Who built this, why, and the project's independence statement
- [Action](https://agentfriendlycode.com/action): PR-diff GitHub Action — install snippet, FAQ, JSON-LD SoftwareApplication
- [Changelog](https://agentfriendlycode.com/changelog): What shipped per release
- [Methodology](https://agentfriendlycode.com/methodology): How scores are computed; signals, weights, and limitations
- [Package lookup](https://agentfriendlycode.com/package): Resolve npm / PyPI / Cargo packages to their source-repo agent-friendliness score
- [Roadmap](https://agentfriendlycode.com/roadmap): Upcoming versions
- [Skill](https://agentfriendlycode.com/skill): Portable agent skill — install snippet, score → model mapping, optional SessionStart hooks for Claude Code / Codex
- [Sitemap](https://agentfriendlycode.com/sitemap.xml): Every indexed URL

## Public API

- [`GET /api/badge/{host}/{owner}/{name}.svg`](https://agentfriendlycode.com/api/badge/github/vercel/next.js.svg): Embeddable SVG badge (`?model=<id>` for per-model)
- [`GET /api/package/{registry}/{name}`](https://agentfriendlycode.com/api/package/npm/next): Resolve npm / PyPI / Cargo package → source-repo score
- [`GET /api/repos`](https://agentfriendlycode.com/api/repos): JSON dump of the leaderboard (id, owner, name, host, stars, overall_score, per-model scores)
- [`GET /api/repo/{id}`](https://agentfriendlycode.com/api/repo/1): Per-repo detail — signals, model scores, top improvements
- [`GET /api/score?host=&repo=owner/name`](https://agentfriendlycode.com/api/score?host=github&repo=vercel/next.js): Look up an indexed repo by host + owner/name — public read for external integrators (the PR-diff Action and the agent skill both vendor the scorer locally and don't call this at runtime)

## Tools

- [Agent Friendly Action](https://github.com/hsnice16/agent-friendly-action): GitHub Action that posts a per-PR score-delta comment — runs entirely inside the maintainer's CI, opt-in via `AGENTS_BADGE_TOKEN`, listed on the GitHub Marketplace
- [Agent Friendly Skill](https://github.com/hsnice16/agent-friendly-skill): Portable agent skill (Claude Code, Codex, Cursor, Cline, Copilot, …) installable via `npx skills add hsnice16/agent-friendly-skill#v0` — scores the user's current repo locally, no service dependency

## Top scored packages

### npm

- [npm/axios](https://agentfriendlycode.com/package/npm/axios): 90.7 / 100
- [npm/prettier](https://agentfriendlycode.com/package/npm/prettier): 70.4 / 100
- [npm/next](https://agentfriendlycode.com/package/npm/next): 68.3 / 100
- [npm/react](https://agentfriendlycode.com/package/npm/react): 66.8 / 100
- [npm/eslint](https://agentfriendlycode.com/package/npm/eslint): 64.0 / 100

### pypi

- [pypi/requests](https://agentfriendlycode.com/package/pypi/requests): 84.3 / 100
- [pypi/fastapi](https://agentfriendlycode.com/package/pypi/fastapi): 71.9 / 100

### cargo

- [cargo/ripgrep](https://agentfriendlycode.com/package/cargo/ripgrep): 64.9 / 100
- [cargo/axum](https://agentfriendlycode.com/package/cargo/axum): 57.7 / 100
- [cargo/tokio](https://agentfriendlycode.com/package/cargo/tokio): 56.5 / 100
- [cargo/serde](https://agentfriendlycode.com/package/cargo/serde): 46.3 / 100

## Source

- [Repository](https://github.com/hsnice16/agent-friendly-code): MIT-licensed Next.js app
- [License](https://opensource.org/licenses/MIT): MIT
