Repository navigation
Feature: Add Hooks, Sound Notifications, and Commands/Skills Separation - #42
Merged
Merged
Conversation
Add new test coverage for the hooks and sound notification features: - hookLibrary.test.ts: 32 tests covering CRUD, global/project hooks, templates, export, sound hooks - soundLibrary.test.ts: 16 tests covering load, preview, upload, delete, command generation - hook.test.ts: 13 tests for hook type definitions and event types - sound.test.ts: 10 tests for sound utilities and presets 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add comprehensive hooks system for managing Claude Code hooks: ## Backend (Rust/Tauri) - Add sound_player service for cross-platform sound playback (macOS, Linux, Windows) - Add sounds command module with Tauri commands for sound operations - Extend hooks commands with sound notification hook creation - Add `dirs` crate dependency for home directory resolution ## Frontend (Svelte) - Add SoundHookWizard component for guided sound notification setup - Add SoundBrowser component for browsing system/custom sounds - Add SoundPicker component for sound selection in forms - Add HookExportModal for exporting hooks to JSON/clipboard - Add soundLibrary store for managing sounds state - Extend hookLibrary store with sound notification methods - Fix nested button HTML issues in sound components ## Tests - Add hookLibrary.test.ts (32 tests) - Add soundLibrary.test.ts (16 tests) - Add hook.test.ts (13 tests) - Add sound.test.ts (10 tests) ## Documentation - Update README with Hooks feature description - Add CLAUDE_CODE_HOOKS_REFERENCE.md with hook event documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add comprehensive skill name/description validation per official docs - Max 64 chars for name, 1024 for description - Lowercase letters, numbers, hyphens only - Reject reserved words (anthropic, claude) - Warn on content exceeding 500 lines - Fix hook templates to read input via stdin JSON (not env vars) - PreToolUse/PostToolUse receive tool_name, tool_input via stdin - Updated all template commands to use `jq` for JSON parsing - Fix SessionStart hook event type (was incorrectly "Notification") - Update Tauri capability schemas 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Commands are user-invoked slash commands stored as single .md files: - Storage: .claude/commands/name.md - Invocation: /command-name - Fields: argumentHint for usage hints Skills are agent-invocable prompts stored as directories: - Storage: .claude/skills/name/SKILL.md (with supporting files) - Invocation: Claude auto-invokes based on context - Fields: disableModelInvocation to require manual invocation Changes: - Add Command types, store, components, and /commands route - Add commands.rs backend with CRUD and assignment operations - Add command_writer.rs for file sync - Update Skills to remove command-specific fields - Add Commands tab to GlobalSettings - Add Commands stat card to Dashboard - Update README with accurate structure 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds comprehensive hooks management, sound notification capabilities, skill validation, and separates Commands from Skills into distinct entities.
Commands/Skills Separation
Commands and Skills are now properly separated to reflect their distinct purposes:
Commands (Slash Commands):
/command-name.mdfiles in.claude/commands/argumentHintfor usage guidanceSkills (Agent Skills):
SKILL.md+ supporting files in.claude/skills/disableModelInvocationoptionHooks Management
Sound Notifications
Sound Playback (Cross-Platform)
afplaypaplay(PulseAudio) oraplay(ALSA)Media.SoundPlayerSkill Validation (per official Claude Code docs)
<or>charactersFiles Changed
Commands Feature (New)
src-tauri/src/commands/commands.rssrc-tauri/src/services/command_writer.rs.claude/commands/src/lib/types/command.tssrc/lib/stores/commandLibrary.svelte.tssrc/lib/components/commands/*.sveltesrc/routes/commands/+page.svelteBackend (Rust)
src-tauri/src/services/sound_player.rssrc-tauri/src/commands/sounds.rssrc-tauri/src/commands/hooks.rssrc-tauri/src/commands/skills.rssrc-tauri/src/services/hook_writer.rssrc-tauri/src/db/schema.rssrc-tauri/src/db/models.rsFrontend (Svelte)
src/lib/components/sounds/*.sveltesrc/lib/components/hooks/SoundHookWizard.sveltesrc/lib/components/hooks/HookExportModal.sveltesrc/lib/components/skills/*.sveltesrc/lib/components/global/GlobalSettings.sveltesrc/routes/+page.svelteDocumentation
README.mdCLAUDE_CODE_HOOKS_REFERENCE.mdTest Plan
cargo test- 636 tests)npm test- 196 tests)🤖 Generated with Claude Code