Reading: Qwen Code Hook Examples

Lesson 1 of 5 in module «Qwen Code Hook Examples»
You are viewing the lesson without signing in. Sign in to save progress and take tests.

Qwen Code Hook Examples

These files relate to part 17 of the tutorial.

  • settings-workflow.example.json — an example of connecting three hooks.
  • pre_tool_guard.py — blocks several obviously dangerous commands before launching Bash.
  • log_tool_result.py — writes a compact log of tool events to .qwen/hooks/logs/tool-events.jsonl.
  • inject_sdd_context.py — adds a short reminder about project SDD files.

Copy the scripts to .qwen/hooks/, make them executable, and manually merge the settings example with your .qwen/settings.json.

My notes
0 / 10000

Notes are saved in this browser. They will not appear on another device.

Course menu

Course

Specification-Driven Development with Qwen Code CLI
Progress 0 / 135