Skip to content

feat(kiro): add Kiro configuration for code-review and pr-review-toolkit#76

Open
scottschreckengaust wants to merge 19 commits intomainfrom
kiro-setup
Open

feat(kiro): add Kiro configuration for code-review and pr-review-toolkit#76
scottschreckengaust wants to merge 19 commits intomainfrom
kiro-setup

Conversation

@scottschreckengaust
Copy link
Member

@scottschreckengaust scottschreckengaust commented Mar 2, 2026

Summary

  • Translates code-review@claude-plugins-official and pr-review-toolkit@claude-plugins-official Claude Code plugins into Kiro-native .kiro/ project configuration
  • Uses Kiro steering files, skills, and the Agent Skills standard (agentskills.io)
  • 16 new files across skills, steering, and agents

Kiro Configuration Summary

Mapping: Claude Plugins → Kiro

Claude Plugin Component Kiro Equivalent Files
code-review command Kiro agent .kiro/agents/code-review.json + prompts/code-review.md
review-pr command Kiro agent .kiro/agents/review-pr.json + prompts/review-pr.md
6 pr-review-toolkit agents 6 standalone Kiro skills .kiro/skills/{code-reviewer,code-simplifier,comment-analyzer,pr-test-analyzer,silent-failure-hunter,type-design-analyzer}/SKILL.md
Confidence scoring methodology Kiro steering (auto) .kiro/steering/code-review-standards.md

Structure

.kiro/
├── agents/
│   ├── code-review.json                  # Code review agent manifest
│   ├── review-pr.json                    # Comprehensive PR review agent manifest
│   └── prompts/
│       ├── code-review.md                # Code review agent prompt
│       └── review-pr.md                  # PR review agent prompt
├── skills/
│   ├── code-reviewer/SKILL.md            # Guidelines compliance + bug detection
│   ├── code-simplifier/SKILL.md          # Code clarity and maintainability
│   ├── comment-analyzer/SKILL.md         # Comment accuracy and rot detection
│   ├── design-guidelines/SKILL.md        # Plugin design best practices
│   ├── development-guide/SKILL.md        # Dev environment and contribution workflow
│   ├── maintainers-guide/SKILL.md        # PR review and merge workflows
│   ├── pr-test-analyzer/SKILL.md         # Test coverage quality
│   ├── silent-failure-hunter/SKILL.md    # Error handling audit
│   ├── troubleshooting/SKILL.md          # Plugin troubleshooting
│   └── type-design-analyzer/SKILL.md     # Type invariant analysis
└── steering/
    ├── code-review-standards.md          # Auto-included review standards
    └── development-workflow.md           # Auto-included dev workflow boundaries

Key Adaptations

  • Claude sub-agentsKiro skills with auto-triggering descriptions (Kiro matches description fields against user intent, same pattern as Claude agent descriptions)
  • Claude inline agent orchestration (Haiku/Sonnet model directives) → Kiro skill instructions (Kiro handles model selection natively)
  • Claude allowed-tools → Kiro allowed-tools in frontmatter (experimental in Kiro)
  • Shared methodology → Kiro steering file with inclusion: auto so confidence scoring standards are loaded when doing review work
  • Progressive disclosure: Doc skills (design-guidelines, development-guide, maintainers-guide, troubleshooting) keep detailed content in references/ via symlinks to existing docs/ files

Ancillary Cleanup

The following changes are included alongside the Kiro configuration:

  • mise.toml: Fix checkov crash by unsetting LOG_LEVEL before invocation (mise sets it to TRACE, which checkov does not recognize)
  • .github/CODEOWNERS: Add .kiro/ ownership entry for agent-plugins-admins; add amazon-location-service plugin team entry; reformat alignment for consistency
  • AGENTS.md: Remove "Reference Documentation" section referencing deleted .claude/docs/ directory
  • docs/DESIGN_GUIDELINES.md: Remove .claude/docs/ references
  • .markdownlint-cli2.yaml: Remove .claude/docs/** ignore (directory no longer exists)
  • dprint.json: Remove **/.claude/docs/** exclude (directory no longer exists)
  • plugins/amazon-location-service/.claude-plugin/plugin.json: Sort JSON keys alphabetically; change license from MIT-0 to Apache-2.0 to match repo LICENSE
  • plugins/amazon-location-service/.mcp.json: Sort JSON keys alphabetically

Test plan

  • Open project in Kiro IDE and verify skills appear in / slash command list
  • Verify code-review-standards steering auto-loads when discussing code review
  • Test /code-review skill on a sample PR
  • Test /review-pr skill with default (all aspects) and specific aspects
  • Verify individual skills (e.g., silent-failure-hunter) auto-trigger on relevant context

🤖 Generated with Claude Code


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.

scottschreckengaust and others added 6 commits March 2, 2026 22:06
…plugins

Translates the code-review@claude-plugins-official and
pr-review-toolkit@claude-plugins-official Claude Code plugins into
Kiro-native .kiro/ project configuration using steering files, skills,
and the Agent Skills standard.

Co-Authored-By: Claude <noreply@anthropic.com>
The project schema (skill-frontmatter.schema.json) and existing plugins
only use name and description. Remove license and metadata fields to
match repo conventions.
…kills

Kiro skills don't dynamically load other skills by reference. Use the
bundled reference docs which already contain the condensed instructions.
No MCP servers are needed for the review skills. An empty config adds
noise without value.
The steering file code-review-standards.md is auto-included. Remove
duplicated scoring scales from code-review, code-reviewer, and the
review-pr code-reviewer reference to save context tokens.
Align code-review output template with the steering file convention
which already uses 'guideline says' instead of 'CLAUDE.md says'.
@scottschreckengaust scottschreckengaust changed the title Add Kiro configuration for code-review and pr-review-toolkit feat(kiro): add Kiro configuration for code-review and pr-review-toolkit Mar 2, 2026
Signed-off-by: Scott Schreckengaust <345885+scottschreckengaust@users.noreply.github.com>
@scottschreckengaust scottschreckengaust marked this pull request as ready for review March 4, 2026 20:59
@scottschreckengaust scottschreckengaust requested review from a team, krokoko and theagenticguy March 4, 2026 20:59
@scottschreckengaust scottschreckengaust requested a review from a team as a code owner March 4, 2026 20:59
@scottschreckengaust
Copy link
Member Author

Code review

No issues found. Checked for bugs and project guideline compliance.

@scottschreckengaust
Copy link
Member Author

Comprehensive PR Review

Summary

Completed 8 review aspects on PR#76. All reviews passed with no issues found.

Reviews Completed

Review Aspect Status Findings
code-review ✅ Pass 5-pass review: guideline compliance, bug scan, historical context, previous PR context, comment compliance
code-reviewer ✅ Pass No guideline violations or bugs
comment-analyzer ✅ Pass Documentation is accurate, complete, and maintainable
code-simplifier ✅ Pass Documentation is clear and well-organized
pr-test-analyzer ✅ N/A No executable code requiring tests (documentation only)
silent-failure-hunter ✅ N/A No error handling code to audit (documentation only)
type-design-analyzer ✅ N/A No type definitions to analyze (documentation only)
review-pr ✅ Pass Orchestrated all review aspects

Critical Issues

0 found

Important Issues

0 found

Suggestions

0 found

Strengths

  • Well-structured skills: All 8 new Kiro skills follow the Agent Skills standard with proper YAML frontmatter
  • Comprehensive documentation: Each skill includes clear workflows, output formats, and examples
  • Good organization: Reference documentation is properly separated and linked
  • Consistent formatting: Markdown formatting is clean and consistent across all files
  • Clear instructions: Workflow steps are logical, specific, and actionable
  • Appropriate detail: Documentation provides the right level of detail for AI agents

Recommended Action

Ready to merge - No issues found across all review aspects.


Automated review completed by Kiro code review skills

@theagenticguy
Copy link
Contributor

Claude sub-agents → Kiro skills with auto-triggering descriptions (Kiro matches description fields against user intent, same pattern as Claude agent descriptions)
Claude inline agent orchestration (Haiku/Sonnet model directives) → Kiro skill instructions (Kiro handles model selection natively)

Consider: https://kiro.dev/docs/cli/chat/subagents/ and https://kiro.dev/docs/cli/custom-agents/creating/

@scottschreckengaust
Copy link
Member Author

Claude sub-agents → Kiro skills with auto-triggering descriptions (Kiro matches description fields against user intent, same pattern as Claude agent descriptions)
Claude inline agent orchestration (Haiku/Sonnet model directives) → Kiro skill instructions (Kiro handles model selection natively)

Consider: https://kiro.dev/docs/cli/chat/subagents/ and https://kiro.dev/docs/cli/custom-agents/creating/

Restructuring Plan: Skills → Custom Agents + Subagents

The key insight from the Kiro docs is that the current PR uses only skills (SKILL.md files), but Kiro's custom agent system offers a much more powerful approach. The review-pr skill in particular is an orchestrator that should be a custom agent that spawns the individual review aspects as subagents.

What changes and why

Current structure (skills only):

.kiro/
├── skills/
│   ├── code-review/SKILL.md          # Standalone PR review skill
│   ├── code-reviewer/SKILL.md        # Individual review aspect
│   ├── code-simplifier/SKILL.md      # Individual review aspect
│   ├── comment-analyzer/SKILL.md     # Individual review aspect
│   ├── pr-test-analyzer/SKILL.md     # Individual review aspect
│   ├── silent-failure-hunter/SKILL.md # Individual review aspect
│   ├── type-design-analyzer/SKILL.md  # Individual review aspect
│   └── review-pr/                     # Orchestrator (as a skill)
│       ├── SKILL.md
│       └── references/               # Duplicated summaries of sibling skills
└── steering/
    └── code-review-standards.md

Proposed structure (agents + skills + subagents):

.kiro/
├── agents/
│   ├── code-review.json              # Agent: 5-pass PR review with gh access
│   └── review-pr.json                # Agent: orchestrator that spawns subagents
├── skills/
│   ├── code-reviewer/SKILL.md        # Skill (loaded as resource by agents)
│   ├── code-simplifier/SKILL.md
│   ├── comment-analyzer/SKILL.md
│   ├── pr-test-analyzer/SKILL.md
│   ├── silent-failure-hunter/SKILL.md
│   └── type-design-analyzer/SKILL.md
└── steering/
    └── code-review-standards.md

Specific changes

  1. Convert code-review from skill → custom agent (code-review.json)

    • It needs gh CLI access (shell tool) which is better expressed as an agent tool permission
    • Its allowed-tools: Bash(gh:*) frontmatter is a Claude Code concept, not native to Kiro skills
    • The agent config can explicitly grant shell with allowedTools for gh commands
    • The SKILL.md content becomes the agent's prompt (via file:// URI)
  2. Convert review-pr from skill → custom agent (review-pr.json)

    • It's an orchestrator that runs multiple review aspects — this maps directly to the subagent pattern
    • The agent uses subagent tool to spawn individual review skills in parallel
    • trustedAgents can auto-approve the review subagents
    • Eliminates the references/ directory (duplicated content) since subagents load their own skills directly
  3. Keep the 6 individual review skills as skills

    • code-reviewer, code-simplifier, comment-analyzer, pr-test-analyzer, silent-failure-hunter, type-design-analyzer
    • These are loaded via skill:// resources by the agents
    • They work both standalone (auto-triggered by user intent) and as subagent context
  4. Keep steering/code-review-standards.md as-is

    • Loaded via file:// resource by both agents

Files to delete

  • .kiro/skills/code-review/SKILL.md → content moves to agent prompt
  • .kiro/skills/review-pr/SKILL.md → content moves to agent prompt
  • .kiro/skills/review-pr/references/ → entire directory (subagents load their own skills)

Files to keep (unchanged)

  • .kiro/skills/code-reviewer/SKILL.md
  • .kiro/skills/code-simplifier/SKILL.md
  • .kiro/skills/comment-analyzer/SKILL.md
  • .kiro/skills/pr-test-analyzer/SKILL.md
  • .kiro/skills/silent-failure-hunter/SKILL.md
  • .kiro/skills/type-design-analyzer/SKILL.md
  • .kiro/steering/code-review-standards.md

Key benefits

  1. Proper tool permissions: code-review agent gets explicit shell access for gh commands instead of the Claude Code-specific allowed-tools: Bash(gh:*) frontmatter
  2. Parallel execution: review-pr can spawn review aspects as subagents running in parallel instead of sequential skill invocations
  3. No content duplication: The references/ directory (6 files summarizing sibling skills) is eliminated — subagents load the actual skills directly
  4. Native Kiro patterns: Uses custom agents + subagents as documented, rather than encoding orchestration logic in Markdown instructions
  5. Composable: Individual skills still auto-trigger for standalone use; agents compose them for orchestrated workflows

…ents

- Convert code-review skill to custom agent with explicit shell tool
  access for gh CLI (replaces Claude Code-specific allowed-tools)
- Convert review-pr orchestrator skill to custom agent using subagent
  pattern for parallel review execution
- Keep 6 individual review skills (code-reviewer, code-simplifier,
  comment-analyzer, pr-test-analyzer, silent-failure-hunter,
  type-design-analyzer) as skills loaded via skill:// resources
- Remove references/ directory (duplicated content eliminated by
  subagents loading skills directly)
- Agent prompts stored in .kiro/agents/prompts/ via file:// URI

Refs: https://kiro.dev/docs/cli/chat/subagents/
Refs: https://kiro.dev/docs/cli/custom-agents/creating/
- Add .kiro/steering/development-workflow.md (auto-loaded) with mise
  build commands, boundaries, and git worktree workflow from AGENTS.md
- Add design-guidelines skill pointing to docs/DESIGN_GUIDELINES.md
- Add development-guide skill pointing to docs/DEVELOPMENT_GUIDE.md
- Add troubleshooting skill pointing to docs/TROUBLESHOOTING.md
- Fix dprint formatting in review-pr prompt

Skills use on-demand loading: metadata loaded at startup, full content
loaded when the agent determines it is needed. The steering file is
auto-included so agents always have build commands and boundaries.
…lows

On-demand skill pointing to docs/MAINTAINERS_GUIDE.md with PR review
criteria, merge rules, labels, and stale automation summary.
…nals

Skills now contain only frontmatter (name + description for intent
matching) and a pointer to the actual docs/*.md file. Eliminates
content duplication and risk of drift.
- code-review: add shell to allowedTools (needed for gh CLI)
- review-pr: add shell and subagent to allowedTools (needed for gh CLI and spawning code-review subagents)
…erences

Replace stub 'Read docs/...' content with actionable workflow summaries.
Add references/full-guide.md symlinks pointing to the original docs/ files
to avoid content duplication while keeping the skill structure intact.
Replace bash-only ${LOG_LEVEL,,} with tr for /bin/sh compatibility.
code-review is a read-only agent that posts comments via gh CLI.
It does not need write (file modification) or subagent capabilities.
…checkov LOG_LEVEL

- code-reviewer: list .kiro/steering/ first in guideline source order
- review-pr: clarify only code-review runs as subagent, other skills
  run inline using loaded resources
- mise.toml: unset LOG_LEVEL entirely instead of only remapping TRACE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants