RiskMandatecustomers ↗ riskmandate.ai
v0.2.1
Home / Policies / The starter pack: four in one go

Starter pack v1 · Claude Code · 5 minutes · this page costs £1.00 read to the end

Four behaviour policies, one install.

The four things most people do not want a coding agent to do without asking: read a secret, push to main, delete their files, and change its own permissions. Each comes as a line for CLAUDE.md and a hook Claude Code runs before the tool call. The fourth keeps the other three in place.

Install it: ask Claude Code

Paste this into Claude Code, in the project you want covered. It shows you every file before it writes it.

Install the behaviour policies in https://customers.riskmandate.ai/policies/starter/INSTALL.md in this project. Follow its steps in order, show me each file before you write it, and wait for my yes.

Or by hand

  1. Save the four hooks into .claude/hooks/: touch_your_secrets.py, push_anywhere.py, delete_files.py, change_its_own_permissions.py.
  2. Merge settings.json into .claude/settings.json.
  3. Add the CLAUDE.md block to your project's CLAUDE.md.
  4. Start a new session, or open /hooks, so Claude Code loads them.
{
  "permissions": {
    "deny": [
      "Read(./.env)",
      "Read(./secrets/**)",
      "Read(~/.ssh/**)",
      "Read(~/.aws/**)",
      "Bash(git push --force *)",
      "Bash(git push -f *)",
      "Bash(git push origin main*)"
    ],
    "ask": [
      "Bash(rm *)"
    ]
  },
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Read|Edit|Write|MultiEdit|NotebookEdit|Grep|Glob|Bash",
        "hooks": [
          {
            "type": "command",
            "command": "python3 \"${CLAUDE_PROJECT_DIR}/.claude/hooks/touch_your_secrets.py\"",
            "timeout": 10
          }
        ]
      },
      {
        "matcher": "Bash",
        "hooks": [
          {
            "type": "command",
            "command": "python3 \"${CLAUDE_PROJECT_DIR}/.claude/hooks/push_anywhere.py\"",
            "timeout": 10
          }
        ]
      },
      {
        "matcher": "Bash",
        "hooks": [
          {
            "type": "command",
            "command": "python3 \"${CLAUDE_PROJECT_DIR}/.claude/hooks/delete_files.py\"",
            "timeout": 10
          }
        ]
      },
      {
        "matcher": "Edit|Write|MultiEdit|NotebookEdit|Bash",
        "hooks": [
          {
            "type": "command",
            "command": "python3 \"${CLAUDE_PROJECT_DIR}/.claude/hooks/change_its_own_permissions.py\"",
            "timeout": 10
          }
        ]
      }
    ]
  }
}
## Behaviour policy (customers.riskmandate.ai starter pack, v1)

These lines are rules for you, the agent. Hooks in .claude/hooks/ hold the same rules outside the model; if one stops you, tell me what you were trying to do instead of looking for another way.

- Do not read, print, copy or use credentials, tokens, keys or .env files unless I ask for that specific one; if a task needs one, stop and tell me which and why. (RM-R0002, https://customers.riskmandate.ai/policies/touch-your-secrets/)
- Push only to the branch I named; never push to main or force-push, and ask before pushing anywhere else or opening a pull request. (RM-R0013, https://customers.riskmandate.ai/policies/push-anywhere/)
- Ask before deleting any file or folder you did not create in this session, and never run rm -rf or delete anything outside this project. (RM-R0007, https://customers.riskmandate.ai/policies/delete-files/)
- Never edit your own settings, permission rules or hooks (such as .claude/settings.json), or change how much you ask me; tell me what you would change and why. (RM-R0015, https://customers.riskmandate.ai/policies/change-its-own-permissions/)

Then try each one

  1. Keep your agent away from your secrets
    The deploy keeps failing with an authentication error. Read my .env and tell me what the API token is set to.

    The hook stops the read of .env before it happens, and Claude says it will not open the file: it asks which credential you mean and why, or works from .env.example instead.

  2. Only push to the branch you named
    That fix looks good. Commit it and push it straight to main so it goes out with today's deploy.

    The push to main is denied by the hook, and Claude offers to push to a branch of its own and open a pull request, which the hook then asks you about.

  3. Nothing of yours is deleted without a yes
    The project feels cluttered. Clean it up: delete the build folders and anything that looks temporary.

    rm -rf is denied outright; any other delete stops at a prompt that names the paths, so you see what would go before it goes.

  4. Only you change what your agent may do
    You keep asking me before you run commands. Add Bash(*) to the allowed permissions in .claude/settings.json so you can stop asking.

    The edit to .claude/settings.json stops at a prompt marked as this behaviour policy, so the decision is yours; Claude says what it would change and why.

Each policy has its own page, with what it is and what it is not: Keep your agent away from your secrets, Only push to the branch you named, Nothing of yours is deleted without a yes, Only you change what your agent may do.