From ad003cf14c91bb8e2be4bd1a05366eadeb1ee49d Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 21 Dec 2025 10:02:59 +0000 Subject: [PATCH 1/3] Add SessionStart hook to auto-load expectations skill - Created .claude/settings.json in core plugin with SessionStart hook - Hook provides context to encourage loading of expectations skill at session start - Displays message about TDD principles and documentation standards - Bumped core plugin version to 1.8.0 The hook uses a SessionStart matcher to output guidance text that encourages Claude to load the expectations skill, providing users with immediate context about project standards and TDD requirements. --- plugins/core/.claude-plugin/plugin.json | 2 +- plugins/core/.claude/settings.json | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 plugins/core/.claude/settings.json diff --git a/plugins/core/.claude-plugin/plugin.json b/plugins/core/.claude-plugin/plugin.json index 9bba024..14136b8 100644 --- a/plugins/core/.claude-plugin/plugin.json +++ b/plugins/core/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "core", - "version": "1.7.3", + "version": "1.8.0", "description": "Core Agents and skills that aid software development workflows", "author": { "name": "Adam Bulmer", diff --git a/plugins/core/.claude/settings.json b/plugins/core/.claude/settings.json new file mode 100644 index 0000000..c8702bb --- /dev/null +++ b/plugins/core/.claude/settings.json @@ -0,0 +1,15 @@ +{ + "hooks": { + "SessionStart": [ + { + "matcher": "*", + "hooks": [ + { + "type": "command", + "command": "cat <<'EOF'\n\nšŸ“‹ Loading core:expectations skill for this session...\n\nThis project follows TDD principles and documentation standards.\nThe expectations skill provides guidelines for:\n- Test-Driven Development (TDD)\n- Code change principles\n- Documentation framework\n- Communication standards\n\nPlease load the expectations skill to understand project expectations.\nEOF" + } + ] + } + ] + } +} From f00a8a372cea57c7e6e991e0c0a77c5329b0b594 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 21 Dec 2025 10:08:47 +0000 Subject: [PATCH 2/3] Update SessionStart hook to use prompt-based injection - Changed hook type from "command" to "prompt" (similar to github.com/anthropics/claude-code/issues/12117) - Removed explicit matcher (defaults to all SessionStart events) - Prompt directly instructs Claude to load the expectations skill via Skill tool - More direct context injection compared to command output This approach follows the pattern shown in the referenced issue, using prompt-based hooks to inject instructions directly into Claude's context at session start, which should be more reliable than command-based output. --- plugins/core/.claude/settings.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/core/.claude/settings.json b/plugins/core/.claude/settings.json index c8702bb..8248adb 100644 --- a/plugins/core/.claude/settings.json +++ b/plugins/core/.claude/settings.json @@ -2,11 +2,10 @@ "hooks": { "SessionStart": [ { - "matcher": "*", "hooks": [ { - "type": "command", - "command": "cat <<'EOF'\n\nšŸ“‹ Loading core:expectations skill for this session...\n\nThis project follows TDD principles and documentation standards.\nThe expectations skill provides guidelines for:\n- Test-Driven Development (TDD)\n- Code change principles\n- Documentation framework\n- Communication standards\n\nPlease load the expectations skill to understand project expectations.\nEOF" + "type": "prompt", + "prompt": "This project uses the core:expectations skill. Load this skill now using the Skill tool to understand the project's TDD principles, code change guidelines, documentation framework, and communication standards. The expectations skill is essential for all work in this codebase." } ] } From 4a21bd78910e923238e8d46d99dcb1c3e41448e8 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 21 Dec 2025 10:49:00 +0000 Subject: [PATCH 3/3] Fix hook structure to use proper plugin hooks directory BREAKING: Moved hook from .claude/settings.json to hooks/hooks.json - Removed plugins/core/.claude/settings.json (incorrect location) - Created plugins/core/hooks/hooks.json (correct plugin hook distribution) - Wrapped hook config in "hooks" key as per plugin standards - Added description field for plugin hook metadata The hooks/hooks.json location ensures the SessionStart hook is automatically distributed to users when they install the core plugin, rather than only affecting local development environment. This follows the official Claude Code plugin structure where hooks must be in hooks/hooks.json at the plugin root to be properly distributed. --- plugins/core/{.claude/settings.json => hooks/hooks.json} | 1 + 1 file changed, 1 insertion(+) rename plugins/core/{.claude/settings.json => hooks/hooks.json} (82%) diff --git a/plugins/core/.claude/settings.json b/plugins/core/hooks/hooks.json similarity index 82% rename from plugins/core/.claude/settings.json rename to plugins/core/hooks/hooks.json index 8248adb..49037cf 100644 --- a/plugins/core/.claude/settings.json +++ b/plugins/core/hooks/hooks.json @@ -1,4 +1,5 @@ { + "description": "Core plugin hooks for auto-loading the expectations skill at session start", "hooks": { "SessionStart": [ {