Skip to main content
hook

boring-marketing — Claude Code hook: isolate brand workspaces

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.

MIT ★ 778 updated 2026-11-16

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add boringmarketer/boring-marketing-skills
/plugin install boring-marketing@boring-marketing-skills
Open on GitHub

What boring-marketing 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.

What it helps with

  • 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 for the agent

  • 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

How to install boring-marketing

1Plugin marketplace

/plugin marketplace add boringmarketer/boring-marketing-skills
/plugin install boring-marketing@boring-marketing-skills

2Manually: put the files in place

.claude/settings.json

The hooks block: event (PreToolUse, PostToolUse, Stop…) → command. Personal ones go to ~/.claude/settings.json

Step by step, with commands for each platform: Claude Code hooks: what they are, where to configure them, how to block a risky command

Questions about boring-marketing

How to install boring-marketing in Claude Code?

Run /plugin marketplace add boringmarketer/boring-marketing-skills, then run /plugin install boring-marketing@boring-marketing-skills, or add the hook definition directly into .claude/settings.json.

What does boring-marketing do?

It intercepts agent operations to isolate client folders in brands/ and logs newly written files from campaigns/ into assets.md.

What is required to run boring-marketing?

It requires python3 installed on the host machine to execute inline validation scripts.

Source text

hooks.json · MIT
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'"
          }
        ]
      }
    ]
  }
}

```

© James Dickerson (@boringmarketer) · MIT · boringmarketer/boring-marketing-skills

Similar hooks

All hooks for Agent setup: memory, context, orchestration →

From the same set35

The whole set →
research research is a Claude Code subagent that gathers evidence from the current workspace and public web. It runs for onboarding, site reviews, keyword research, and competitor teardowns. CX Codex ★ 778repo stars boring-marketing boring-marketing is a Claude Code plugin that adds 32 marketing skills for audience research, SEO, copywriting, paid ads, and local business promotion. Runs when called via slash commands like /start-here. ★ 778repo stars long-form-article long-form-article is a Claude Code skill that plans and drafts in-depth articles, guides, and playbooks. It activates for requests to create a substantial piece for a blog, newsletter, or publishing platform. CX Codex +1 ★ 778repo stars google-business-profile The google-business-profile skill for Claude Code audits local business profiles against top map pack competitors. It identifies growth gaps and generates four weeks of Google posts. CX Codex +1 ★ 778repo stars pitch-the-fix pitch-the-fix is a Claude Code skill that finds a local business owner and drafts a first email around one specific fix. It activates for prospect research and cold outreach. CX Codex +1 ★ 778repo stars newsletter The newsletter skill for Claude Code drafts publication-ready content and assists with newsletter strategy. It adapts to brand voice while using ESP click data to optimize subscriber engagement. CX Codex +1 ★ 778repo stars ads-incrementality-check ads-incrementality-check is a Claude Code skill that tests whether an ad campaign brings extra phone calls. It compares the business call log before, during and after a planned campaign pause. CX Codex +1 ★ 778repo stars speed-to-lead The speed-to-lead skill for Claude Code identifies missed calls and slow lead response times. It analyzes call logs to establish a structured follow-up cadence. CX Codex +1 ★ 778repo stars

More in the catalog

Project sponsors

Companies that keep this analytics open