Sandbox
@netresearch/agent-rules-skill

Agent skill for AGENTS.md files in Claude Code

This skill generates and updates AGENTS.md files for agent-facing project context. It reads common project files like `Makefile`, `package.json`, `composer.json`, and `go.mod`, then writes thin root files or scoped files for subsystems.

76 stars6 forksShellUpdated 7d ago
Who it's for

Builders who want their agent to write and maintain AGENTS.md context files for a project.

What it delivers

You can keep agent instructions in the right places without hand-writing every AGENTS.md file.

What it does

Thin root files

Creates compact root AGENTS.md files with precedence rules and global defaults.

Scoped files

Detects subsystems like backend/, frontend/, internal/, and cmd/ and creates scoped AGENTS.md files.

Command extraction

Pulls commands from `Makefile`, `package.json`, `composer.json`, and `go.mod`.

Multi-language templates

Includes templates for Go, PHP, TypeScript, Python, and hybrid projects.

Idempotent updates

Refreshes content while preserving existing structure.

Managed headers

Marks files as agent-maintained with timestamps.

How to get it

  1. 1Add the Netresearch marketplace once, then browse and install skills
    # Claude Code
    /plugin marketplace add netresearch/claude-code-marketplace
    /plugin install agent-rules@netresearch-claude-code-marketplace
  2. 2Since Claude Code 2.1.157 a plugin directory under your personal skills directory loads…
    mkdir -p ~/.claude/skills
    git clone https://github.com/netresearch/agent-rules-skill.git \
      ~/.claude/skills/agent-rules
  3. 3Install with any Agent Skills-compatible agent
    npx skills add https://github.com/netresearch/agent-rules-skill --skill agent-rules
  4. 4Run
    git clone https://github.com/netresearch/agent-rules-skill.git
  5. 5Run
    composer require netresearch/agent-rules-skill
  6. 6Run
    npm install --save-dev \
      @netresearch/agent-skill-coordinator \
      github:netresearch/agent-rules-skill

README

AGENTS.md Generator Skill

Netresearch AI skill for generating and maintaining AGENTS.md files following the agents.md specification.

What is AGENTS.md? A context file written for AI coding agents, not humans. Human readability is a side effect, not a goal. Adopted by 60,000+ open-source projects. See the official specification and best practices from 2,500+ repositories.

Standards Compliance

This skill implements two complementary standards:

  1. agents.md - The file format this skill generates. A simple Markdown convention for guiding AI coding agents, supported by Claude Code, GitHub Copilot, Cursor, and 60,000+ open-source projects.

  2. Agent Skills - How this skill is packaged and distributed. A portable format for procedural knowledge that works across AI agents.

Supported Platforms:

  • ✅ Claude Code (Anthropic)
  • ✅ Cursor
  • ✅ GitHub Copilot
  • ✅ Other skills-compatible AI agents

Features

  • Thin Root Files - ~30 lines with precedence rules and global defaults
  • Scoped Files - Automatic subsystem detection (backend/, frontend/, internal/, cmd/)
  • Auto-Extraction - Commands from Makefile, package.json, composer.json, go.mod
  • Multi-Language - Templates for Go, PHP, TypeScript, Python, and hybrid projects
  • Idempotent Updates - Preserve existing structure while refreshing content
  • Managed Headers - Mark files as agent-maintained with timestamps

Installation

Marketplace (Recommended)

Add the Netresearch marketplace once, then browse and install skills:

# Claude Code
/plugin marketplace add netresearch/claude-code-marketplace
/plugin install agent-rules@netresearch-claude-code-marketplace

Without a marketplace

Since Claude Code 2.1.157 a plugin directory under your personal skills directory loads on its own:

mkdir -p ~/.claude/skills
git clone https://github.com/netresearch/agent-rules-skill.git \
  ~/.claude/skills/agent-rules

It loads as agent-rules@skills-dir on the next session. Update with git -C ~/.claude/skills/agent-rules pull and start a new session; remove it by deleting the directory. This route has no claude plugin update.

npx (skills.sh)

Install with any Agent Skills-compatible agent:

npx skills add https://github.com/netresearch/agent-rules-skill --skill agent-rules

Download Release

Download the latest release and extract to your agent's skills directory.

Git Clone

git clone https://github.com/netresearch/agent-rules-skill.git

Composer (PHP Projects)

composer require netresearch/agent-rules-skill

Requires netresearch/composer-agent-skill-plugin.

npm (Node Projects)

npm install --save-dev \
  @netresearch/agent-skill-coordinator \
  github:netresearch/agent-rules-skill

Requires @netresearch/agent-skill-coordinator, which discovers the skill in node_modules and registers it in AGENTS.md via a postinstall hook. For pnpm, also allowlist the coordinator's postinstall:

{
  "pnpm": {
    "onlyBuiltDependencies": ["@netresearch/agent-skill-coordinator"]
  }
}

Usage

The skill triggers on keywords like:

  • "AGENTS.md", "agents file"
  • "agent documentation", "AI onboarding"
  • "project context for AI"

Example Prompts

"Generate AGENTS.md for this project"
"Update the agents documentation"
"Create scoped AGENTS.md files for each subsystem"
"Validate AGENTS.md structure"

Supported Projects

TypeDetectionFeatures
Gogo.modVersion extraction, CLI tool detection
PHPcomposer.jsonTYPO3/Laravel/Symfony detection
TypeScriptpackage.jsonReact/Next.js/Vue/Express detection
Pythonpyproject.tomlPoetry/Ruff/Django/Flask detection
HybridMultiple markersAuto-creates scoped files per stack

Structure

agents/
├── SKILL.md              # AI instructions
├── README.md             # This file
├── LICENSE-MIT           # Code license (MIT)
├── LICENSE-CC-BY-SA-4.0  # Content license (CC-BY-SA-4.0)
├── composer.json         # PHP distribution
├── references/           # Convention documentation
├── scripts/              # Generator scripts
│   ├── generate-agents.sh
│   ├── validate-structure.sh
│   └── detect-scopes.sh
└── templates/            # Language-specific templates
    ├── go/
    ├── php/
    ├── typescript/
    └── python/

Contributing

Contributions welcome! Please submit PRs for:

  • Additional language templates
  • Detection signal improvements
  • Script enhancements
  • Documentation updates

License

This project uses split licensing:

  • Code (scripts, workflows, configs): MIT
  • Content (skill definitions, documentation, references): CC-BY-SA-4.0

See the individual license files for full terms.

Credits

Developed and maintained by Netresearch DTT GmbH.


Made with ❤️ for Open Source by Netresearch

Files in the repo

Repository payload22 top-level entries
  • .claude-plugin
  • .github
  • assets
  • Build
  • docs
  • scripts
  • skills
  • .envrc
  • .gitignore
  • .markdownlint-cli2.jsonc
  • .pre-commit-config.yaml
  • .yamllint.yml
  • AGENTS.md
  • CLAUDE.md
  • composer.json
  • LICENSE-CC-BY-SA-4.0
  • LICENSE-MIT
  • package.json
  • plugin.json
  • README.md
  • renovate.json
  • SECURITY-AUDIT.md

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More skills

obra/
superpowers

An agentic skills framework & software development methodology that works.

285k
1 add

Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, every edge explained, no vector store.

117k
1 add
Vincentwei1021/
anything2explainer

Topic in, narrated explainer video out. A Claude Code / Codex skill that turns any topic into a black-canvas motion-graphics explainer video with TTS voiceover, subtitles and a chapter progress bar. Chinese or English; every frame drawn in code with Remotion.

666

Open-source AI job search: scan job portals, evaluate listings into a structured A-H report with a global 1-5 score, tailor your CV, track applications — runs locally in your AI coding CLI (Claude Code, Codex, OpenCode, Antigravity…)

71k