Skip to content

Repository files navigation

agentoscope

See every instruction your repo gives to AI coding agents — in one visual dashboard.

Website & live demo · npm

Modern repos accumulate agent instructions everywhere: AGENTS.md, CLAUDE.md, .cursor/rules/*.mdc, .github/copilot-instructions.md, .windsurf/rules, and a dozen more. agentoscope scans your repo for all of them and opens a beautiful, self-contained viewer so you can audit exactly what your agents are being told — and how much of their context window it costs.

npx agentoscope

That's it. It scans the current directory, starts a local server, and opens the viewer in your browser.

agentoscope viewer

What it finds

Provider Files detected
AGENTS.md (universal: Codex, Cursor, Kimi Code, Amp, Jules, OpenCode…) AGENTS.md at any depth
Claude Code CLAUDE.md, CLAUDE.local.md at any depth
Cursor .cursor/rules/**, .cursorrules
Windsurf .windsurf/rules/**, .windsurfrules
GitHub Copilot .github/copilot-instructions.md, .github/instructions/**
Gemini CLI GEMINI.md at any depth
Cline .cline/rules/**, .clinerules
Roo Code .roo/rules/**, .roorules
Kilo Code .kilocode/rules/**, .kilocoderules
Continue .continue/rules/**, .continuerules
Aider CONVENTIONS.md
Goose .goosehints
Amazon Q Developer .amazonq/rules/**
Warp WARP.md
Junie (JetBrains) .junie/guidelines.md
Trae .trae/rules/**
Zed .rules

Why it's useful

  • Token budget — every rule file is injected into some agent's context. See the estimated token cost per file and per provider at a glance.
  • Duplication & drift — detects symlinks (CLAUDE.md → AGENTS.md) and identical-content duplicates so you know when rules are copy-pasted and can drift apart.
  • Rule targeting — parses .mdc / .instructions.md frontmatter (globs, applyTo, alwaysApply) and shows it as badges, so you can see which rules attach where.
  • Effective context — type any repo path (in the viewer or via --for) and see exactly which rules an agent receives when working on it, and what it costs.
  • Lint your rulesagentoscope check catches stale globs that match nothing, oversized files, conflicting root instructions, and Cursor rules that can never auto-attach. Exits non-zero on errors, so it drops straight into CI.
  • Scan any public repoagentoscope.rafael.ltd/r/owner/repo renders a live report for any public GitHub repo, no install.
  • One-click context export — "Copy all context" concatenates every rule file into a single blob for pasting into an LLM.
  • Shareable report — export a single self-contained HTML file you can attach to a PR or wiki.

Usage

agentoscope [directory] [options]
agentoscope check [directory]      Lint agent rules (CI-friendly; exits 1 on errors)

-o, --output <file>  Write a self-contained HTML report and exit
    --json           Print the scan report as JSON (for scripting/CI)
    --for <path>     List the rule files that attach to a repo path and exit
    --no-open        Start the server without opening a browser
-p, --port <n>       Port for the local server (default: random)

In the viewer: / focuses the filter box, Esc clears it, and the top-bar path input shows the effective context for any file.

Examples

npx agentoscope                      # scan cwd, open viewer
npx agentoscope ../other-repo        # scan another directory
npx agentoscope -o report.html       # export a shareable HTML report
npx agentoscope --json | jq .stats   # pipe the report into scripts
npx agentoscope check                # lint rules (great in CI / pre-commit)
npx agentoscope --for src/api.ts     # which rules attach to this file?

In CI

- run: npx agentoscope@latest check   # fails the build on stale/broken rules

How it works

Zero-runtime-dependency CLI: the scanner walks your repo (skipping node_modules, build output, etc.), matches paths against a registry of known agent conventions, parses frontmatter, and embeds everything as JSON into a single HTML file with the viewer inlined. Nothing leaves your machine — the server binds to 127.0.0.1 only.

Development

npm install
npm run build       # bundle CLI + viewer into dist/
npm test            # vitest (scanner, report, viewer)
npm run typecheck

License

MIT

About

Visualize your repo's agent instructions (AGENTS.md, CLAUDE.md, Cursor rules, Copilot instructions and more) in one dashboard. npx agentdocs

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages