OmniscioGuidesA team conventions plugin
A team conventions plugin you can copy
A team’s conventions usually live in a document nobody reads, in a CLAUDE.md that every session pays for, or in one person’s ~/.claude/. A plugin fixes all three: the skills load only when their description matches the task, the agent is available when someone asks for a review, and the hook runs whether or not anyone remembers it exists.
This is the worked example from the five copyable plugin examples, and it is published from the private marketplace built in the marketplace example. Every file below is complete. If you only want something to happen automatically, the hooks bundle is the smaller starting point.
Checked against Anthropic’s Claude Code plugin documentation on November 25, 2026. By the Omniscio team. Updated .
What it bundles
Four components, each in its default location, plus one script folder the hook calls by path. Nothing here needs a manifest key to be found: the default directories are scanned at load.
| Component | File | What the team gets |
|---|---|---|
| Skill | skills/conventions/SKILL.md | /team-conventions:conventions, and Claude can load it on its own when a task matches its description |
| Skill | skills/pr-description/SKILL.md | /team-conventions:pr-description writes a pull request description in the team’s house format |
| Agent | agents/conventions-reviewer.md | A subagent named team-conventions:conventions-reviewer, invoked with @agent-team-conventions:conventions-reviewer |
| Hook | hooks/hooks.json | A PreToolUse guard that refuses edits to protected files, and a PostToolUse hook that lints an edited file |
The hook calls scripts/guard-protected.sh. The folder name scripts/ is a convention rather than something Claude Code looks for, so the hook has to name the file by its path — and that path is written with ${CLAUDE_PLUGIN_ROOT}, because an installed plugin lives in a cache directory whose path changes with every version.
The full directory
team-conventions/
├── .claude-plugin/
│ └── plugin.json
├── skills/
│ ├── conventions/
│ │ └── SKILL.md
│ └── pr-description/
│ └── SKILL.md
├── agents/
│ └── conventions-reviewer.md
├── hooks/
│ └── hooks.json
├── scripts/
│ └── guard-protected.sh
└── README.mdThe manifest
{
"name": "team-conventions",
"description": "The conventions, review checklist and protected-file guard this repository follows",
"version": "1.2.0",
"author": { "name": "Platform Team" }
}The conventions skill
Each skill is a directory under skills/ holding a SKILL.md. The directory name becomes the command’s last segment, so skills/conventions/ runs as /team-conventions:conventions.
--- name: conventions description: Apply this repository's code conventions when writing or reviewing code. Use when asked to follow house style, review a change against team rules, or write a new module. --- Read CONVENTIONS.md at the repository root before answering. Apply, in this order: 1. Naming: files are kebab-case, exported functions are camelCase, types are PascalCase. 2. Errors: never swallow one. Wrap it with context and rethrow, or handle it and say what the caller should do. 3. Tests: every behavior change carries a test that fails without the change. When you review, report a violation with the file, the line, and the rule number it breaks.
The pull request skill
A skill can also be invoked by name with the user’s arguments. disable-model-invocation keeps Claude from starting it on its own when you only ever want it run deliberately.
--- name: pr-description description: Write a pull request description in the team's format argument-hint: "[base-branch]" disable-model-invocation: true --- Write the pull request description for the commits on this branch compared with $ARGUMENTS, which defaults to the repository's default branch. Use these headings, in this order: What changed, Why, How it was tested, Risks. Keep every section to bullets. Name the files that carry the change.
The reviewer agent
Each Markdown file under agents/ is one subagent. Its frontmatter names it and says when Claude should delegate to it; the body is its system prompt. In a plugin the agent is namespaced, so a file named conventions-reviewer.md loads as team-conventions:conventions-reviewer.
--- name: conventions-reviewer description: Reviews a diff against this repository's conventions. Use after a change to application code, before opening a pull request. model: sonnet tools: Read, Grep, Glob, Bash --- You review changes against CONVENTIONS.md and nothing else. Read the diff, then the rule file. For each violation, report the file, the line, and the rule it breaks. Ignore formatting a formatter owns. If the change follows the conventions, say so in one sentence and stop.
The hooks
A plugin’s hooks live in hooks/hooks.json under a top-level "hooks" key, in the same shape as the hooks object in a settings file. A PreToolUse hook that exits 2 blocks the tool call and hands Claude its stderr as the reason.
{
"hooks": {
"PreToolUse": [
{
"matcher": "Write|Edit",
"hooks": [
{
"type": "command",
"command": "\"${CLAUDE_PLUGIN_ROOT}/scripts/guard-protected.sh\""
}
]
}
],
"PostToolUse": [
{
"matcher": "Write|Edit",
"hooks": [
{
"type": "command",
"command": "f=$(jq -r '.tool_input.file_path') && npx --no-install eslint --fix \"$f\""
}
]
}
]
}
}Both scripts need jq; the lint hook needs ESLint installed in the project, and guard-protected.sh must be executable (chmod +x). Without jq the guard reads an empty path and lets everything through.
The PreToolUse command is wrapped in double quotes because it has no args: it runs through a shell, and the quotes keep the expanded ${CLAUDE_PLUGIN_ROOT} path one shell word. A command written with args instead passes each element as one argument with no shell and needs no quoting.
#!/bin/bash
input=$(cat)
file=$(jq -r '.tool_input.file_path // empty' <<<"$input")
case "$file" in
*/generated/*|*/vendor/*|*.lock)
echo "Blocked: $file is generated. Change the source and regenerate it." >&2
exit 2
;;
esac
exit 0The README
Worth writing for one practical reason: claude plugin validate prints advice when a plugin’s README has no line that installs it from a marketplace, and gives you the line to paste.
# team-conventions
Install:
claude plugin install team-conventions@your-marketplaceWhat each field does
| Field | What it decides here |
|---|---|
name | team-conventions. It is the prefix on the two skills and the agent, so every command is /team-conventions:…. It must be kebab-case, with no spaces |
description | The text a teammate reads next to the plugin in /plugin before installing it |
version | Pins installs to 1.2.0 until you raise it and re-release. A plugin installed from a marketplace gets a copy in the cache, and this field is what tells Claude Code there is a new one |
author | Who to credit. name is required inside it; email and url are optional |
Nothing in this manifest points at a component, because every one of them sits in its default folder: skills/, agents/, hooks/hooks.json. You only add a component key when a file lives somewhere else, and then the path is relative to the plugin root and starts with ./.
Install and enable it
From a shell, add the marketplace the plugin is published in, then install it. The install id is the plugin name, an @, and the marketplace name.
claude plugin marketplace add your-org/your-marketplace claude plugin install team-conventions@your-marketplace --scope project
The scope decides who gets it. --scope project writes .claude/settings.json, which you commit so the plugin is enabled for everyone who works in the repository; user is every project on one machine, and local is you in this repository only. The default is user. Enabled is not installed: the commit records the choice, and the plugin still has to be installed on each machine once.
Inside a session, /plugin install team-conventions@your-marketplace opens the plugin’s details instead of installing at once, so you can read what it will add — the skills, the agent, the hooks — and then choose the scope. Enabling and disabling afterwards happen on the same Installed tab, or from the shell with claude plugin enable and claude plugin disable.
Installing at project scope does not install it for a teammate. Each person adds the marketplace in their own clone and runs the same install command there.
Confirm it loaded
Run claude plugin validate ./team-conventions before you publish the plugin, and again after any edit to its files. It reads the manifest and the frontmatter of every skill, agent and command file, prints the manifest path, and ends on ✔ Validation passed. An unknown field or a missing frontmatter block is a warning by default, so add --strict in CI to make warnings fail the run; a YAML block that does not parse is already an error.
After installing, claude plugin details team-conventions prints a component inventory, and claude plugin list shows the plugin with its version, scope and Status: ✔ enabled. In a session, typing / offers /team-conventions:conventions and /team-conventions:pr-description, and /plugin on the Installed tab lists the agent and the two hooks.
The hooks load with the plugin, not when a skill runs: Claude Code registers them at session start and they fire on their events from then on. To prove the guard works, ask Claude to edit a file under generated/; it should come back with the hook’s own sentence as the reason.
A PostToolUse hook that exits 0 shows nothing in the transcript, so silence after a lint is not proof it ran. Confirm it with debug logging, or by what the command changes in the file.
The failure this plugin invites
The one almost every team hits: the conventions were written into a CLAUDE.md at the plugin root, and nothing happens. Claude Code does not load a CLAUDE.md at the plugin root, and claude plugin validate warns CLAUDE.md at the plugin root is not loaded as project context.
Move the text into a skill under skills/. A skill loads when its description matches the task, can also be run by name, and can carry supporting files beside its SKILL.md for the detail you do not want in every session.
The second is a leftover: if the same hook is still in .claude/settings.json and now also in hooks/hooks.json, it runs twice. Hooks have no plugin prefix, so the two copies do not collide or deduplicate. Skills and agents behave the opposite way — the plugin’s copies are namespaced, so both work and Claude sees two of each, which is the clue that the old copy is still there.
The third is quieter: the plugin loads and its skills are missing from /. That is almost always skills/ saved inside .claude-plugin/, which is not scanned. Move it to the plugin root and run /reload-plugins.
Common questions
Where do a plugin’s conventions go if not in CLAUDE.md?
In a skill. A CLAUDE.md at the plugin root is not loaded, and the validator warns about it. The skill loads when its description matches, or by name.
Can a plugin’s hook block a tool call?
Yes, on PreToolUse: exit 2 blocks the call and its stderr becomes the reason Claude sees. Any other non-zero code is a non-blocking error and the call goes ahead.
What happens if the conventions also stay in .claude/?
Skills and agents do not collide, because the plugin’s copies carry the team-conventions: prefix, so both work. Hooks have no prefix, so a hook present in both places runs twice.
How does a teammate get it?
They add the marketplace once and install the plugin in their own clone, or run the same install command after you commit the project-scope setting.
Every session, one window
Omniscio runs several agent sessions side by side in one window, each with its own context and its own diff view. Any model, any harness — Claude Code, Codex, OpenCode, Devin, Pi, and Hermes all supported.