Skills teach, hooks check: how my AI agent's skills and guardrails work together
Описание и применение
Скрипты‑хуки проверяют выполнение навыков, обеспечивая, чтобы агенты завершали задачи с доказательствами, повышая надёжность и соблюдение правил.
Задача
Agents often treat skills and hooks as separate, leading to unverified actions and incomplete guardrails.
Результат
By pairing each skill with a corresponding hook that verifies its execution, agents consistently complete tasks with documented proof, reducing errors and ensuring adherence to design and code quality standards.
Рабочий процесс
- Define skills that teach methods and best practices.
- Create hooks that check each skill’s completion and enforce rules.
- Integrate hooks at five session moments: SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, Stop.
- Use skill-router and prompt-router to load only relevant skill sections.
- Apply hooks like front-skill-reminder, code-hygiene, stop-guard to enforce design, code quality, and verification before finishing.
- Iterate and refine hooks to cover all critical rules.
- Deploy the combined skill-hook system in projects.
- Monitor hook outputs and agent behavior for continuous improvement.
Доказательства
A skill on its own is advice: the agent reads it when it remembers to, follows it when it's convenient.
Every important skill has a hook that checks it, and every hook points back to the skill that explains how to get past it.
stop-guard connects them. When the agent tries to finish, it checks: did this session edit code? Is there a verification mark after the last edit?
- Дата записи: 2026-10-12T11:56:02.994Z