Loading image...Kiro

Product

  • About Kiro
  • IDE
  • CLI
  • Web
  • Mobile
  • Crew
  • Pricing
  • Downloads

For

  • Enterprise
  • Startups
  • Students

Community

  • Overview
  • Ambassadors
  • Discord
  • Events
  • Powers
  • Shop
  • Showcase

Resources

  • Docs
  • Blog
  • Changelog
  • FAQs
  • Report a bug
  • Suggest an idea
  • Billing support

Social

Site TermsLicenseResponsible AI PolicyLegalPrivacy PolicyCookie Preferences
Loading image...Kiro
  • Enterprise
  • Pricing
  • Docs
SIGN INDOWNLOADS
Loading image...Kiro

Get Started

InstallationAuthenticationYour first project

Models

OverviewAvailable modelsReasoning effort

Features

How Kiro works
Specs
Steering
Hooks
MCP
Permissions
Custom agents
Agent Skills
Powers
CompactionKiroignoreCheckpoints and rewind
Built-in tools
Configuration scopes

IDE 1.x

What's new in 1.0
Setup & First Run
Editor
Chat
Experimental
Troubleshooting0.x reference

CLI

What's new in 3.0
Setup & First Run
Terminal UI
Chat
Headless modeACPAuto complete
Experimental
2.x reference

Crew

Quick startInstallationRunning 24/7
Chat
Agent Capabilities
Agents
Agent Templates
Integrations (MCP)
Skills
Steering
Hooks
Prompts
Features
Interfaces
Apps
ConfigurationSecurityTroubleshooting

Web - Preview

Setup & First RunIdentity Center
Connect your repositories
Working with the agent
Autonomous modeAutomations
Sandbox

Mobile - Preview

Overview

Commands and Reference

CLI commandsSlash commandsBuilt-in toolsExit codesSettingsIDE keyboard shortcuts

Billing

OverviewManaging your subscriptionUpgrading your planDowngrading your planCancelling your planPurchasing add-on creditsManaging your paymentsManaging usage notificationsManaging your taxesContacting billing supportDeleting your accountRelated questions

Enterprise

ConceptsOnboarding quickstart
Connecting your identity provider
Subscribe your teamManage subscriptions
Governance
Monitor and track
SettingsManaged updatesBillingIAMSupported regions

Privacy and Security

OverviewData protectionCode referencesCompliance validationInfrastructure securityIAM permissionsFirewalls, proxies, and data perimetersVPC endpoints (AWS PrivateLink)

Guides

Overview
Language support
Learn by playing

Migration

Migrating from Q DeveloperMigrating from VSCodeUpgrading from Q CLI
  1. Docs
  2. Crew
  3. Agent Capabilities
  4. Hooks

Hooks


Hooks let you automate reactions to events in Crew. When a tool fires, a session starts, or a file changes, a hook can run a script, inject context, or gate the action.

Managing hooks

From the dashboard

Open Agent Capabilities → Hooks. You can view, create, edit, and delete hooks from the browser. Each hook shows its trigger, action, and optional matcher pattern.

From the filesystem

Hooks are JSON files at ~/.kiro/crew/hooks/ (or project-level at .kiro/hooks/). Each file can define one or more hooks.

Hook structure

A hook has three parts:

  1. Trigger — when does it fire?
  2. Matcher (optional) — which specific events match? (regex on tool name or file path)
  3. Action — what happens? (run a command, or inject a prompt)

Triggers

TriggerFires when
SessionStartA new session begins
PreToolUseBefore a tool is about to execute
PostToolUseAfter a tool has executed
PreTaskExecBefore a spec task status is set to in_progress
PostTaskExecAfter a spec task status is set to completed
PostFileSaveA file is saved
PostFileCreateA file is created
PostFileDeleteA file is deleted
UserPromptSubmitA message is sent to the agent
StopAn agent execution completes

Actions

Command action

Runs a shell command. The command receives session context as JSON on stdin.

Use for: running linters, triggering builds, sending notifications, validating changes.

Exit codes matter:

  • 0 — success (output forwarded for some triggers)
  • 2 — block the action (for PreToolUse, UserPromptSubmit)
  • Other — silent failure, no block

Agent action

Injects a static prompt into the model context.

Use for: adding reminders, enforcing patterns, injecting context about the current state.

Common patterns

Lint on save

A hook that runs the linter whenever a TypeScript file is saved:

  • Trigger: PostFileSave
  • Matcher: \.(ts|tsx)$
  • Action: command — npm run lint

Review write operations

A hook that adds a reminder before any file write:

  • Trigger: PreToolUse
  • Matcher: fs_write|str_replace
  • Action: agent — "Verify this write follows our coding standards before proceeding."

Run tests after task completion

  • Trigger: PostTaskExec
  • Action: command — npm run test

PreToolUse gating

PreToolUse hooks can block a tool call by exiting with code 2. This is how you add custom deny rules beyond the built-in 137 patterns. The agent sees the block and tries a different approach.

Creating a hook from the dashboard

  1. Open Agent Capabilities → Hooks
  2. Click Add hook
  3. Choose a trigger, optionally set a matcher regex, select the action type
  4. For command actions: enter the shell command
  5. For agent actions: enter the prompt text
  6. Save

The hook is active immediately — no restart needed.

Page updated: August 4, 2026
Steering
Prompts