anthropics / anthropics/claude-plugins-official

docs(hook-development): tool_result should be tool_response

Ouverte Adaptée aux débutants
#4,328 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Python
Étoiles
36.3k
Forks
4.1k
Merge moyen
2 j 14 h
PR mergées (30 j)
539

Description

## Bug

`plugins/plugin-dev/skills/hook-development/SKILL.md`, "Hook Input Format":

```md
**Event-specific fields:**

- **PreToolUse/PostToolUse:** `tool_name`, `tool_input`, `tool_result`
```

`PostToolUse` never receives a `tool_result` field. Per the [official hooks reference](https://code.claude.com/docs/en/hooks#posttooluse-input):

> `PostToolUse` hooks fire after a tool has already executed successfully. The input includes both `tool_input`, the arguments sent to the tool, and `tool_response`, the result it returned.

A hook written against this doc (`input_data.get("tool_result")`) silently gets nothing.

## Fix

```diff
- **PreToolUse/PostToolUse:** `tool_name`, `tool_input`, `tool_result`
+ **PreToolUse:** `tool_name`, `tool_input`
+ **PostToolUse:** `tool_name`, `tool_input`, `tool_response`
```

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Open plugins/plugin-dev/skills/hook-development/SKILL.md and read the “Hook Input Format” section alongside the linked PostToolUse reference. Separate the PreToolUse and PostToolUse field lists so PostToolUse names tool_response, then verify the documentation no longer claims that PostToolUse receives tool_result.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Domaine
documentation
Type d'issue
Documentation
Difficulté
1/5
Temps estimé
Moins d'une heure
Activité
Calme
Clarté
Clairement spécifiée
Accessibilité débutants
76/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.