Skip to main content
command CX Codex

add-sub — Claude Code command: subscribe to skill events

add-sub creates a skill-event subscription, so context lands before or after a skill runs, gated on files, git branch or environment variables.

no license ★ 2,003 updated 2026-07-26

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/commands/add-sub.md
Open on GitHub

What add-sub does

The command runs as a conversation. It asks where the subscription lives: global goes to ~/.claude/skill-bus.json, project to .claude/skill-bus.json inside the repo. Then it locates the cli.py helper in the skill-bus plugin cache, prints the available skills, and asks when the context should land: pre, post, or complete.

Inserts come from the existing list or you write a new one, and the name is checked for collisions. Conditions are optional. Pick from fileExists, gitBranch, envSet, envEquals or fileContains, and any of them can be negated. Insert-level conditions carry over to the subscription; its own conditions stack on top with AND, unless inheritConditions: false switches the inherited ones off. A duplicate insert+skill+timing pair ends the run with nothing written.

Complete timing needs "completionHooks": true in settings. A * pattern is allowed, though the command pushes back first: every match pulls the context in, and that costs tokens. The same nudge appears for insert text past 200 characters.

What it helps with

  • attach project notes before a skill starts
  • gate a subscription on feature/* branches
  • chain two skills with the complete timing
  • reuse an existing insert in another subscription
  • catch a duplicate subscription before it is saved

Example prompts for the agent

  • /add-sub subscribe superpowers:brainstorming to the plan insert, pre timing, project scope.
  • /add-sub add a subscription for the deploy skill that only fires on feature/*.
  • /add-sub create an insert named migration-check and hook it to post for the release skill.

How to install add-sub

Manually: put the files in place

.claude/commands/add-sub.md

Call it with /add-sub. For all projects use ~/.claude/commands/

Questions about add-sub

How to install add-sub in Claude Code?

Copy the command file into your project at .claude/commands/add-sub.md. It is then called as /add-sub.

What does add-sub do?

It walks through building a subscription to a skill event: scope, skill, pre/post/complete timing, insert and conditions. The result is appended to the skill-bus.json of the chosen scope.

What does complete timing require?

"completionHooks": true has to be set in your settings. That timing is also marked experimental.

Similar slash commands

All slash commands for Agent setup: memory, context, orchestration →

From the same set68

The whole set →
edit-insert edit-insert modifies stored text content and trigger conditions for skill-bus inserts. Useful when you need to update prompt context across all connected subscriptions. CX Codex +1 ★ 2,003repo stars ship-error-handling The ship-error-handling command documents how to recover /ship from CI failures, merge conflicts, deployment errors, and other shipping problems. CX Codex +1 ★ 2,003repo stars backend-architect backend-architect — a subagent for designing APIs, server-side logic, databases, and scalable backend systems. CX Codex ★ 2,003repo stars frontend-developer The frontend-developer subagent for Claude Code builds responsive components in React, Vue, or Angular and tunes frontend rendering performance. CX Codex ★ 2,003repo stars ship-deployment The ship-deployment command completes the deployment half of /ship: it tracks Railway, Vercel or Netlify releases through dev checks and production, and reverts the merge if production fails. CX Codex +1 ★ 2,003repo stars test-writer-fixer test-writer-fixer creates missing test suites, runs test runners after code changes, and updates failing checks. It keeps your test suite aligned with refactored logic. CX Codex ★ 2,003repo stars audit-project audit-project is a Claude Code command that reviews projects with specialized agents and can apply fixes before rechecking changed files. It helps find issues in code and tests. CX Codex +1 ★ 2,003repo stars help help prints skill-bus status plus its slash-command list. Add advanced to get the longer reference on settings and conditions. CX Codex +1 ★ 2,003repo stars

Project sponsors

Companies that keep this analytics open