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

repo2agent

v0.1.0

Published

ESLint for AI coding agents: generate instructions, check drift, and gate repo agent-readiness.

Readme

repo2agent

ESLint for AI coding agents.

Make every repository agent-ready before AI touches your code.

CI npm version license: MIT

repo2agent terminal demo

npx repo2agent init
npx repo2agent doctor

repo2agent scans your project, generates instruction files for the major coding-agent tools, checks drift, and gives CI a score it can enforce.

It generates:

AGENTS.md
CLAUDE.md
.cursor/rules/repo.mdc
.github/copilot-instructions.md

It also gives you:

npx repo2agent check
npx repo2agent doctor --min-score 70
npx repo2agent doctor --json

Why Developers Star This

AI coding agents are everywhere, but most repositories still do not tell them how to work safely.

repo2agent gives every repo a portable agent context:

  • one command to generate agent instruction files
  • doctor score for agent-readiness quality gates
  • zero API keys and zero model calls
  • works in private repos
  • detects test, lint, build, and typecheck commands
  • adds a fingerprint so CI can detect stale instructions
  • supports the tools developers already use

Quick Start

Generate all supported files:

npx repo2agent init

Typical output:

created AGENTS.md
created CLAUDE.md
created .cursor/rules/repo.mdc
created .github/copilot-instructions.md
agent readiness: 78/100

Generate only Codex and Claude Code files:

npx repo2agent init --targets codex,claude

Preview without writing:

npx repo2agent init --dry-run

Check whether generated files are stale:

npx repo2agent check

Diagnose what keeps the repo from being agent-ready:

npx repo2agent doctor

Use it as a quality gate:

npx repo2agent doctor --min-score 70

Emit JSON for bots and dashboards:

npx repo2agent doctor --json

Emit Shields.io-compatible badge JSON:

npx repo2agent doctor --badge

Print one target to stdout:

npx repo2agent print codex

Scan the current repo:

npx repo2agent scan

Supported Targets

| Target | Output | | --- | --- | | Codex | AGENTS.md | | Claude Code | CLAUDE.md | | Cursor | .cursor/rules/repo.mdc | | GitHub Copilot | .github/copilot-instructions.md |

Examples

Try the scanner against included sample repos:

node ./bin/repo2agent.js doctor --dir examples/nextjs
node ./bin/repo2agent.js doctor --dir examples/python-fastapi

The Next.js example detects React, Next.js, TypeScript, test, lint, build, and typecheck commands. The Python example detects Python and pytest-style verification.

Use --dry-run to preview generated files:

node ./bin/repo2agent.js init --dir examples/nextjs --dry-run

Example Output

Generated files include:

  • repository stack and package manager
  • source/test/docs directory map
  • common commands such as npm run test, pnpm lint, python -m pytest, go test ./..., or cargo test
  • workflow rules for safe coding-agent behavior
  • safety rules around secrets, auth, migrations, generated files, and lockfiles
  • a repo2agent fingerprint for drift detection

Example snippet:

## Common Commands

- test: `pnpm test`
- lint: `pnpm lint`
- typecheck: `pnpm typecheck`

## Agent Workflow

- Read the relevant files before editing.
- Prefer existing patterns, naming, and architecture over new abstractions.
- Keep changes scoped to the user request.

Doctor

repo2agent doctor turns the scan into an actionable readiness report:

repo2agent doctor

Score: 65/100 (close)

Agent files
- ok: AGENTS.md
- missing: CLAUDE.md
- missing: .cursor/rules/repo.mdc
- missing: .github/copilot-instructions.md

Suggestions
- [high] Generate missing agent instruction files
  Fix: repo2agent init
- [medium] Add a TypeScript typecheck command
  Fix: Add a typecheck script such as tsc --noEmit, then rerun repo2agent init --force.

Use Markdown output in issues, PRs, or docs:

npx repo2agent doctor --markdown

Use JSON output in automations:

{
  "score": 75,
  "grade": "close",
  "repository": {
    "name": "my-app",
    "packageManager": "pnpm",
    "stack": ["Next.js", "React", "TypeScript"]
  },
  "suggestions": []
}

CI

Keep agent instructions fresh:

- run: npx repo2agent check
- run: npx repo2agent doctor --min-score 70

Use the bundled GitHub Action:

- uses: repo2agent/repo2agent@v1
  with:
    min-score: 70

When the repo structure or commands change, run:

npx repo2agent init --force

Local Development

npm test
node ./bin/repo2agent.js init --dry-run
node ./bin/repo2agent.js check

Positioning

This is not another coding agent.

It is the missing quality gate for agents: small, local, deterministic, and easy to add to every repository.

That makes it a good fit for:

  • open-source maintainers who want better agent PRs
  • teams standardizing Codex / Claude Code / Cursor behavior
  • template repos, internal starters, and monorepos
  • CI checks that keep agent instructions from drifting

Roadmap

  • monorepo package/workspace command detection
  • pull request bot that comments when agent instructions are stale
  • framework-specific rule packs for Next.js, FastAPI, Rails, Go, and Rust
  • MCP server so agents can ask for live repository context