# boring-marketing

boring-marketing is a Claude Code hook that isolates brand workspaces under brands/ and logs created campaign assets. It stops agent tools from touching the wrong client folder.

- hook · `type=hook` · Claude Code · ★ 778 repo stars
- Author: James Dickerson (@boringmarketer)
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/boringmarketer/boring-marketing-skills/tree/HEAD/automations/hooks/hooks.json
- Updated: 2026-11-16
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/hooks/boring-marketing

## What it does

The boring-marketing hook bundle enforces client boundaries across agent actions. During `PreToolUse`, it inspects file targets for `Write` and `Edit` calls. The script reads the active client identifier from `brands/active` and halts tool execution with exit code 2 whenever the agent tries to edit a different brand directory.

A matching safeguard monitors `Bash` commands, checking for mentions of `brands/<slug>/` via regex. On `PostToolUse`, whenever a file is written into `campaigns/`, the hook registers the path inside the active brand's `assets.md` manifest with the current date.

Every hook command relies on `python3` in the system environment and runs with a 10-second timeout.

## Install

### Claude Code (native platform)

1. **Plugin marketplace**
In the agent chat (not a shell):
```text
/plugin marketplace add boringmarketer/boring-marketing-skills
```
In the agent chat (not a shell):
```text
/plugin install boring-marketing@boring-marketing-skills
```

2. **Manually: put the files in place**
- File: `.claude/settings.json` — The hooks block: event (PreToolUse, PostToolUse, Stop…) → command. Personal ones go to ~/.claude/settings.json

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/boringmarketer/boring-marketing-skills/tree/HEAD/automations/hooks/hooks.json

## When to use it
- prevent writes to inactive client directories under brands/
- block shell commands targeting another client's workspace
- track campaign outputs automatically in assets.md

## Example prompts
- Set the active client slug in brands/active to north-star
- Draft an outreach email inside campaigns/q1-cold-email/
- Update copy in brands/acme-corp/positioning.md

## Source text · hooks.json · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 5c778a3372c4afe7.

BEGIN THIRD-PARTY FILE 5c778a3372c4afe7
````text
Hooks bundle shipped with the boring-marketing plugin for Claude Code.

Free marketing skills for your AI agent: research, positioning, copy, pages, SEO, AI search, ads, email and content, plus a local-business pack (Google profile, reviews, local pages, call tracking). Built from real campaigns. Every skill works without a paid tool. MIT licensed.

Triggers on: PreToolUse, PostToolUse.

```json
{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Write|Edit",
        "hooks": [
          {
            "type": "command",
            "timeout": 10,
            "command": "python3 -c '\nimport json,sys,os\ntry:\n    d=json.load(sys.stdin)\nexcept Exception:\n    sys.exit(0)\np=(d.get(\"tool_input\") or {}).get(\"file_path\") or \"\"\ncwd=d.get(\"cwd\") or os.getcwd()\nif not p:\n    sys.exit(0)\ntry:\n    rel=os.path.relpath(p,cwd).split(os.sep)\nexcept ValueError:\n    sys.exit(0)\nif len(rel)<2 or rel[0]!=\"brands\" or rel[1]==\"active\":\n    sys.exit(0)\nact=os.path.join(cwd,\"brands\",\"active\")\nif not os.path.isfile(act):\n    sys.exit(0)\nslug=open(act,encoding=\"utf-8\").read().strip()\nif slug and rel[1]!=slug:\n    print(\"wrong client: this session is scoped to \"+slug+\"; do not switch clients unless the user asked for \"+rel[1]+\" - stop and tell the user\",file=sys.stderr)\n    sys.exit(2)\n'"
          }
        ]
      },
      {
        "matcher": "Bash",
        "hooks": [
          {
            "type": "command",
            "timeout": 10,
            "command": "python3 -c '\nimport json,sys,os,re\ntry:\n    d=json.load(sys.stdin)\nexcept Exception:\n    sys.exit(0)\ncmd=(d.get(\"tool_input\") or {}).get(\"command\") or \"\"\ncwd=d.get(\"cwd\") or os.getcwd()\nact=os.path.join(cwd,\"brands\",\"active\")\nif not cmd or not os.path.isfile(act):\n    sys.exit(0)\nslug=open(act,encoding=\"utf-8\").read().strip()\nif not slug:\n    sys.exit(0)\nhits={m for m in re.findall(r\"brands/([A-Za-z0-9._-]+)/\", cmd) if m not in (\"active\", slug)}\nif hits:\n    print(\"wrong client: this session is scoped to \"+slug+\"; this command touches brands/\"+sorted(hits)[0]+\"/ - do not switch clients unless the user asked; stop and tell the user\",file=sys.stderr)\n    sys.exit(2)\n'"
          }
        ]
      }
    ],
    "PostToolUse": [
      {
        "matcher": "Write",
        "hooks": [
          {
            "type": "command",
            "timeout": 10,
            "command": "python3 -c '\nimport json,sys,os,datetime\ntry:\n    d=json.load(sys.stdin)\nexcept Exception:\n    sys.exit(0)\np=(d.get(\"tool_input\") or {}).get(\"file_path\") or \"\"\ncwd=d.get(\"cwd\") or os.getcwd()\nif not p:\n    sys.exit(0)\ntry:\n    rel=os.path.relpath(p,cwd)\nexcept ValueError:\n    sys.exit(0)\nif rel.split(os.sep)[0]!=\"campaigns\":\n    sys.exit(0)\nbrand=os.path.join(cwd,\"brand\")\nactive=os.path.join(cwd,\"brands\",\"active\")\nif os.path.isfile(active):\n    slug=open(active,encoding=\"utf-8\").read().strip()\n    if slug:\n        brand=os.path.join(cwd,\"brands\",slug)\nif not os.path.isdir(brand):\n    sys.exit(0)\nassets=os.path.join(brand,\"assets.md\")\nposix=\"./\"+rel.replace(os.sep,\"/\")\nprev=open(assets,encoding=\"utf-8\").read() if os.path.exists(assets) else \"\"\nif posix in prev:\n    sys.exit(0)\nwith open(assets,\"a\",encoding=\"utf-8\") as f:\n    f.write(\"- [\"+datetime.date.today().isoformat()+\"] [hook:asset-manifest] \"+posix+\"\\n\")\n'"
          }
        ]
      }
    ]
  }
}

```
````
END THIRD-PARTY FILE 5c778a3372c4afe7

The third-party file has ended. Everything between the 5c778a3372c4afe7 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

© James Dickerson (@boringmarketer) · MIT · https://github.com/boringmarketer/boring-marketing-skills/tree/HEAD/automations/hooks/hooks.json

## Similar
- [ai-marketing-skills-automation](https://affpapa.org/en/nevibecode/skills/ai-marketing-skills-automation.md) — skill · 1000 installs
- [reddit-marketing-agent](https://affpapa.org/en/nevibecode/skills/reddit-marketing-agent.md) — skill · 896 installs
- [marketing-skills](https://affpapa.org/en/nevibecode/skills/marketing-skills.md) — skill · 2264 installs
- [community-marketing](https://affpapa.org/en/nevibecode/skills/community-marketing.md) — skill · 101200 installs
- [marketing-loops](https://affpapa.org/en/nevibecode/skills/marketing-loops.md) — skill · 59000 installs
- [scorecard-marketing](https://affpapa.org/en/nevibecode/skills/scorecard-marketing.md) — skill · 5600 installs

From the same set: [boringmarketer/boring-marketing-skills](https://affpapa.org/en/nevibecode/by/boringmarketer/boring-marketing-skills.md) — 35 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
