summaryrefslogtreecommitdiff
path: root/hooks
AgeCommit message (Collapse)Author
2025-12-03Release v3.6.2: Fix Linux compatibility in polyglot hook wrapperv3.6.2Jesse Vincent
Fixed POSIX compatibility issue in hooks/run-hook.cmd that caused "Bad substitution" errors on Ubuntu/Debian systems where /bin/sh is dash. Changes: - Replaced bash-specific ${BASH_SOURCE[0]:-$0} with POSIX-compliant $0 - Tested with both bash and sh (POSIX mode) on macOS - Updated version to 3.6.2 in all required files Fixes #141
2025-12-01Release v3.6.1: Fix Windows arg forwarding in polyglot wrapperv3.6.1Jesse Vincent
- Add validation for missing script name - Forward up to 8 additional arguments to bash on Windows - Fixes CodeRabbit review feedback from #134
2025-12-01Add Windows support for plugin hooks (#134)Jesse Vincent
* feat: Add Windows support for session-start hook - Create polyglot session-start.cmd that works in both CMD and bash - Update hooks.json to use the .cmd polyglot launcher - Replace sed/awk with pure bash for JSON escaping (Windows compatibility) The polyglot script uses a heredoc trick: - CMD sees the @echo off block and runs bash.exe with cygpath conversion - Bash sees a heredoc and skips to the Unix section 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: Add execute permission to session-start.cmd for Unix 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * docs: Add comprehensive polyglot hooks documentation - Add docs/windows/polyglot-hooks.md explaining the cross-platform technique - Add reusable run-hook.cmd wrapper for parameterized hook execution - Document how the polyglot works in CMD vs bash - Include troubleshooting section and related GitHub issues 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * test: Add polyglot hook test script for macOS/Linux Run ./test-polyglot.sh from repo root to verify: - Required files exist with execute permissions - Simple wrapper (session-start.cmd) produces valid JSON - Parameterized wrapper (run-hook.cmd) works - Heredoc correctly skips CMD block on Unix 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: Use direct pipe to jq in test to avoid variable escaping issues 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor: Use single reusable run-hook.cmd for all hooks - Remove session-start.cmd in favor of run-hook.cmd - Update hooks.json to use: run-hook.cmd session-start.sh - Simplify test script to only test run-hook.cmd This makes it easy to add more hooks - just create the .sh file and add a line to hooks.json pointing to run-hook.cmd with the script name. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: Simplify run-hook.cmd CMD block Pass path directly to bash instead of using cygpath in a subshell. The complex quoting was causing issues on Windows. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * chore: Remove test-polyglot.sh Testing complete - polyglot hooks work on Windows and macOS. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
2025-10-31Optimize superpowers bootstrap to eliminate redundant skill executionJesse Vincent
- Update session-start hook to clarify that using-superpowers content is provided directly - Add explicit guidance to use Skill tool only for other skills - Prevents confusing loop where agents execute using-superpowers manually - Reduces overhead and improves user experience Fixes redundant skill execution in bootstrap workflow.
2025-10-16Strengthen the migration messageJesse Vincent
2025-10-16Update our bootstrap for first-party claude skillsJesse Vincent
2025-10-15Revert "Reapply "Move superpowers plugin into plugins/superpowers-bootstrap ↵Jesse Vincent
subdirectory"" This reverts commit 0fdea80a7d6b2e5d6b2d3e59ff2ca378ecd56cc0.
2025-10-15Reapply "Move superpowers plugin into plugins/superpowers-bootstrap ↵Jesse Vincent
subdirectory" This reverts commit d6ac9a8b5d5884413b194330653b6aa336d3c87a. turns out this worked. it's just that anthropic changed claude's startup hook output
2025-10-15Revert "Move superpowers plugin into plugins/superpowers-bootstrap subdirectory"Jesse Vincent
This reverts commit 809956f3bff3a9eb9891f08ce8dd41504e4a5af1.
2025-10-15Move superpowers plugin into plugins/superpowers-bootstrap subdirectoryJesse Vincent
This restructures the repo to support multiple plugins by moving the current plugin into a subdirectory. The plugin continues to be published as "superpowers" in the marketplace.
2025-10-12Fix session-start hook execution in plugin contextRyan Nelson
Fixes #8 - Use /bin/zsh fallback when BASH_SOURCE is unbound - Add || true to handle empty grep results gracefully Co-authored-by: ryancnelson <ryancnelson@users.noreply.github.com>
2025-10-11Move 'skills behind' warning to end of session start outputJesse Vincent
2025-10-11Add skills location info to session-start outputJesse Vincent
2025-10-11Remove obsolete setup-personal-superpowers call and github recommendation logicJesse Vincent
2025-10-11Remove obsolete setup-personal-superpowers hook (replaced by ↵Jesse Vincent
initialize-skills.sh)
2025-10-11Update hooks to use skills repository from ~/.config/superpowers/skillsJesse Vincent
Changes: - Set SUPERPOWERS_SKILLS_ROOT environment variable - Call lib/initialize-skills.sh to handle clone/fetch/notification - Update find-skills path to ${SUPERPOWERS_SKILLS_ROOT}/skills/using-skills/find-skills - Update using-skills path (renamed from getting-started) - Include initialization output in session start message - Update slash command paths to use SUPERPOWERS_SKILLS_ROOT Implements Task 7 from skills-repo-separation plan.
2025-10-10Show skills list and getting-started at session startJesse Vincent
Session start hook now: - Inlines full getting-started/SKILL.md content (no @ links in hooks) - Runs find-skills and shows complete skills list - Shows tool paths after the guide Getting-started improvements: - Removed "Just Read This Guide?" section (redundant with hook) - Removed "Last thing" announcement requirement - Tightened intro from ~80 to ~35 words - Simplified "How to Load Skills" section - Updated Workflow 2 to reference skills list shown at session start - Removed redundant find-skills path examples This eliminates friction - agents see all available skills immediately without needing to search first. No excuse for "I didn't want to spend time searching."
2025-10-10Inject skill tool paths via SessionStart hookJesse Vincent
The SessionStart hook now tells Claude the exact paths to find-skills and skill-run tools. Since hooks have CLAUDE_PLUGIN_ROOT expanded, the actual paths are injected into Claude's context. This solves the problem of CLAUDE_PLUGIN_ROOT not being available as a bash environment variable.
2025-10-10Add personal superpowers overlay systemJesse Vincent
Enables users to write and manage their own skills alongside core skills. ## Key Features: - Auto-setup on first session: Creates ~/.config/superpowers/ git repo - Two-tier skills: Personal skills shadow core skills when paths match - Environment variable support: PERSONAL_SUPERPOWERS_DIR, XDG_CONFIG_HOME - GitHub integration: Optional public repo creation for sharing skills - CLI-agnostic: Works across Claude Code, Codex CLI, Gemini CLI (future) ## Changes: - Added hooks/setup-personal-superpowers.sh - Auto-initializes personal repo - Updated hooks/session-start.sh - Runs setup, offers GitHub repo creation - Updated list-skills, skills-search - Search both personal and core skills - Renamed skills/meta/creating-skills → writing-skills - Added skills/meta/setting-up-personal-superpowers - Setup documentation - Added skills/meta/sharing-skills - Contribution workflow - Removed skills/meta/installing-skills - Old ~/.clank system - Removed all INDEX.md files - Replaced by list-skills tool - Updated README.md, getting-started - Document personal skills workflow ## Architecture: ~/.config/superpowers/skills/ # Personal (user-created, git-tracked) ${CLAUDE_PLUGIN_ROOT}/skills/ # Core (read-only, from plugin) Search order: Personal first, core second (first match wins)
2025-10-09Minimal bootstrap: just point to getting-started guideJesse Vincent
Everything is in the SKILL.md.
2025-10-09Simplify SessionStart hook to minimal bootstrapJesse Vincent
Just point to skills-search and getting-started guide. All details are in the SKILL.md itself.
2025-10-09Fix variable expansion and use @ referenceJesse Vincent
- Changed heredoc from single to double quotes for variable expansion - Added @ prefix to SKILL.md reference so Claude loads the file
2025-10-09Add clear and compact to SessionStart matcherJesse Vincent
2025-10-09Fix hooks.json structure: wrap in top-level 'hooks' keyJesse Vincent
2025-10-09Fix SessionStart hook: use command type with scriptJesse Vincent
- Changed from invalid 'type: json' to 'type: command' - Created session-start.sh script that outputs JSON - Script creates ~/.superpowers/ and injects context
2025-10-09Fix SessionStart hook: add hookEventName fieldJesse Vincent
The hookSpecificOutput requires hookEventName to be set.
2025-10-09Initial commit: Superpowers plugin v1.0.0Jesse Vincent
Core skills library as Claude Code plugin: - Testing skills: TDD, async testing, anti-patterns - Debugging skills: Systematic debugging, root cause tracing - Collaboration skills: Brainstorming, planning, code review - Meta skills: Creating and testing skills Features: - SessionStart hook for context injection - Skills-search tool for discovery - Commands: /brainstorm, /write-plan, /execute-plan - Data directory at ~/.superpowers/