Loading image...Kiro

Product

  • About Kiro
  • IDE
  • CLI
  • Web
  • Mobile
  • 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
  • CLI
  • IDE
  • Web
  • Mobile
  • 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
Capability-based permissions
Hooks
Agent config changes
Improved compaction
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

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. IDE 1.x
  3. What's new in 1.0
  4. Hooks

Hooks


Overview

Hooks use a defined JSON schema in standalone files at .kiro/hooks/*.json. This replaces the previous IDE .kiro.hook format with a structured, validated schema shared with the CLI — the same hook file works on every surface.

json
{ "version": "v1", "hooks": [ { "name": "format-on-save", "trigger": "PostFileSave", "matcher": "\\.ts$", "action": { "type": "command", "command": "prettier --write {{filePath}}" } } ] }

Schema details

FieldRequiredDescription
versionYesSchema version — currently "v1"
hooks[].nameYesUnique identifier for the hook
hooks[].triggerYesEvent trigger name in PascalCase (see table below)
hooks[].matcherNoRegex pattern matched against the event subject
hooks[].action.typeYesAction type: command or agent
hooks[].action.commandCond.Shell command to run (when action.type: "command")
hooks[].action.promptCond.Agent prompt to inject (when action.type: "agent")

Available triggers

TriggerFires whenMatcher matchesCan block?
SessionStartSession begins—No
StopAgent execution completes—No
UserPromptSubmitYou send a messagePrompt textYes
PreTaskExecBefore a spec task starts—Yes
PostTaskExecAfter a spec task finishes—No
PreToolUseBefore a tool executesTool nameYes
PostToolUseAfter a tool executesTool nameNo
PostFileCreateA new file is created by the agentFile pathNo
PostFileSaveA file is saved/modified by the agentFile pathNo
PostFileDeleteA file is deleted by the agentFile pathNo

Blocking: a command action that exits with code 2 blocks the triggering event (PreToolUse, UserPromptSubmit, PreTaskExec). Use this for policy enforcement — for example, block writes to *.env files. Any other non-zero exit code is treated as an error, not a block.

Migrating from 0.x trigger names

Legacy .kiro.hook trigger names map directly onto the new PascalCase triggers:

Old (when.type)New (trigger)
agentSpawnSessionStart
agentStopStop
promptSubmitUserPromptSubmit
preToolUsePreToolUse
postToolUsePostToolUse
fileCreatedPostFileCreate
fileEditedPostFileSave
fileDeletedPostFileDelete
preTaskExecutionPreTaskExec
postTaskExecutionPostTaskExec
userTriggeredReplaced by manual steering files — see below

Your regex patterns transfer directly; the when/then structure becomes trigger/matcher/action. The IDE migrates hooks for you: open the Agent Hooks panel and click the upgrade badge on each legacy hook.

Manual hooks (the old userTriggered trigger) are replaced by manual steering files — markdown files in .kiro/steering/ invoked as /<filename> slash commands. See Steering.

Action types

  • command — runs a subprocess; receives JSON context on stdin. The {{filePath}} template variable is available for file-related triggers.
  • agent — injects a prompt into the agent's context at trigger time. Use this to add conditional steering (e.g., "A test file was saved — check coverage"). Unlike command, it can't block the trigger.

For the full reference (exit-code semantics, stdin payloads, global hooks in ~/.kiro/hooks/), see Hooks.

Page updated: August 4, 2026
Capability-based permissions
Agent config changes