~ / rigs / FlorianBruniaux / ctxharness

FlorianBruniaux/ctxharness

Detect drift in AI instruction files, audit Claude Code and Codex configuration, and export portable reports.

↗ GitHub ★ 27 MIT updated today personal setup Claude CodeCodex
share on X
ARCHETYPE
Fort Knox
Deny lists, pre-tool hooks, sandboxing. Nothing touches prod without a signature.
CONTEXT TAX · EVERY TURN
up to ~7.2k tokens
Claude Code loads MCP tools on demand, so the real cost is usually lower.
Heavy · median rig: 2.3k · breakdown
GUARDRAILS
4/5
Blocks destructive commands · Protects secrets · Pre-tool screening hook · No YOLO mode · details
Quality 55/100 Guardrails v2

Copy this rig

# review before running: this installs third-party code
$ npx degit FlorianBruniaux/ctxharness/.claude ./rig-ctxharness  # 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 FlorianBruniaux/ctxharness/.claude/skills/eval-rules .claude/skills/eval-rules
$ npx degit FlorianBruniaux/ctxharness/.claude/skills/eval-skills .claude/skills/eval-skills
$ npx degit FlorianBruniaux/ctxharness/.claude/skills/token-audit .claude/skills/token-audit
$ npx degit <redacted>-config/__fixtures__/claude-project/.claude/skills/duplicate-review .claude/skills/duplicate-review
$ npx degit <redacted>-config/__fixtures__/claude-project/.claude/skills/portable-demo .claude/skills/portable-demo
$ npx degit <redacted>-config/__fixtures__/profile-expectations/sources/A/.claude/skills/demo .claude/skills/demo
$ curl -fsSL --create-dirs -o .claude/agents/reviewer.md https://raw.githubusercontent.<redacted>-config/__fixtures__/claude-project/.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": [
      "Bash(cat .env*)",
      "Read(**/.env*)",
      "Read(**/*.pem)",
      "Read(**/*.key)",
      "Read(**/*.cert)",
      "Read(**/node_modules/**)"
    ]
  },
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Bash",
        "hooks": [
          {
            "type": "command",
            "command": "bash .claude/hooks/dangerous-actions-blocker.sh"
          },
          {
            "type": "command",
            "command": "bash .claude/hooks/rtk-suggest.sh"
          }
        ]
      },
      {
        "matcher": "Write|Edit",
        "hooks": [
          {
            "type": "command",
            "command": "bash .claude/hooks/dangerous-actions-blocker.sh"
          },
          {
            "type": "command",
            "command": "bash .claude/hooks/security-gate.sh"
          }
        ]
      }
    ]
  }
}

MCP servers (2)

serversourceest. tokens
placeholder
env: MCP_TOKEN
local / custom 2.5k
literal
env: API_KEY
local / custom 2.5k

Skills (6)

Subagents (1)

reviewerReview fixture changes without writing files.

Hooks (11)

eventmatcherruns
PreToolUseBashbash .claude/hooks/dangerous-actions-blocker.sh
PreToolUseBashbash .claude/hooks/rtk-suggest.sh
PreToolUseWrite|Editbash .claude/hooks/dangerous-actions-blocker.sh
PreToolUseWrite|Editbash .claude/hooks/security-gate.sh
PostToolUseWrite|Editbash .claude/hooks/auto-format.sh
PostToolUseWrite|Editbash .claude/hooks/typecheck-feedback.sh
UserPromptSubmit*bash .claude/hooks/git-context.sh
UserPromptSubmit*bash .claude/hooks/smart-suggest.sh
UserPromptSubmit*./.claude/hooks/check.sh
UserPromptSubmit*./.claude/hooks/missing.sh
UserPromptSubmit*fixture-hook-from-path

Slash commands (3)

/audit-docs/commit/release

Permissions

deny (6)
Bash(cat .env*)
Read(**/.env*)
Read(**/*.pem)
Read(**/*.key)
Read(**/*.cert)
Read(**/node_modules/**)
ask (0)
—
allow (10)
Bash(pnpm *)
Bash(node *)
Bash(git *)
Bash(npm *)
Bash(gh *)
Bash(find *)
Bash(ls *)
Bash(cat *)
Bash(chmod *)
Bash(rtk *)

Similar rigs

copied ✓