agent-plugins
AGENTS.md45 starsChanged 58 days agoMITView on GitHub
This file provides shared guidance to Claude Code and Codex when working with this repository. CLAUDE.md imports it; keep the instructions here. This repository contains plugins for the Nette Framework ecosystem, shared by Claude Code and Codex: Each plugin contains: - .claude-plugin/plugin.json - Plugin metadata, supported by both clients - skills/ - Contextual documentation that activates based on conversation Some plugins also include: - hooks/ - PostToolUse hooks for file validation/fixing (nette-lint, php-fixer) - docs/ - Pages of the Nette…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,736 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
The file
We split this AGENTS.md into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 80
Keep skill bodies portable between clients.
≈ “Common” is an estimate: at least 1 in 5 of the 16,597 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Repository Instructions
This file provides shared guidance to Claude Code and Codex when working with this repository. CLAUDE.md imports it; keep the instructions here.
Project Overview
This repository contains plugins for the Nette Framework ecosystem, shared by Claude Code and Codex:
plugins/nette/- For developers building Nette Framework applications (skills only)plugins/nette-lint/- Automatic validation hooks for PHP, Latte, NEON and JavaScript/TypeScriptplugins/nette-dev/- For Nette Framework contributors (coding standards and conventions)plugins/php-fixer/- Optional automatic PHP style fixing using nette/coding-standard
Plugin Structure
Each plugin contains:
.claude-plugin/plugin.json- Plugin metadata, supported by both clientsskills/- Contextual documentation that activates based on conversation
Some plugins also include:
hooks/- PostToolUse hooks for file validation/fixing (nette-lint,php-fixer)docs/- Pages of the Nette documentation converted to Markdown (nette,nette-dev). Generated, never edited by hand: it holds exactly the pages the plugin's skills link to, and it is regenerated from thenette/docsrepository by the maintainer's local build step.
Duplicated across plugins:
hooks/hook-input.php- Adapts Claude Codetool_input.file_pathand Codexapply_patch(tool_input.command, relative to eventcwd) to the single-file hooks. Direct edits and one-file patches run without a subprocess. Multi-file patches run only matching extensions, preserve the PHP ini, and aggregate errors and rewrite feedback. Do not resolve symlinks when finding per-project configuration. Keep both copies identical;tests/hook-input.phptchecks this.hooks/hook-config.php- Helper required by each plugin's hooks (require __DIR__ . '/hook-config.php'). Reads the project's.nette-claude.jsonand locates project tools/configs viafindUpwards(). Plugins install independently (each into its owncache/<marketplace>/<plugin>/<version>/directory - a siblingshared/folder is NOT copied), so this file is copied into every hook-carrying plugin (nette-lint,php-fixer). Keep the copies in sync.
Testing Plugins Locally
Enable plugins in development:
# In a project directory, add this repo as a local plugin source
claude --plugin-dir /path-to/agent-plugins/plugins/netteCodex uses the same marketplace and plugin manifests (verified with CLI 0.156.1); do not duplicate them into a second catalog without a demonstrated compatibility need:
codex plugin marketplace add /path-to/agent-plugins
codex plugin add nette@netteFor hook plugins, review and trust their definitions with /hooks. Run the PHP regression suite with php vendor/bin/tester tests -s. docs/compatibility.md records the client checks and their limits.
Hook Scripts
Standalone PHP scripts run on PostToolUse (Edit|Write, which also matches Codex apply_patch). Shell-based edits are not covered. Each one:
- Reads JSON input from stdin through
readHookFile()inhook-input.php; multi-file patches are dispatched to the same script with individualfile_pathinputs - Checks the file extension and skips non-matching files (exit 0)
- Skips paths excluded in the project's
.nette-claude.jsonviaisExcluded()from the plugin's ownhooks/hook-config.php - Locates its project tool/config (
latte-lint,vendor/bin/neon-lint, ESLint config) viafindUpwards()- searched upwards from the edited file, so monorepo sessions rooted above the app directory work too; the search stops one level above the nearest.gitroot - Runs its tool, then exits 0 on success or exit 2 on error (with stderr output)
Hooks run in parallel and in non-deterministic order, so each must be robust on its own - do not rely on one hook running before another. For example fix-php-style runs php -l itself and silently skips invalid PHP instead of depending on lint-php.
Per-project configuration: .nette-claude.json
Read exclusively by the hooks, looked up upwards from the edited file (like .gitignore). Each top-level key is a hook name (lint-php, lint-latte, lint-neon, lint-json, lint-js, fix-php-style) with an exclude list of gitignore-like patterns resolved relative to the config directory. lint-json additionally accepts a jsonc list marking extra files as JSONC (comments + trailing commas allowed):
{
"fix-php-style": {
"exclude": ["fixtures*"]
}
}Skill Files
Each skill is a directory containing a SKILL.md file with YAML frontmatter:
---
name: skill-name
description: When to activate this skill (used for contextual matching)
---The Nette documentation itself is not copied into skills. A skill links to its pages in the plugin's shared docs/ directory as ../../docs/<area>/<page>.md, in the closing ### Documentation section and wherever the body refers to details; a page may be linked from several skills. Adding a link adds the page to docs/ on the next build, and a page no skill links to is dropped. Every area whose documentation is bundled has a skill as its entry point; the body of a skill holds only what models get wrong (pitfalls, retired names, exact constants) and leaves the rest to the pages it indexes. Material that is not in the documentation (a project skeleton, tooling know-how) goes into the references/ subdirectory within the skill.
Keep skill bodies portable between clients. Preserve manual-only installation using Claude Code's disable-model-invocation and Codex's agents/openai.yaml policy. Do not assume a particular shell syntax or client-specific tool name in shared instructions.
Where projects legitimately differ (where secrets live, how the app is deployed), a skill does not prescribe one way: it tells the model to follow the project's existing convention and, when there is none, to offer the user the options. Nette's own conventions (directory structure, database schema, the frontend stack) remain prescriptive.
Publishing
Both clients use the marketplace configuration in .claude-plugin/marketplace.json. Claude Code users install with:
/plugin marketplace add nette/agent-plugins
/plugin install nette@netteCodex users run codex plugin marketplace add nette/agent-plugins and codex plugin add nette@nette. Bump versions in the manifests of changed plugins before release so cached installations can be refreshed.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

