/conventions:repo-instructionsfrom conventions
Use when creating, auditing, or migrating repository instruction files for coding-agent harnesses.
Ships in conventions. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use one shared source of truth for guidance that coding agents must receive in every session.
At the repository root, AGENTS.md alone is canonical for shared,
harness-neutral project instructions. Don't add a CLAUDE.md beside it:
current Claude Code reads AGENTS.md natively (Harness behavior, below).
That native reading has one caveat. Under Claude Code's default setting it
switches off as soon as any CLAUDE.md, .claude/CLAUDE.md or
CLAUDE.local.md exists in the working directory or above it, and then
AGENTS.md silently stops loading. So keep all three out of the repository,
and don't clone it under a directory that holds one. That includes the main
checkout when worktrees live inside it (ticket-workflow's default
.claude/worktrees/): a CLAUDE.local.md there turns native reading off in
every worktree too. Put a contributor's own notes in ~/.claude/CLAUDE.md (it
applies to every project, and the docs exempt it, Harness behavior) or a
gitignored .claude/rules/ file instead, neither of which turns native
reading off.
@AGENTS.md shimWhere native reading can't be relied on (Claude Code before v2.1.277, the
sessions Harness behavior lists as having none, or another tool that reads
only CLAUDE.md and follows @ imports), add a root CLAUDE.md whose
complete contents are:
@AGENTS.md
Claude Code then loads AGENTS.md through the import, on every version and in
every session that reads CLAUDE.md, and a contributor's CLAUDE.local.md no
longer drops it. The shim is itself one of the files that turn native reading
off, so with it in place AGENTS.md arrives only through the import (for
what that costs nested AGENTS.md files, see Harness behavior and scoped
files).
Prefer the import over a symlink: it works on platforms where creating symlinks
needs elevated privileges. Keep the shim pure. GitHub Copilot CLI also discovers
CLAUDE.md, so appending Claude-only behavior there can leak that behavior into
Copilot sessions.
Put genuinely harness-specific mechanics in harness-owned surfaces instead:
.claude/rules/, .claude/settings.json, Claude-specific skills, .codex/, or
the corresponding surface for another harness. Do not duplicate shared prose
across files.
Repository instructions are always-loaded context: build and test commands, architecture boundaries, safety constraints, and workflow rules an agent must know before acting. Keep them concise.
Skills are on-demand procedures or references selected for a matching task. Use a skill for a specialized workflow; do not hide a rule that must apply to every session behind skill discovery.
When both CLAUDE.md and AGENTS.md already exist (when only CLAUDE.md
does, move its shared content into a new root AGENTS.md and continue from
step 3):
AGENTS.md once.CLAUDE.md once its content is in AGENTS.md, or reduce it
to the exact @AGENTS.md shim where native reading can't be relied on
(Optional fallback, above). Without the shim, leave no
.claude/CLAUDE.md either: Claude-only guidance from step 3 goes in
.claude/rules/, since that file would turn native reading off too.
Verify each supported harness loads the intended context.User-level settings such as Codex
project_doc_fallback_filenames = ["CLAUDE.md"] can ease a migration, but they
are machine-local configuration, not a portable repository contract.
AGENTS.override.md and AGENTS.md; configured
fallback names come after those files.CLAUDE.md and expands @file imports. Per its memory
docs (below), v2.1.277 and later also read AGENTS.md natively, but under
the default setting only when no CLAUDE.md, .claude/CLAUDE.md or
CLAUDE.local.md exists in the working directory or above it (the
user-level ~/.claude/CLAUDE.md, an organization's managed CLAUDE.md,
and .claude/rules/ files don't count). With one, it reads the
CLAUDE.md files and whatever they import. The docs also list sessions
without native reading: any with the built-in AGENTS.md plugin disabled,
in some cases the first one after upgrading from v2.1.276 or earlier, and,
before v2.1.281, Amazon Bedrock or telemetry-disabled ones. A Project
instructions setting, set in /config or user or managed settings but
not in project settings, changes the default: claude-md-and-agents-md
reads both files (skipping an AGENTS.md already imported, so the shim
isn't read twice), and claude-md reads CLAUDE.md only.
Verified on Claude Code 2.1.294 in headless claude -p runs with no tools,
by asking for a codeword kept in AGENTS.md: with only AGENTS.md it
loaded; adding a CLAUDE.local.md, or a CLAUDE.md without the import,
dropped it; with the @AGENTS.md shim it loaded, with or without a
CLAUDE.local.md. Interactive sessions and the non-default settings
weren't tested.AGENTS.md, CLAUDE.md, and GEMINI.md.GEMINI.md; users can configure other context
filenames and use @file.md imports.The root baseline is the portable contract. Nested and path-scoped instruction
discovery differs across harnesses, so verify every supported harness before
depending on a nested layout. Prefer each harness's scoped mechanism when
identical cross-harness behavior is not established. Claude Code's docs
describe loading a subdirectory's AGENTS.md when Claude reads a file there,
but only as part of native reading, which a root CLAUDE.md (the shim
included) turns off under the default setting. By that account, a nested
AGENTS.md kept for another harness, such as Codex, reaches Claude Code in the
AGENTS.md-only baseline but not in a repository with the shim. Neither the
nested loading nor the shim's suppression of it is verified here, so check it
before relying on a nested AGENTS.md either way, and with the shim give
Claude Code that guidance through .claude/rules/ instead.
Declare the plugins a repository needs in .claude/settings.json, not in
prose: extraKnownMarketplaces registers the marketplace and enabledPlugins
turns plugins on. Two rules keep that declaration working in interactive local
sessions and in cloud sessions (verified on Claude Code 2.1.268; headless
claude -p/SDK runs install nothing from project settings and are out of
scope here):
List every enabled plugin's dependencies next to it. The install that
project settings trigger on the trust prompt does not resolve any plugin's
dependencies, so a plugin enabled without them ends up disabled
(dependency-unsatisfied) and loads nothing: a bundle plugin without the
plugins it bundles, or a single plugin without the one it builds on. Enable
each plugin and everything its manifest depends on.
Install from a SessionStart hook for cloud sessions. Cloud sessions honor
repo-declared hooks but skip repo-declared plugins ("enabled only by
repo-authored settings"), and headless runs (claude -p, the SDK) install
nothing from enabledPlugins. Commit a hook that, when CLAUDE_CODE_REMOTE
is true, reads the same settings.json and, for each enabled plugin, runs
claude plugin marketplace add <source> for its marketplace and claude plugin install <plugin>. Keep the marketplaces it may use as an allowlist
inside the script: a repo hook already runs arbitrary shell in cloud
sessions, but the allowlist stops a settings-only change on a branch from
pointing the hook at a new source. The settings file stays the single source
of truth and the hook never changes when the plugin set does. The reference
implementation is .claude/hooks/session-start.sh in
maguerrieri/claude-toolbox; either copy that file or run it from there
with a single hook entry and nothing to copy:
{
"hooks": {
"SessionStart": [
{
"matcher": "startup|resume",
"hooks": [
{
"type": "command",
"command": "curl -fsSL https://raw.githubusercontent.com/maguerrieri/claude-toolbox/main/.claude/hooks/session-start.sh | bash"
}
]
}
]
}
}
Pin a commit SHA in place of main for an immutable copy. The fetch needs
raw.githubusercontent.com, which is on the cloud environments' default
allowlist. A plugin can't carry this hook: it is what installs the plugins.
What SKILL.md sets; muted values are Claude Code's defaults
3 skills in this plugin
/commit-conventionsMario's git commit message format. Use whenever writing, amending, or reviewing a git commit message in any of Mario's repos./pr-conventionsMario's pull request title and issue-link format. Use whenever writing, editing, or reviewing a PR title or body in any of Mario's repos.Other plugins' skills for the same job
npx claudepluginhub maguerrieri/claude-toolbox --plugin conventions