Skip to content
Back to skills

Configuring Claude Code

ASecurity

Use when setting up, testing, or debugging Claude Code hooks, plugins, skills, settings, or managed configuration. Triggers on `.claude/settings.json`, SessionStart, UserPromptSubmit, PreToolUse, PermissionRequest, PostToolUse, command, prompt, agent, HTTP, or MCP-tool hook handlers, `allowManagedHooksOnly`, or Claude Code automation, even when the user doesn't say 'hook'.

  • 6 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added November 30, 2026
ai-agentsrustgotestingdebuggingdocumentation

Works with

  • claude code
  • mcp

Security analysis

A100/100

Pro scans all 8 files and shows the line behind each finding

Scanned November 30, 2026

npx -y skills add xonovex/platform --skill configuring-claude-code --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Configuring Claude Code?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Configuring Claude Code
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/xonovex-configuring-claude-code/badge)](https://www.skillsdirectory.com/skills/xonovex-configuring-claude-code)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: configuring-claude-code
description: "Use when setting up, testing, or debugging Claude Code hooks, plugins, skills, settings, or managed configuration. Triggers on `.claude/settings.json`, SessionStart, UserPromptSubmit, PreToolUse, PermissionRequest, PostToolUse, command, prompt, agent, HTTP, or MCP-tool hook handlers, `allowManagedHooksOnly`, or Claude Code automation, even when the user doesn't say 'hook'."
---

# Claude Code Hooks

Configure Claude Code's native hook and extension surface without inventing unsupported guarantees or a universal hook format.

## Essentials

- **Pin the surface** - Record the documentation snapshot and observed `claude --version` result before selecting a guarantee.
- **Map event semantics** - Translate requested behavior through the versioned capability matrix, never by event-name similarity.
- **Preserve handler differences** - Command, HTTP, MCP-tool, prompt, and agent handlers have event-specific support and output behavior.
- **Assume parallel matching** - Make handlers reentrant and do not expect a denial to cancel sibling side effects.
- **Respect settings authority** - Managed, user, project, local, plugin, and component hooks have native precedence and trust rules.
- **Onboard transactionally** - Preview exact settings or plugin changes before apply; lifecycle owned by **configuring-harness-integrations**.
- **Keep hooks focused** - Give each handler one native event contract and one explicit responsibility.

## Gotchas

- Agent handlers are experimental; do not select them when the requested control requires a verified blocking guarantee.
- Exit code `2` is the blocking signal for most blocking events; exit code `1` is normally a non-blocking error.
- There is no standalone `.claude/hooks.json`; standalone hooks live under the `hooks` key in a settings file.
- All matching handlers run in parallel, so a blocking result does not undo a sibling handler that already produced a side effect.
- Managed settings may restrict hook sources, but executable distribution and provenance remain separate.

## Example

A project can use a deterministic `PreToolUse` command to inspect covered tool calls and return Claude Code's documented blocking response when its explicit rule rejects one.

## Progressive Disclosure

- Read [references/capabilities.md](references/capabilities.md) - Load when mapping semantic intents to native events, handlers, guarantees, versions, ordering, context, or limitations
- Read [references/onboarding.md](references/onboarding.md) - Load when discovering, previewing, applying, verifying, disabling, rolling back, updating, or detecting drift
- Read [references/patterns.md](references/patterns.md) - Load when translating deterministic hooks, model evaluators, specialist agents, or managed adoption recipes

Files in this skill

  • SKILL.md2.8 KB
  • eval-output.json1.9 KB
  • eval-trigger.json5.2 KB
  • moon.yml86 B
  • references/capabilities.md2.6 KB
  • references/onboarding.md1.4 KB
  • references/patterns.md1.1 KB
  • sources.json3.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.