Skip to main content
Mythos

Claude Code Hooks and Skills

Claude Code Hooks and Skills are the two complementary extensibility systems built into 📝Claude Code — the 📝Hook handles automated reactions to lifecycle events, and the 📝Skill handles reusable workflows invoked by name. Together, they turn Claude Code from a general-purpose agent into a customized 📝augmentation system tailored to a specific workflow.

Hooks vs. Skills at a Glance

  • Hooks are reactive — they fire automatically when events occur. The human doesn't invoke them
  • Skills are intentional — the human invokes them with a 📝slash command when they need a specific workflow, or the model loads them when their description matches the task
  • Hooks handle mechanics — linting, logging, notifications. Things that should happen every time without thinking
  • Skills handle judgment — review, deploy-check, research. Things that need to be triggered deliberately

Both contribute to the Memory layer of 📝The Augmentation Stack — hooks encode behavioral patterns, skills encode workflow patterns. Together they reduce the surface area of decisions the human needs to make, freeing attention for the work that actually requires judgment.

Hook Configuration Example

Hooks live in a settings file under a hooks object keyed by event type: ~/.claude/settings.json for all your projects, or .claude/settings.json (shared) and .claude/settings.local.json (personal) for a single project. Managed policy settings, plugins, and skill or subagent frontmatter can also define hooks:

{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Edit|Write",
        "hooks": [
          {
            "type": "command",
            "command": "jq -r '.tool_input.file_path' | xargs npx prettier --write"
          }
        ]
      }
    ],
    "Notification": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "osascript -e 'display notification \"Claude Code needs your attention\" with title \"Claude Code\"'"
          }
        ]
      }
    ]
  }
}

The first hook runs Prettier on every file Claude edits or writes — automatic formatting without asking Claude to do it. Claude Code passes each event's data to the hook as JSON on stdin, and jq pulls the edited file's path from tool_input.file_path. The second sends a macOS notification when Claude Code needs your attention, such as when it is waiting for your permission or input.

Skill Configuration Example

Each skill is a directory containing a SKILL.md file — for a personal skill, ~/.claude/skills/deploy-check/SKILL.md — with 📝YAML frontmatter declaring its name and description. The name defaults to the directory name; the description tells Claude when to use the skill:

---
name: deploy-check
description: Pre-deployment verification checklist
---
Run the following checks before deploying:
1. All tests pass (`npm test`)
2. No TypeScript errors (`npx tsc --noEmit`)
3. Build succeeds (`npm run build`)
4. No uncommitted changes (`git status`)
5. Current branch is staging
Report results as a checklist. If any check fails, stop and explain.

Invoke with /deploy-check. The skill's content loads as instructions and Claude executes the workflow.

In Practitioner Workflows

In 📝Brian Bot's setup, hooks handle post-commit linting, metrics logging via the session-metrics-logger plugin, and notification routing through the slack-thread-logger hook. Skills handle the higher-leverage patterns: /commit for conventional commit messages, /review-pr for pull request reviews against the 📝CLAUDE.md as Infrastructure, and /mythos for connecting to the 📝MythOS library (see 📝MythOS Claude Code Skill).

Hooks were the thing that made Claude Code feel like infrastructure instead of a tool. Before hooks, I had to remember to lint, remember to log metrics, remember to check formatting. Now the system handles it. Skills are how I stopped repeating myself — packaging each workflow once so I type a slash command instead of re-explaining the process. Together they reduce the surface area of decisions the human needs to make, freeing attention for the work that actually requires judgment.

Contexts

MythOS is a product of Cooperating Citizens of One, Inc.

TermsPrivacyRefundsSub-processorsContact

© 2026 Cooperating Citizens of One, Inc. · MythOS since 2017 · Not affiliated with Anthropic.