Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Skills teach, hooks check: how my AI agent's skills and guardrails work together

Description and use

Hooks verify skill execution, ensuring agents finish tasks with proof, improving reliability and rule compliance.

Problem

Agents often treat skills and hooks as separate, leading to unverified actions and incomplete guardrails.

Outcome

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.

Workflow

  • 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.

Evidence

A skill on its own is advice: the agent reads it when it remembers to, follows it when it's convenient.

Source

Every important skill has a hook that checks it, and every hook points back to the skill that explains how to get past it.

Source

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?

Source

  • Record date: 2026-10-12T11:56:02.994Z