Add UserPromptSubmit hook for context injection #2

Closed
will wants to merge 0 commits from feature/user-prompt-context-injection into main
Owner

Injects contextual information when user submits a prompt:

  • Current time with period (morning/afternoon/evening/night)
  • Git branch if in a repository
  • Relevant memory items based on prompt keywords (2+ matches)
  • Pending decisions needing attention

Design:

  • Skips short prompts (<10 chars) to not slow down commands
  • 5s timeout to keep prompts responsive
  • Lightweight keyword matching for memory relevance

Also updates general-instructions.json with git workflow notes.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com

Injects contextual information when user submits a prompt: - Current time with period (morning/afternoon/evening/night) - Git branch if in a repository - Relevant memory items based on prompt keywords (2+ matches) - Pending decisions needing attention Design: - Skips short prompts (<10 chars) to not slow down commands - 5s timeout to keep prompts responsive - Lightweight keyword matching for memory relevance Also updates general-instructions.json with git workflow notes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
will added 1 commit 2026-01-04 20:36:13 +00:00
Injects contextual information when user submits a prompt:
- Current time with period (morning/afternoon/evening/night)
- Git branch if in a repository
- Relevant memory items based on prompt keywords (2+ matches)
- Pending decisions needing attention

Design:
- Skips short prompts (<10 chars) to not slow down commands
- 5s timeout to keep prompts responsive
- Lightweight keyword matching for memory relevance

Also updates general-instructions.json with git workflow notes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
will closed this pull request 2026-01-04 20:40:52 +00:00
will deleted branch feature/user-prompt-context-injection 2026-01-04 20:41:24 +00:00

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: will/claude-code#2
No description provided.