Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
feat(skill): Add Claude Code hooks for worktrunk status
Maximilian Roos046f2a5ea22a
diff --git a/.claude-plugin/hooks/hooks.json b/.claude-plugin/hooks/hooks.jsonnew file mode 100644index 000000000..61090b53a--- /dev/null+++ b/.claude-plugin/hooks/hooks.json@@ -0,0 +1,36 @@+{+ "hooks": {+ "UserPromptSubmit": [+ {+ "hooks": [+ {+ "type": "command",+ "command": "git branch --show-current 2>/dev/null | xargs -I {} git config worktrunk.status.{} 🤖"+ }+ ]+ }+ ],+ "Stop": [+ {+ "matcher": "",+ "hooks": [+ {+ "type": "command",+ "command": "git branch --show-current 2>/dev/null | xargs -I {} git config worktrunk.status.{} 💬"+ }+ ]+ }+ ],+ "SessionEnd": [+ {+ "matcher": "",+ "hooks": [+ {+ "type": "command",+ "command": "git branch --show-current 2>/dev/null | xargs -I {} git config --unset worktrunk.status.{} 2>/dev/null || true"+ }+ ]+ }+ ]+ }+}diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.jsonindex 2c7a25526..a9a522394 100644--- a/.claude-plugin/marketplace.json+++ b/.claude-plugin/marketplace.json@@ -15,7 +15,7 @@"source": "./","strict": false,"skills": [- "./skills/worktrunk-config"+ "./.claude-plugin/skills/worktrunk"]}]diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.jsonindex ad05b6be9..36ec27533 100644--- a/.claude-plugin/plugin.json+++ b/.claude-plugin/plugin.json@@ -4,5 +4,6 @@"version": "1.0.0","author": {"name": "Worktrunk"- }+ },+ "hooks": "./.claude-plugin/hooks/hooks.json"}diff --git a/skills/worktrunk-config/README.md b/.claude-plugin/skills/worktrunk/README.mdsimilarity index 100%rename from skills/worktrunk-config/README.mdrename to .claude-plugin/skills/worktrunk/README.mddiff --git a/skills/worktrunk-config/SKILL.md b/.claude-plugin/skills/worktrunk/SKILL.mdsimilarity index 100%rename from skills/worktrunk-config/SKILL.mdrename to .claude-plugin/skills/worktrunk/SKILL.mddiff --git a/skills/worktrunk-config/reference/hook-types-reference.md b/.claude-plugin/skills/worktrunk/reference/hook-types-reference.mdsimilarity index 100%rename from skills/worktrunk-config/reference/hook-types-reference.mdrename to .claude-plugin/skills/worktrunk/reference/hook-types-reference.mddiff --git a/skills/worktrunk-config/reference/project-config.md b/.claude-plugin/skills/worktrunk/reference/project-config.mdsimilarity index 100%rename from skills/worktrunk-config/reference/project-config.mdrename to .claude-plugin/skills/worktrunk/reference/project-config.mddiff --git a/skills/worktrunk-config/reference/user-config.md b/.claude-plugin/skills/worktrunk/reference/user-config.mdsimilarity index 100%rename from skills/worktrunk-config/reference/user-config.mdrename to .claude-plugin/skills/worktrunk/reference/user-config.mddiff --git a/README.md b/README.mdindex 82c7430a7..40a1c9955 100644--- a/README.md+++ b/README.md@@ -418,7 +418,15 @@ The custom emoji appears directly after the git status symbols.Claude Code can automatically set/clear emoji status when coding sessions start and end. This shows which branches have active AI sessions.-Add to `~/.claude/settings.json`:+**Easy setup:** Install the Worktrunk Claude Code plugin which includes these hooks automatically:+<!-- [Worktrunk Claude Code plugin](https://github.com/max-sixty/worktrunk) -->++```bash+cd ~/.claude/plugins/marketplaces+git clone https://github.com/max-sixty/worktrunk.git worktrunk-skills+```++**Manual setup:** Alternatively, add to `~/.claude/settings.json`:```json{