Skip to content

Commit 1eb310f

Browse files
author
bgagent
committed
feat: hook
1 parent 28b92ce commit 1eb310f

3 files changed

Lines changed: 23 additions & 0 deletions

File tree

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ The `--plugin-dir` flag tells Claude Code to load the local plugin from the `doc
106106
| `cdk-expert` | CDK architecture, construct design, handler implementation, stack modifications |
107107
| `agent-debugger` | Task failure investigation, CloudWatch log analysis, agent runtime debugging |
108108

109+
**Hook** (runs automatically):
110+
111+
A `SessionStart` hook advertises available skills and agents so Claude can proactively suggest them when your request matches.
112+
109113
#### Local plugin development
110114

111115
If you're modifying the plugin itself, here's the file layout:
@@ -124,12 +128,15 @@ docs/abca-plugin/
124128
agents/
125129
cdk-expert.md # CDK infrastructure specialist
126130
agent-debugger.md # Task failure debugger
131+
hooks/
132+
hooks.json # SessionStart capability advertisement
127133
```
128134

129135
**Key conventions:**
130136
- The plugin lives under `docs/` to keep documentation and plugin content colocated
131137
- Skills live in subdirectories with a `SKILL.md` file (not flat `.md` files)
132138
- Agents are flat `.md` files with YAML frontmatter
139+
- The hook advertises plugin capabilities only (no project-specific content)
133140

134141
**After editing plugin files**, restart Claude Code with `claude --plugin-dir docs/abca-plugin` to pick up changes.
135142

docs/abca-plugin/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ Or add to your project's `.claude/settings.json`:
3737
| `cdk-expert` | Sonnet | AWS CDK infrastructure expert for construct design, handler implementation, and stack modifications |
3838
| `agent-debugger` | Sonnet | Read-only debugging specialist for task failures, preflight errors, and CloudWatch log analysis |
3939

40+
### Hook
41+
42+
- **SessionStart** — Advertises available skills and agents so Claude can proactively suggest them when your request matches.
43+
4044
## Plugin Structure
4145

4246
```
@@ -45,6 +49,8 @@ docs/abca-plugin/
4549
agents/
4650
cdk-expert.md # CDK infrastructure agent
4751
agent-debugger.md # Runtime debugging agent
52+
hooks/
53+
hooks.json # SessionStart capability advertisement
4854
skills/
4955
setup/SKILL.md # First-time setup workflow
5056
deploy/SKILL.md # CDK deployment management

docs/abca-plugin/hooks/hooks.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"hooks": {
3+
"SessionStart": [
4+
{
5+
"type": "prompt",
6+
"prompt": "The ABCA plugin is active. Available skills:\n- /setup — first-time setup walkthrough\n- /deploy — deploy, diff, or destroy the CDK stack\n- /onboard-repo — add a GitHub repository\n- /submit-task — submit a coding task with prompt coaching\n- /troubleshoot — diagnose deployment, auth, or task issues\n- /abca-status — quick platform health check\n- /abca-submit — shortcut for rapid task submission\n\nAvailable agents: cdk-expert (CDK infrastructure), agent-debugger (task failure investigation).\n\nSuggest relevant skills when the user's request matches."
7+
}
8+
]
9+
}
10+
}

0 commit comments

Comments
 (0)