feat(hooks): detect from prompt not files

- Replace command-based SessionStart/PreToolUse hooks with prompt-based Stop hook
- Stop hook reads user's prompt and activates relevant skills concept-based
- Remove obsolete detect-project.sh, detect-file-type.sh, setup-hooks.sh
- Detection is concept-based regardless of spoken language
This commit is contained in:
asepharyana
2026-07-25 13:03:38 +07:00
parent 8af189167d
commit 082c8bc5b5
3 changed files with 3 additions and 105 deletions
+3 -12
View File
@@ -1,18 +1,9 @@
{
"hooks": {
"SessionStart": [{
"Stop": [{
"hooks": [{
"type": "command",
"command": "bash \"$CLAUDE_PLUGIN_ROOT/hooks/scripts/detect-project.sh\"",
"timeout": 10
}]
}],
"PreToolUse": [{
"matcher": "Write|Edit",
"hooks": [{
"type": "command",
"command": "bash \"$CLAUDE_PLUGIN_ROOT/hooks/scripts/detect-file-type.sh\" \"$TOOL_INPUT\"",
"timeout": 10
"type": "prompt",
"prompt": "--- skill detect ---\nRead the user's prompt. Detect what language, framework, tool, or topic they are asking about. If it matches any hub-guide skill concept (see available skills), activate that skill's rules for your response.\n\nDetection is concept-based, not keyword-based — works regardless of what language the user speaks.\n---"
}]
}]
}