feat: add UserPromptSubmit hook for context-related skill activation#15
Merged
Nathan Schram (nathanschram) merged 2 commits intomainfrom Mar 15, 2026
Merged
Conversation
Add "out-of-date", "refresh stale CLAUDE.md", and "move MEMORY.md" trigger phrases to disambiguate ai-context from context-verify when users ask about updating or fixing context files vs just checking them. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds context-forced-eval.sh — a keyword-gated UserPromptSubmit hook that injects skill evaluation instructions when prompts match context-related keywords or slash commands. Skips silently on unrelated prompts and in Untether sessions. Includes full test coverage (Section 7), CODEOWNERS, gitignore for dev artifacts, and documentation updates across AGENTS.md, SKILL.md, context-guard command, llms.txt, and the update-installed-hooks script. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (13)
📝 WalkthroughWalkthroughA new UserPromptSubmit hook is introduced that activates on user prompts to detect context-related keywords and inject skill evaluation context. Hook registration, installation logic, tests, and documentation are updated across the codebase. Skill descriptions clarify scope for ai-context and context-guard. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Comment |
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
context-forced-eval.sh— a newUserPromptSubmithook that keyword-gates context-related prompts and injects skill evaluation instructions, improving NL trigger activation for ContextDocs skillsUserPromptSubmiteventCODEOWNERS,.gitignorefor dev artifacts, and_typos.tomlentry for hook regex patternsFiles changed
hooks/context-forced-eval.sh.claude/hooks/context-forced-eval.sh.claude/skills/context-guard/SKILL.mdAGENTS.mdCHANGELOG.mdcommands/context-guard.mdllms.txtscripts/update-installed-hooks.shtests/test-hooks.sh.github/CODEOWNERS.gitignore_typos.tomlpromotpartial matchTest plan
bash tests/test-hooks.sh— 116/116 passbash tests/check-token-budgets.sh— 0 warningsbash tests/validate-llms-txt.sh— 0 errors🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes
Tests