~ / rigs / MSergW / agent-harness-template

MSergW/agent-harness-template

Ready-made harness for AI coding agents (Claude Code, Codex, Copilot): rules, state, checks, diff review · Готовий харнес для AI-агентів: правила, стан, перевірки, рев'ю

↗ GitHub ★ 0 MIT updated 10d ago personal setup Claude CodeCodex
stack: Shell
share on X
ARCHETYPE
Fort Knox
Deny lists, pre-tool hooks, sandboxing. Nothing touches prod without a signature.
CONTEXT TAX · EVERY TURN
~4.2k tokens
Moderate · median rig: 2.3k · breakdown
GUARDRAILS
5/5
Blocks destructive commands · Protects secrets · Pre-tool screening hook · No YOLO mode · Sandbox or ask-first rules · details
Quality 42/100 Guardrails v2

Copy this rig

# review before running: this installs third-party code
$ npx degit MSergW/agent-harness-template/files/.claude ./rig-agent-harness-template  # inspect, then merge into .claude/

MCP servers are added to Claude Code at local scope; env vars are shown as YOUR_… placeholders — we never store values. Files are fetched with degit into a separate folder so you can review before merging.

$ npx degit MSergW/agent-harness-template/files/.agents/skills/depth .claude/skills/depth
$ npx degit MSergW/agent-harness-template/files/.agents/skills/diagnose .claude/skills/diagnose
$ npx degit MSergW/agent-harness-template/files/.agents/skills/git-commit .claude/skills/git-commit
$ npx degit MSergW/agent-harness-template/files/.agents/skills/handoff .claude/skills/handoff
$ npx degit MSergW/agent-harness-template/files/.agents/skills/harness-refresh .claude/skills/harness-refresh
$ npx degit MSergW/agent-harness-template/files/.agents/skills/session-title .claude/skills/session-title
$ npx degit MSergW/agent-harness-template/files/.agents/skills/verify .claude/skills/verify
$ curl -fsSL --create-dirs -o .claude/agents/checker.md https://raw.githubusercontent.com/MSergW/agent-harness-template/main/files/.claude/agents/checker.md
$ curl -fsSL --create-dirs -o .claude/agents/committer.md https://raw.githubusercontent.com/MSergW/agent-harness-template/main/files/.claude/agents/committer.md
$ curl -fsSL --create-dirs -o .claude/agents/docs-sync.md https://raw.githubusercontent.com/MSergW/agent-harness-template/main/files/.claude/agents/docs-sync.md
$ curl -fsSL --create-dirs -o .claude/agents/log-reader.md https://raw.githubusercontent.com/MSergW/agent-harness-template/main/files/.claude/agents/log-reader.md
$ curl -fsSL --create-dirs -o .claude/agents/reviewer.md https://raw.githubusercontent.com/MSergW/agent-harness-template/main/files/.claude/agents/reviewer.md

Merge into .claude/settings.json (project) or ~/.claude/settings.json (user). Hook commands reference scripts in the source repo — copy those too.

{
  "permissions": {
    "deny": [
      "Read(./.env)",
      "Read(./**/.env)"
    ],
    "ask": [
      "Bash(git push:*)"
    ]
  },
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Bash",
        "hooks": [
          {
            "type": "command",
            "command": "bash \"$CLAUDE_PROJECT_DIR/.claude/hooks/prefer-rg.sh\""
          }
        ]
      }
    ]
  }
}

Skills (7)

Subagents (5)

checker
model: haiku
Runs the project verification (make check or a narrower command) and returns only the result — green, or the failing step with the relevant error lines. Use after changes instead of running make check
committer
model: haiku
Creates atomic git commits following the project's Conventional Commits style (the git-commit skill). Use only when the owner asked to commit. Never pushes, amends or rebases without permission.
docs-sync
model: sonnet
Read-only check that user documentation (README, docs/) and module maps still match a change — labels, behaviour, settings, commands, contracts. Give it a commit range or "working tree". Use before co
log-reader
model: haiku
Reads long output — service logs, journalctl, test or build output, a log file — and returns only the root cause with the lines that prove it. Give it a file path or a command to run. Use instead of r
reviewer
model: sonnet
Reviews one change by its diff in a fresh context against REVIEW.md — hard project rules make check cannot see, and correctness of the changed lines; ignores style and code the diff does not touch. Gi

Hooks (4)

eventmatcherruns
SessionStart*bash "$CLAUDE_PROJECT_DIR/.claude/hooks/session-start.sh"
PreToolUseBashbash "$CLAUDE_PROJECT_DIR/.claude/hooks/prefer-rg.sh"
PostToolUseEdit|Write|MultiEditsh "$CLAUDE_PROJECT_DIR/.claude/hooks/format.sh"
Stop*bash "$CLAUDE_PROJECT_DIR/.claude/hooks/stop-check.sh"

Permissions

deny (2)
Read(./.env)
Read(./**/.env)
ask (1)
Bash(git push:*)
allow (8)
Bash(make check)
Bash(bash scripts/check.sh)
Bash(git status:*)
Bash(git diff:*)
Bash(git log:*)
Bash(git show:*)
Bash(rg *)
Bash(ls *)

Similar rigs

copied ✓