Skip to content

awsdataarchitect/kiro-best-practices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Kiro Best Practices Boilerplate

A comprehensive collection of steering documents and agent hooks for Kiro IDE that enforces development best practices, automates quality checks, and streamlines workflows.

🚀 Quick Start

Option 1: Clone as Template

# Clone this repository as a template for your new project
git clone https://github.com/awsdataarchitect/kiro-best-practices.git your-project-name
cd your-project-name
rm -rf .git
git init
git add .
git commit -m "feat: initialize project with Kiro best practices"

Option 2: Add to Existing Project (Recommended)

# Add only the .kiro directory to existing project
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

Option 3: Manual Download

# Download and extract only .kiro directory
cd your-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 use git sparse-checkout for updates
git clone --filter=blob:none --sparse https://github.com/awsdataarchitect/kiro-best-practices.git temp-kiro
cd temp-kiro
git sparse-checkout set .kiro
cp -r .kiro/* ../.kiro/
cd .. && rm -rf temp-kiro

⚠️ Important: Activation Requirements

After installation:

  • 🎯 Steering Documents: Automatically refresh and become active immediately - no restart needed
  • 🔄 Hooks: Require restarting Kiro or reopening the project to become active

💡 Tip: After installation, restart Kiro to ensure all hooks are properly loaded and functional.

📋 What's Included

🎯 Steering Documents (Always Active)

Automatically guide all AI interactions with established best practices:

🔄 Automatic Hooks (File Save Triggers)

Quality checks that run automatically when you save files:

🔘 Manual Hooks (Button Triggers)

On-demand tools available in the Kiro Agent Hooks panel:

🎛️ Optional Hooks (Disabled by Default)

Performance-sensitive hooks you can enable as needed:

⚙️ Configuration

Enabling/Disabling Hooks

Edit any .kiro.hook file and change the enabled field:

{
  "enabled": true,  // Change to false to disable
  "name": "Hook Name",
  // ... rest of configuration
}

Customizing File Patterns

Modify the patterns array in hook files to match your project structure:

{
  "when": {
    "type": "fileEdited",
    "patterns": [
      "src/**/*.ts",     // Your source files
      "lib/**/*.js",     // Your library files
      "**/*.custom"      // Your custom extensions
    ]
  }
}

Adding Project-Specific Steering

Create additional steering documents in .kiro/steering/:

---
title: Your Team Standards
inclusion: always
---

# Your Team-Specific Guidelines
- Team-specific coding standards
- Project-specific patterns
- Custom workflows

🛠️ Technology Support

This boilerplate includes best practices for:

  • Languages: TypeScript, JavaScript, Python
  • Frameworks: React, CDK, Docker
  • Tools: Git, npm/yarn, pytest, ESLint, Prettier
  • Cloud: AWS (CLI, CDK, services)
  • APIs: OpenAPI/Swagger, GraphQL
  • Testing: Jest, pytest, coverage analysis
  • Documentation: Markdown, JSDoc, docstrings

📚 MCP Integration

Includes best practices for Model Context Protocol servers:

  • Context7 - For dependency compatibility checking
  • AWS Knowledge - For current AWS documentation and best practices
  • AWS API - For programmatic AWS interactions
  • Proper configuration patterns and testing workflows

🔒 Security Features

Built-in security practices:

  • Dependency vulnerability scanning
  • Environment file validation (no secrets in code)
  • Docker security best practices
  • AWS security patterns
  • MCP server security configurations

🎨 Customization Guide

For Your Team

  1. Review all steering documents - Modify for your team's standards
  2. Adjust hook sensitivity - Enable/disable based on your workflow
  3. Update file patterns - Match your project structure
  4. Add team-specific hooks - Create custom automation for your needs

For Your Project Type

  • Web Applications: Enable accessibility audit, focus on React patterns
  • Infrastructure: Enable CDK hooks, focus on AWS patterns
  • Libraries: Enable documentation updates, focus on API patterns
  • Microservices: Enable Docker validation, focus on testing patterns

📖 Documentation

🤝 Contributing

Adding New Best Practices

  1. Create steering document in .kiro/steering/
  2. Add corresponding hook in .kiro/hooks/
  3. Update documentation
  4. Test with sample project

Sharing Improvements

  1. Fork this repository
  2. Add your improvements
  3. Submit pull request with description
  4. Include examples of usage

📄 License

MIT License - Feel free to use this in your projects and modify as needed.

🙋‍♂️ Support

  • Issues: Report bugs or request features via GitHub issues
  • Discussions: Share your customizations and ask questions
  • Wiki: Community-contributed examples and patterns

🎯 Quick Verification

After setup, verify everything works:

  1. Check Steering: AI responses should reference best practices
  2. Test Hooks: Save a TypeScript file to trigger auto-test hook
  3. Manual Hooks: Look for buttons in Kiro Agent Hooks panel
  4. MCP Integration: Test MCP servers if configured

Happy coding with consistent, high-quality development practices! 🚀