@goodfoot/claude-code-hooks 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,7 +14,11 @@ Run:
|
|
|
14
14
|
|
|
15
15
|
then:
|
|
16
16
|
|
|
17
|
-
`claude
|
|
17
|
+
`claude "Load the 'claude-code-hooks:sdk' skill then scaffold a new hook package in ./packages/hooks that outputs to '.claude/hooks/hooks.json' and contains an example SessionStart hook."`
|
|
18
|
+
|
|
19
|
+
later:
|
|
20
|
+
|
|
21
|
+
`claude plugin uninstall claude-code-hooks@goodfoot`
|
|
18
22
|
|
|
19
23
|
## ⚡ Quick Start
|
|
20
24
|
|
|
@@ -177,9 +181,9 @@ Input properties use the wire format (snake_case) directly for consistency.
|
|
|
177
181
|
```typescript
|
|
178
182
|
// Claude sends: { "file_path": "src/main.ts", "tool_name": "Read" }
|
|
179
183
|
// You receive:
|
|
180
|
-
export default preToolUseHook({}, async (input) => {
|
|
181
|
-
|
|
182
|
-
|
|
184
|
+
export default preToolUseHook({}, async (input, { logger }) => {
|
|
185
|
+
logger.info('Tool received', { tool: input.tool_name }); // "Read"
|
|
186
|
+
logger.debug('Tool input', { input: input.tool_input }); // { file_path: "src/main.ts" }
|
|
183
187
|
});
|
|
184
188
|
```
|
|
185
189
|
|