new-sdk-app
CommandCreate and setup a new Claude Agent SDK application
Subscribe to a skill event. Adds a subscription that injects context before or after a skill runs. Supports optional conditions at both insert-level (inherited) and subscription-level (AND-stacked).
> /plugin marketplace add composio-community/awesome-claude-plugins
description: Subscribe to a skill event. Adds a subscription that injects context before or after a skill runs. Supports optional conditions at both insert-level (inherited) and subscription-level (AND-stacked).
**Announce:** "[skill-bus] Adding subscription."
Ask the user using AskUserQuestion:
**"What scope for this subscription?"**
Run the skill discovery script to show available skills:
SB_CLI=$(ls ~/.claude/plugins/cache/*/skill-bus/*/lib/cli.py ~/.claude/plugins/repos/skill-bus/lib/cli.py 2>/dev/null | tail -1) python3 "$SB_CLI" skills --cwd "$PWD"
Display the output to the user, then ask: **"Which skill(s) to subscribe to?"**
If the user enters a `*` wildcard pattern, warn them: > "Wildcard subscriptions match many skills and add context tokens on every match. Are you sure?"
Ask using AskUserQuestion: **"When should this fire?"**
Show existing inserts for the selected scope:
Set `SCOPE` to the user's choice from Step 1 (`global` or `project`), then run:
SB_CLI=$(ls ~/.claude/plugins/cache/*/skill-bus/*/lib/cli.py ~/.claude/plugins/repos/skill-bus/lib/cli.py 2>/dev/null | tail -1) SCOPE="global" # or "project" — set from Step 1 python3 "$SB_CLI" inserts --scope "$SCOPE" --cwd "$PWD"
Display the output.
Ask: **"Which insert to attach?"**
**If "Create new":** 1. Ask for insert name (slug format, e.g., `deploy-guard`) 2. **Name existence check:** If an insert with that name already exists in the target scope, refuse: "Insert '{name}' already exists. Use the existing one, or choose a different name." Offer to link to the existing insert instead. 3. Ask for insert text (the context to inject) 4. Check text length — if >200 chars (~50 tokens), warn: > "This insert is fairly long (~N tokens). Proceed?" 5. Save insert to the `inserts` object in the target config
**If existing insert:** Proceed to Step 5.
**Check if the selected insert has insert-level conditions.** If it does, show:
Insert 'compound-knowledge' has insert-level conditions:
- fileExists("docs/")
These are inherited by this subscription (AND-stacked with any subscription conditions you add).
To opt out of inherited conditions, choose "Opt out" below.Ask using AskUserQuestion: **"Add subscription-level conditions?"**
If the insert has no conditions, simplify to: **"Add conditions? (subscription only fires when ALL conditions pass)"**
**If "Add conditions":**
Present the available condition types:
Condition types:
1. fileExists — File or directory exists (relative to project root)
Example: "docs/plans/"
2. gitBranch — Current branch matches pattern
Example: "feature/*"
3. envSet — Environment variable is set and non-empty
Example: "CI"
4. envEquals — Environment variable equals a specific value
Example: NODE_ENV = "development"
5. fileContains — File contains a string (or regex with "regex": true)
Example (literal): package.json contains "prisma"
Example (regex): package.json matches "prisma.*\d+\.\d+"Ask: **"Which condition type?"**
Then ask for the value based on the type:
After each condition, ask using AskUserQuestion: **"Add another condition? (AND logic — all must pass)"**
**If "Wrap in NOT":** Wrap the most recent condition in `{"not": {...}}`. Show the updated condition. Then ask again if they want to add more.
**If "Opt out of insert conditions":** Set `"inheritConditions": false` on the subscription. Then ask if they want to add subscription-level conditions (same flow as "Add conditions" above).
Check if the `insert+on+when` tuple already exists in the target scope. If duplicate: show "This subscription already exists: {insert} -> {skill} [{timing}]. Nothing to add." and stop.
Note: Two subscriptions with the same `insert+on+when` but different conditions ARE considered duplicates. Conditions modify behavior, not identity. If the user wants different conditions for the same insert+skill, they should create a differently-named insert.
Create the subscription object:
Without conditions:
{"insert": "<name>"A curated list of Plugins that let you extend Claude Code with custom commands, agents, hooks, and MCP servers through the plugin system.
Create and setup a new Claude Agent SDK application
This file contains detailed agent coordination for `/audit-project`.
This file contains GitHub integration for `/audit-project`.
Multi-agent code review with iterative improvement
Streamlines bug fixing by creating a GitHub issue first, then a feature branch for implementing and thoroughly testing the…
Perform a comprehensive code review of recent changes
Reviewed all command files in `.claude/commands/analysis/` directory to ensure proper usage of: - `mcp__claude-flow__*` tools…
This compatibility command keeps `/oh-my-claudecode:ask` available without loading the full `ask` skill description in every…