title: "Amazon Kiro Specs & Hooks — AI Coding Guide" description: "Use Kiro specs and hooks to guide AI in Amazon Kiro IDE." slug: "kiro-specs-hooks" category: "skills" updatedAt: "2026-03-05T00:00:00.000Z" faqs:
- q: "What are Kiro Hooks?" a: "Hooks are automated lifecycle actions that run at specific points — like on file save or before commit. They let Kiro automatically run tests, update docs, or check code quality."
AI Skills & Rules
2026
Updated Mar 5, 20265 min read
kiro
amazon
specs
hooks
skills
Amazon Kiro — Specs & Hooks
Overview
Amazon Kiro is AWS's AI-powered IDE that supports two unique mechanisms for guiding AI behavior:
- Specs: Structured requirements documents that define what to build
- Hooks: Automated lifecycle actions triggered by events like file save or commit
Kiro Specs
Specs are structured documents that translate high-level requirements into implementation tasks:
# Feature: User Authentication
## Requirements
- Users can sign up with email and password
- Passwords must be hashed with bcrypt
- Sessions stored in Redis with 24-hour TTL
## Design
- Use NextAuth.js with Credentials provider
- PostgreSQL for user storage
- Rate limit login to 5 attempts per minute
## Tasks
- [ ] Create users table migration
- [ ] Implement NextAuth configuration
- [ ] Add login/signup API routes
- [ ] Create auth middleware
Place specs in .kiro/specs/ directory.
Kiro Hooks
Hooks automate actions in your development workflow:
{
"hooks": {
"on-save": {
"action": "run-tests",
"glob": "**/*.test.ts"
},
"pre-commit": {
"action": "lint-check",
"command": "npm run lint"
},
"on-file-create": {
"action": "update-docs",
"description": "Update API docs when new route files are created",
"glob": "src/app/api/**/*.ts"
}
}
}
MCP Integration
Kiro supports MCP servers through .kiro/mcp.json:
{
"mcpServers": {
"supabase": {
"command": "npx",
"args": ["supabase-mcp-server"],
"env": { "SUPABASE_URL": "${SUPABASE_URL}" }
}
}
}
Related Guides
Was this guide helpful?
Last updated: March 5, 2026