HUB
Sign inSign up

bmoffatt/sbx-rules:latest

Multi-platform
Manifest digest

sha256:0b9e6450fc4d3df0fc89fbe067af85ea61981a52a780a687eb08d1ad65025608

Last pushed

8 days by bmoffatt

Type

Sandbox Kit

Manifest digest

sha256:0b9e6450fc4d3df0fc89fbe067af85ea61981a52a780a687eb08d1ad65025608

yaml
schemaVersion: "3"
displayName: sbx rules
description: Claude rules for sandboxes
sourceUrl: https://github.com/bmoffatt/sbx-kits/tree/main/kits/rules
version: 1.3.0
kind: mixin
requires:
    - claude
    - deb/jq
capabilities:
    - type: com.docker.sandbox/lifecycle@1
      config:
        install:
            - command: |
                set -e
                f="$HOME/.claude/settings.json"
                mkdir -p "$HOME/.claude"
                [ -s "$f" ] || echo '{}' > "$f"
                jq --arg cmd '~/.claude/hooks/require-github-banner.sh' '
                  .hooks.PreToolUse = ((.hooks.PreToolUse // [])
                    | map(select((.hooks // []) | any(.command == $cmd) | not))
                    + [{matcher: "Bash", hooks: [{type: "command", command: $cmd}]}])
                ' "$f" > "$f.tmp"
                mv "$f.tmp" "$f"
              description: Register the GitHub banner PreToolUse hook in Claude settings.json
              user: agent