Documentation
¶
Index ¶
- func InstallClaudeHook(configPath, endpoint, apiKey, scriptPath string) error
- func InstallForAgent(agentName, configPath, endpoint, apiKey, scriptPath string) error
- func UninstallClaudeHook(configPath string) error
- func UninstallForAgent(agentName, configPath string) error
- func WriteCursorStopScript(skaalDir string) (string, error)
- func WriteHookScript(skaalDir string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InstallClaudeHook ¶
InstallClaudeHook reads configPath (or starts with an empty object), inserts or updates the single skael-managed PreToolUse hook, and writes the file back.
Hook structure:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Skill",
"hooks": [
{
"type": "command",
"command": "SKAEL_AGENT=claude-code SKAEL_ENDPOINT=... SKAEL_API_KEY=... <scriptPath>",
"_managed_by": "skael"
}
]
}
]
}
}
func InstallForAgent ¶
InstallForAgent calls the appropriate installer based on agentName.
func UninstallClaudeHook ¶
UninstallClaudeHook removes all hook entries tagged with _managed_by=skael from configPath and writes the cleaned file back. Empty arrays/objects are pruned.
func UninstallForAgent ¶
UninstallForAgent calls the appropriate uninstaller based on agentName.
func WriteCursorStopScript ¶
func WriteHookScript ¶
WriteHookScript creates ~/.skael/hooks/ and writes skael-hook.sh with 0755 permissions. It returns the full path to the written script.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.