Documentation Index
Fetch the complete documentation index at: https://docs.selftune.dev/llms.txt
Use this file to discover all available pages before exploring further.
Overview
selftune does not install the same hook set on every runtime.| Platform | Install path | Prompt logging | Guards | Session telemetry | Notes |
|---|---|---|---|---|---|
| Claude Code | selftune init | Yes | Yes, including blocking guard exits | Yes | Deepest integration |
| Codex | selftune codex install | Yes, via SessionStart | Yes | Yes | Experimental |
| OpenCode | selftune opencode install | No | Advisory only | Yes | Experimental; no prompt-submit event |
| Pi | selftune pi install | Yes | Yes | Yes | Experimental; judge/evolve use pi -p, optimizer agents are inlined |
| Cline | selftune cline install | No | No | Yes | Experimental; post-tool and task lifecycle only |
| OpenClaw | — | No | No | No | Ingest and cron only |
Claude Code hook reference
prompt-log
- Event:
UserPromptSubmit - Purpose: Logs every user query to SQLite
- Performance: < 5ms per invocation
- Extra: Detects improvement signals via regex (e.g., “why didn’t you use X?“)
auto-activate
- Event:
UserPromptSubmit - Purpose: Evaluates activation rules and surfaces suggestions
- Fires: At most once per session per rule
skill-change-guard
- Event:
PreToolUse(Write, Edit) - Purpose: Prevents unreviewed changes to SKILL.md files
- Behavior: Blocks the tool call if the target is a SKILL.md that selftune manages and no review has been recorded
evolution-guard
- Event:
PreToolUse(Write, Edit) - Purpose: Blocks conflicting manual edits during active evolution runs
- Behavior: If an evolution is in progress for a skill, prevents manual edits to that skill’s SKILL.md
skill-eval
- Event:
PostToolUse(Read) - Purpose: Tracks when skills are read/triggered and classifies the invocation type (explicit, implicit, contextual)
session-stop
- Event:
Stop - Purpose: Captures end-of-session telemetry (query count, trigger count, miss count)
- Extra: Spawns a focused background orchestrate run if improvement signals were detected during the session
Manual hook management
Claude Code hooks are installed automatically byselftune init. To run a hook manually:
prompt-log, session-stop, skill-eval, auto-activate, skill-change-guard, evolution-guard