---
name: qf-hook
description: "Toggle the Qualflare Stop hook on or off. The Stop hook is a passive nudge that suggests /qf-cover after sessions where source files changed without test updates. Pass 'on' or 'off'."
argument-hint: "on|off"
allowed-tools: Read Write Edit
---
## Paths and arguments
Resolve these once, before Step 1, and use the absolute values everywhere below. Quote them in shell commands.
- **Qualflare context:** the line starting `Qualflare context:` that this session's Qualflare integration provides. Its JSON has `project_root`, `qualflare_root`, `instructions_file` and `invoke`.
- `<project-root>`: `project_root` from the context. Without a context line: the nearest directory, from the current working directory up to the top of its Git worktree, that contains `.qualflare/test-state.md`; otherwise the current working directory.
- `<qualflare-root>`: `qualflare_root` from the context. Without a context line: the directory two levels above this `SKILL.md` after resolving symlinks (`realpath`). Your host may show this skill's symlink path or its target; both resolve to the same install.
- Skills below are written as `/` plus the full skill name, e.g. `/qf-cover`. When telling the user how to run one, take the context's `invoke` pattern and replace `<name>` with the full skill name: `$qualflare:<name>` becomes `$qualflare:qf-cover`, `@<name>` becomes `@qf-cover`, `/skill:<name>` becomes `/skill:qf-cover`. If the pattern starts with `@`, tell them to pick the skill from the `@` list (typing the name alone does not load it), e.g. "pick @qf-cover from the @ list". Without a context line, keep the `/qf-cover` form.
- If this text still contains a literal dollar-sign `ARGUMENTS` placeholder, it means the text the user typed after the skill name (empty if none).
Update `<project-root>/.qualflare/config.json` to set `stopHookEnabled` based on the argument:
- If $ARGUMENTS is "on" or "yes" (case-insensitive): set `stopHookEnabled: true`. Confirm: "Stop hook is now **on** ✅ — you'll get a nudge after sessions where source files change without test updates."
- If $ARGUMENTS is "off" or "no" (case-insensitive): set `stopHookEnabled: false`. Confirm: "Stop hook is now **off** ⏹ — run `/qf-hook on` to re-enable."
- If $ARGUMENTS is empty or unrecognized: print current status in this format:
```
Stop hook: ✅ enabled (or ❌ disabled)
Usage:
/qf-hook on — enable the post-session nudge
/qf-hook off — disable the post-session nudge
```
If `<project-root>/.qualflare/config.json` does not exist:
- When toggling (on/off): create it with `{ "version": 1, "stopHookEnabled": <value> }` and confirm normally.
- When showing status (no args): print "Stop hook: ❌ not configured — run `/qf-init` to set up, or `/qf-hook on` to enable directly."
— ‹guest · 2026-12-03› —
این نسخه با نشانهگذاری اختصاصی حساب شما نمایش داده میشود. برای نصب سریع، به تب نصب و راهاندازی بروید.