Commit Graph

5 Commits

Author SHA1 Message Date
OpenCode Test
73400a21ab Add UserPromptSubmit hook for context injection
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>
2026-01-04 12:34:39 -08:00
OpenCode Test
f07022ca60 Add SessionEnd hook for automatic session summarization
Implements automatic memory extraction when Claude Code sessions end:
- Add SessionEnd hook to hooks.json with 120s timeout
- Create session-end.sh wrapper that parses hook input and runs summarizer
- Create summarize-transcript.py that:
  - Loads transcript from Claude's storage
  - Skips trivial sessions (<3 user messages)
  - Extracts paths/facts via heuristics
  - Uses Claude CLI (subscription auth) for decisions/preferences
  - Saves to memory files with deduplication
  - Updates history index with summarized flag

Uses `claude -p --model haiku` for LLM extraction, leveraging
existing subscription credentials instead of requiring API key.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 14:17:51 -08:00
OpenCode Test
97497b97c2 Add documentation, PreCompact hook, gcal improvements, and marketplace
Documentation:
- Add commands/README.md documenting all slash commands
- Add skills/README.md documenting skill structure and patterns
- Add .claude-plugin/marketplace.json for local dev testing

Hooks:
- Add PreCompact hook to remind about context preservation
- Update hooks/README.md with new hook

GCal improvements:
- Add scripts/next_event.py for single event lookup
- Update SKILL.md with simplified format and allowed-tools: Read

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 11:52:04 -08:00
OpenCode Test
d4b4a088d3 Enhance hooks with session-start script and documentation
- Add hooks/scripts/session-start.sh that:
  - Checks for unsummarized sessions
  - Checks for pending decisions
  - Outputs context to session
- Update hooks.json to use the script
- Add hooks/README.md documenting hook events and configuration

This provides automatic context loading at session start.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 02:39:39 -08:00
OpenCode Test
05d1fa41ba Add hooks and refactor skills to use resources pattern
Phase 1 of plugin-structure refactor:

- Add hooks/hooks.json for SessionStart automation
- Refactor gmail skill:
  - Extract inline scripts to scripts/check_unread.py, check_urgent.py, search.py
  - Add references/query-patterns.md for query documentation
  - Simplify SKILL.md to reference scripts instead of inline code
- Add gcal/scripts/agenda.py for direct calendar access
- Make all scripts executable

This follows the "Skill with Bundled Resources" pattern from
developing-claude-code-plugins best practices.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 02:33:10 -08:00