Skip to main content
Shrike can teach a coding agent when to use it, hand that agent a bounded cleanup brief after it stops, and expose read-only analysis through MCP. None of these paths deletes code.

Install the agent skill

The default install writes the portable skill directory at .agents/skills/shrike/: a short SKILL.md plus four references for commands, workflows, safety, and setup. When it detects an agent-specific marker in the repository, it also writes that target’s adapter and hook configuration. Detection reads repository files only; the installer never runs analysis, project scripts, or network requests.
The directory is one unit. An agent loads SKILL.md when the skill triggers and reads a reference only when a task needs exact flags, a workflow, a protected reason, or setup detail. Target adapters point at the portable SKILL.md instead of duplicating its content.

Install with the Agent Skills CLI

The same canonical directory can be installed without the Shrike CLI:
Both paths install the same SKILL.md and references. The Shrike installer adds target adapters, hooks, and optional package scripts; the Agent Skills CLI only places the skill directory.

Targets

Select targets explicitly with a repeatable or comma-separated flag:
The boolean shortcuts --claude, --cursor, and --opencode also work. Any explicit target disables marker detection for the whole run; only the listed targets are installed.

What the installer changes

  • Skill files are Shrike-owned whole files. Reinstalling identical content reports unchanged. If any file differs and --force is not set, no skill file is written: the conflicting file is skipped with a --force hint, and pending files are skipped with a mixed-version explanation. This all-or-nothing rule prevents a new SKILL.md from pointing at a reference that was not updated. With --force, differing files are replaced and missing files are created.
  • Managed blocks are inserted between shrike:begin and shrike:end markers. Text outside the markers is preserved. A file without markers gets the block appended. A file with malformed markers is skipped.
  • Hooks are installed for selected claude, cursor, and opencode targets. Existing hook entries are preserved; only Shrike-managed entries are replaced. Use --no-hook to skip them.
  • Package scripts are opt-in with --scripts. The installer adds only missing shrike:report, shrike:clean, and shrike:ci entries and never overwrites an existing script name.
  • Safety. Paths are resolved inside the repository. A symlink that escapes the repository is refused. Writes are atomic. --dry-run writes nothing; --json returns a deterministic action list.
The installer exits 4 if any action fails. A skipped file with local edits is not a failure; rerun with --force after reviewing it.

Post-agent hook

The hook computes the orphan delta, runs the configured fast checks against a stored baseline when one is available, and writes a bounded CleanupBrief to .shrike/brief.json. It never applies a deletion, commits, or changes project source. Installing it edits the client’s configuration file; running it writes the brief and the CLI’s normal cache snapshots. shrike install installs the hook for selected claude, cursor, and opencode targets unless you pass --no-hook. To install only one hook directly:
Adds a Stop hook in .claude/settings.json that runs the installed Shrike hook quietly.
Use npx getshrike hook uninstall --claude|--cursor|--opencode to remove only Shrike-managed entries. Reinstalling is idempotent; existing hooks are preserved. hook install and hook uninstall change configuration only; they do not analyze the repository.

Budget and output

  • 60-second total budget, 40 seconds for fast checks, and a 55-second cap on the delta child process.
  • On timeout the hook degrades to delta-only and exits 0; a failed check never blocks the agent.
  • The brief is capped at 20 items and 32 KB and treats repository-derived strings as untrusted data.
  • The human summary ends with Next: shrike plan --base <base>.
The hook does not capture a baseline itself. The baseline is captured by clean or prune; when a stored baseline is present, the hook uses it to explain pre-existing failures.

MCP server

The server speaks JSON-RPC over stdio, with one request per line. It offers four read-only tools: No tool applies deletions or runs project checks. Tools may write engine cache snapshots, and shrike_plan stores plan artifacts under .shrike/. No tool reads .env. Output is truncated at 256 KB with a marker, and base, symbol, and id arguments are validated before use. The server still needs the native engine available to the CLI.

Next