# add-sub

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

- command · `type=command` · Claude Code, Codex, GitHub Copilot, Gemini CLI · ★ 2003 repo stars
- Author: composio-community
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/composio-community/awesome-claude-plugins/tree/HEAD/skill-bus/commands/add-sub.md
- Updated: 2026-07-26
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/commands/add-sub

## What it 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.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/commands/add-sub.md` — Call it with /add-sub. For all projects use ~/.claude/commands/

### Codex

**Manually: put the files in place**
- File: `~/.codex/prompts/add-sub.md` — Call it with /prompts:add-sub. Codex marks this format deprecated in favour of skills

### GitHub Copilot

**Manually: put the files in place**
- File: `.github/prompts/add-sub.prompt.md`

### Gemini CLI

**Manually: put the files in place**
- File: `.gemini/commands/add-sub.toml` — Gemini stores commands as TOML: the prompt text goes into the prompt field

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/composio-community/awesome-claude-plugins/tree/HEAD/skill-bus/commands/add-sub.md

## When to use it
- 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
- /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.

## Similar
- [add-to-changelog](https://affpapa.org/en/nevibecode/commands/add-to-changelog.md) — command · 277 installs
- [matter-workspace](https://affpapa.org/en/nevibecode/skills/matter-workspace.md) — skill · 633 installs
- [context-save](https://affpapa.org/en/nevibecode/commands/context-save.md) — command · ★ 42780 repo stars
- [memory-compress](https://affpapa.org/en/nevibecode/commands/memory-compress.md) — command · ★ 1357 repo stars
- [handoff-continue](https://affpapa.org/en/nevibecode/commands/handoff-continue.md) — command · ★ 1357 repo stars
- [get-to-know](https://affpapa.org/en/nevibecode/commands/get-to-know.md) — command · ★ 406 repo stars

From the same set: [composio-community/awesome-claude-plugins](https://affpapa.org/en/nevibecode/by/composio-community/awesome-claude-plugins.md) — 68 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
