Introduction
Maintaining consistent code quality across teams is challenging. The Kiro Best Practices Boilerplate solves this by creating an AI-driven development environment that automatically enforces best practices, runs quality checks, and streamlines workflows through intelligent automation.
Get Started in 30 Seconds
Skip the setup complexity. Add proven best practices to any project instantly:
# Add to existing project (recommended)
cd your-existing-project
mkdir -p .kiro && curl -L https://github.com/awsdataarchitect/kiro-best-practices/archive/main.tar.gz | tar -xz --strip-components=2 -C .kiro kiro-best-practices-main/.kiro
Or start fresh:
# Clone as template
git clone https://github.com/awsdataarchitect/kiro-best-practices.git your-project-name
cd your-project-name && rm -rf .git && git init
⚠️ Important: Activation Requirements
After installation:
- 🎯 Steering Documents: Active immediately (auto-refresh)
- 🔄 Hooks: Require restarting Kiro to become active
💡 Restart Kiro after installation to activate all automation hooks.
Complete Feature Overview
🎯 11 AI Steering Documents (Always Active)
These actively guide every AI interaction in your IDE:
Document | Purpose | Link |
---|---|---|
AWS CLI Best Practices |
--no-cli-pager enforcement, security patterns |
📄 View |
CDK Best Practices | Project structure, testing, construct organization | 📄 View |
Development Standards | Dependency management, code quality, documentation | 📄 View |
Docker Best Practices | Container security and optimization | 📄 View |
Git Best Practices | Conventional commits, branching strategies | 📄 View |
MCP Best Practices | Model Context Protocol server configuration | 📄 View |
Python Best Practices | Code style, virtual environments, testing | 📄 View |
React Best Practices | Component patterns, hooks, accessibility | 📄 View |
Security Best Practices | No hardcoded secrets, dependency scanning, OWASP | 📄 View |
Testing Best Practices | Minimal verbosity, parallel execution, coverage | 📄 View |
TypeScript Best Practices | Strict typing, meaningful names, Result/Either patterns | 📄 View |
🔄 17 Automation Hooks
Complete automation system with three tiers:
Three-Tier Automation System
🔄 Automatic Hooks (8 hooks - Run on File Save)
Hook | Purpose | Link |
---|---|---|
Auto Test on Save | Runs tests with minimal verbosity when code changes | ⚙️ Config |
Lint and Format on Save | ESLint + Prettier automatically applied | ⚙️ Config |
Security Scan on Dependencies | Audits when package.json changes | ⚙️ Config |
CDK Synth on Change | Validates infrastructure code on save | ⚙️ Config |
Validate Docker on Change | Checks Dockerfile security patterns | ⚙️ Config |
MCP Config Validation | Validates MCP server configurations | ⚙️ Config |
Environment File Validation | Checks .env files for security issues | ⚙️ Config |
API Schema Validation | Validates OpenAPI/GraphQL schemas | ⚙️ Config |
🔘 Manual Hooks (6 hooks - Button Triggers)
Hook | Purpose | Link |
---|---|---|
Commit Message Helper | Creates conventional commits | ⚙️ Config |
README Spell Check | Fixes documentation grammar | ⚙️ Config |
MCP Server Test | Validates all configured MCP integrations | ⚙️ Config |
Dependency Update Check | Finds outdated packages and vulnerabilities | ⚙️ Config |
Code Coverage Check | Analyzes test coverage gaps | ⚙️ Config |
Performance Analysis | Identifies optimization opportunities | ⚙️ Config |
⚙️ Optional Hooks (3 hooks - Enable as Needed)
Hook | Purpose | Link |
---|---|---|
Accessibility Audit | Checks React components for accessibility | ⚙️ Config |
Update Documentation | Updates docs when code changes | ⚙️ Config |
Translation Update | Syncs translation files | ⚙️ Config |
// Example: Customize any hook
{
"enabled": true, // Enable/disable
"when": {
"type": "fileEdited",
"patterns": ["src/**/*.ts", "**/*.test.ts"]
},
"action": "npm test -- --silent"
}
Comprehensive Technology Stack Support
Languages & Frameworks:
- TypeScript/JavaScript (React, Node.js)
- Python (pytest, virtual environments)
- AWS CDK (infrastructure as code)
- Docker (security-focused configs)
Integrated MCP Servers:
// Example MCP configuration
{
"mcpServers": {
"context7": {
"command": "uvx",
"args": ["context7-mcp-server@latest"],
"autoApprove": ["check_compatibility"]
},
"aws-knowledge": {
"command": "uvx",
"args": ["awslabs.aws-documentation-mcp-server@latest"]
}
}
}
Testing Tools:
- Jest (JavaScript/TypeScript)
- pytest (Python)
- Coverage analysis with gap identification
- Performance benchmarking
Customize for Your Team
Add Team-Specific Standards
---
title: Your Team Standards
inclusion: always
---
# Your Team-Specific Guidelines
- Custom coding standards
- Project-specific patterns
- Industry compliance requirements
Adjust File Patterns
// Customize when hooks trigger
{
"when": {
"type": "fileEdited",
"patterns": [
"src/**/*.ts", // Your source files
"lib/**/*.js", // Your library files
"**/*.custom" // Your custom extensions
]
}
}
Project Type Optimization
- Web Apps: Enable accessibility audit, React patterns
- Infrastructure: CDK hooks, AWS security patterns
- Libraries: Documentation updates, API validation
- Microservices: Docker validation, comprehensive testing
Built-in Security & Performance
Automatic Security Scanning
- Dependency vulnerability alerts
- Environment file validation (no secrets in code)
- Docker security pattern enforcement
- AWS IAM policy validation
Performance Optimized
# Tests run with minimal verbosity to prevent timeouts
npm test -- --silent
pytest -q --tb=short
Quick Verification After Setup
Test your installation:
# 1. Check steering documents are active
# AI responses should reference best practices
# 2. Test automatic hooks
# Save a TypeScript file - auto-test should trigger
# 3. Check manual hooks
# Look for buttons in Kiro Agent Hooks panel
# 4. Verify MCP integration (if configured)
# Test MCP servers through manual hook
Conclusion
The Kiro Best Practices Boilerplate represents a paradigm shift in how development teams approach quality assurance, security, and standardization. By combining intelligent AI guidance through steering documents with comprehensive automation through hooks, it creates an environment where best practices are not just recommended but actively enforced and continuously improved.
This system transforms the traditional tension between development velocity and code quality into a synergistic relationship where automation enables both speed and excellence. Teams adopting this boilerplate can expect reduced code review cycles, fewer production issues, improved security postures, and more consistent development practices across their entire organization.
As software development continues to evolve toward AI-assisted workflows, tools like this boilerplate will become essential for maintaining human oversight and quality standards while leveraging the productivity benefits of artificial intelligence. The future of development lies not in choosing between human expertise and AI assistance, but in creating intelligent systems that amplify human capabilities while maintaining the highest standards of quality and security.
Top comments (0)