/sheepdog:setupfrom sheepdog
Scaffolds sheepdog gate configuration for a project, creating config.json and wiring .gitignore. Use when setting up or bootstrapping the gate for skill-based file authorization.
Ships in sheepdog. 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.
The sheepdog plugin is a generic engine: three hooks that read project-owned
rules from .claude/sheepdog/config.json. The plugin ships no rules of its own.
This skill scaffolds that config for the current project.
Do the following, in order. Adapt paths/skills to what the project actually has — do not blindly paste the examples.
.claude/skills/*/SKILL.md (and any plugin
skills the user mentions). These are the skills the gate can require..claude/sheepdog/config.jsonOne JSON file holds the whole gate: the authorization window, override skills, and
the ordered glob→skill rules. The routing table injected on every prompt is
GENERATED from rules, so the reminder and the gate can never drift apart.
Starter template (replace the example rule with this project's real globs and skill names; drop the fields the project doesn't need):
{
"window": 300,
"overrides": [],
"rules": [
{ "glob": "*/path/to/governed/dir/*", "skill": "the-skill-for-that-dir", "desc": "optional label for the routing table" }
]
}
Field notes (JSON has no comments — explain choices to the user in chat instead):
window — seconds a stamped skill stays valid (default 300; omit if default is fine).overrides — skills allowed to edit ANY governed path (orchestrator-style skills);
omit if none.rules — first matching glob wins, so order specific → general. Globs use
shell-case semantics: * matches any run of characters (including /), ?
matches exactly one. They match against the absolute file path.reminder (optional) — replaces the default preamble injected on every prompt.The hooks write .claude/sheepdog/.skill-used at runtime (the "last skill invoked"
timestamp). It must not be committed. Add this line to the project's .gitignore if
missing:
.claude/sheepdog/.skill-used
Commit config.json (it is shared team rules); do not commit .skill-used.
If .claude/sheepdog/ contains the old gate-map.conf (and routing.md) format,
the hooks still honor it, but config.json supersedes both. Convert each
<glob>|<skill> line into a rules entry and each @override|<skill> line into
an overrides entry, then delete gate-map.conf and routing.md.
Tell the user the plugin must be enabled for the hooks to run, and that the hooks
need jq (preinstalled on macOS 15+; a standard package elsewhere). Warn that once
this project is governed, a missing jq or a broken config blocks ALL edits — the
gate fails closed rather than silently off:
/plugin marketplace add <path-to-marketplace>
/plugin install sheepdog@<marketplace-name>
/reload-plugins
Then verify: invoking a skill stamps .claude/sheepdog/.skill-used, and editing a
governed file without the matching skill is blocked with a message pointing at
config.json.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub avantsoftware/sheepdog --plugin sheepdogOther plugins' skills for the same job