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

multi-agent-context

v1.0.0

Published

CLI tool to generate AI context files for coding agents

Readme

Multi-Agent Context

A CLI that generates agent-specific context files from your Markdown docs, so developers can pick the AI coding agent they prefer—today—and switch as the ecosystem evolves—tomorrow.

Write docs once. Keep your options open across AI agents.

Why this exists

The AI tooling ecosystem moves fast, but project documentation moves (and should move) slower. Teams end up rewriting the same “rules” and onboarding docs to match whichever agent they’re using right now.

There’s a push for a common format (like AGENTS.md) to avoid lock-in, but a lowest-common-denominator standard must stay simple to encourage adoption—often leaving useful vendor-specific features behind (imports, rule metadata, globs, etc.).

Multi-Agent Context keeps your docs as the source of truth and generates the best format for each agent, so you get:

  • Developer freedom: use the agent you prefer without rewriting docs
  • Future-proofing: your documentation stays ready for new agents/targets
  • Better ergonomics: take advantage of each agent’s strengths

Usage

# Generate context files for a target
npx multi-agent-context <target>

# Targets: claude, codex, agents-md, cursor, gemini
npx multi-agent-context claude
npx multi-agent-context codex
npx multi-agent-context cursor

# Use custom config file
npx multi-agent-context claude --config ./custom-config.yml

# Clean generated files
npx multi-agent-context clean           # All targets
npx multi-agent-context clean claude    # Specific target

Supported targets

claude, codex, agents-md, cursor, gemini

Note: codex is separate from agents-md because Codex supports both a root AGENTS.md and per-directory AGENTS.override.md (layered rules), while agents-md uses AGENTS.md in every directory.

How it works

  1. Keep your “agent rules” as normal Markdown docs (for example in docs/).
  2. Map those docs to rule metadata in .multi-agent-context.yml (descriptions, optional globs, optional output paths).
  3. Generate the right files for your chosen agent target.
  4. As agents change, your docs don't—just generate a different target.

Working with Multiple Agents

When switching agents or testing alternatives:

  • Some targets can coexist when they write different files (e.g. claude + codex).
  • Cursor reads both .cursor/rules/ and AGENTS.md if present—so don’t generate cursor and codex/agents-md at the same time.
  • Safe option: run npx multi-agent-context clean (or npx multi-agent-context clean <target>) before generating a different target.

Configuration

Create a .multi-agent-context.yml file in your project root:

rules:
  docs/overview.md:
    description: "Project architecture overview"
    autoLoad: true

  docs/automation.md:
    description: "Automation patterns"
    globs:
      - "app/models/automation/**/*.rb"
      - "app/services/automation/**/*.rb"
    paths:
      - "app/models/automation"

  docs/testing.md:
    description: "Testing patterns"
    globs:
      - "spec/**/*"
      - "**/*.spec.ts"
    paths:
      - "spec"
      - "test"

Rule Options

| Option | Description | |--------|-------------| | description | Human-readable description of the rule | | autoLoad | If true, content is automatically loaded in every session. If false (default), content is loaded on-demand based on description | | globs | File patterns that trigger this rule (Cursor only) | | paths | Subdirectories where context files are created. For Cursor, if globs is empty, globs are auto-generated from paths (e.g., src/api becomes src/api/**/*) |

Output by Target

Claude (claude)

Creates CLAUDE.md files with @path references:

# AI Context

@docs/overview.md

## Context-Specific Rules

- Load `docs/automation.md` for **Automation patterns**

Subdirectory files contain just the reference:

@docs/automation.md

Codex (codex)

Creates AGENTS.md at root and AGENTS.override.md in subdirectories with inlined content (Codex doesn't support imports).

Standard AGENTS.md (agents-md)

Generates AGENTS.md in every directory (no AGENTS.override.md).

Cursor (cursor)

Creates .cursor/rules/<name>.mdc files with YAML frontmatter:

---
description: Automation patterns
globs: app/models/automation/**/*.rb,app/services/automation/**/*.rb
---

[Content of docs/automation.md]

Gemini (gemini)

Creates GEMINI.md files with @path references (same format as Claude).

Safe Clean

Generated files include a marker comment:

<!-- generated by multi-agent-context -->

The clean command only deletes files containing this marker, preserving any hand-written context files.

Error Handling

The tool continues on errors and shows a summary:

Multi-Agent Context - Generation Complete

Target: claude

Files created:
  ✓ CLAUDE.md
  ✓ app/models/automation/CLAUDE.md

Issues:
  ⚠ docs/deprecated.md - file not found (skipped)

Summary: 2 files created, 1 issue

License

MIT