skills/openclaw-kirocli-skill/skills/kiro-cli/SKILL.md
Spawn Kiro CLI via background process for code-related tasks. Use when user mentions "kiro", "kiro-cli", or needs to work with code — writing, modifying, reading, analyzing, reviewing, debugging, explaining, or understanding codebases. This includes building features, fixing bugs, refactoring, writing tests, code review, and exploring unfamiliar code.
npx skillsauth add aws-samples/sample-openclaw-on-aws-with-bedrock kiro-cliInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
AWS AI coding assistant for building, testing, and deploying applications with automated workflows.
Model: claude-sonnet-4.6 is the default (set via kiro-cli settings chat.defaultModel)
Kiro is an interactive terminal app. Always use pty:true in exec tool:
bash pty:true command:"kiro-cli"
Without PTY, output breaks or agent hangs.
| Parameter | Type | Description |
|-----------|------|-------------|
| command | string | The shell command to run |
| pty | boolean | Use for kiro! Allocates pseudo-terminal for interactive CLIs |
| workdir | string | Working directory — ⚠️ may fallback to cwd if unavailable, use mkdir -p && cd instead |
| background | boolean | Run in background, returns sessionId for monitoring |
| timeout | number | Timeout in seconds (kills process on expiry) |
| elevated | boolean | Run on host instead of sandbox (if allowed) — use when kiro needs full file system access |
| Action | Description |
|--------|-------------|
| list | List all running/recent sessions |
| poll | Check if session is still running |
| log | Get session output (with optional offset/limit) |
| write | Send raw data to stdin |
| submit | Send data + newline (like typing and pressing Enter) |
| send-keys | Send key tokens or hex bytes |
| paste | Paste text (with optional bracketed mode) |
| kill | Terminate the session |
| Mode | Command |
|------|---------|
| Interactive | kiro-cli |
| One-shot | kiro-cli chat --no-interactive "prompt" |
| Auto-approve all | add --trust-all-tools |
| Auto-approve specific | add --trust-tools "fs_read,fs_write" |
| Resume session | add --resume or --resume-picker |
| Custom agent | add --agent <name> |
Use for automation and one-shot queries:
# Single response, then exit (mkdir -p ensures directory exists)
bash pty:true command:"mkdir -p ~/project && cd ~/project && kiro-cli chat --no-interactive 'List TODO comments'"
# Auto-approve all tools
bash pty:true command:"mkdir -p ~/project && cd ~/project && kiro-cli chat --no-interactive --trust-all-tools 'Create hello.py'"
# Trust specific tools only
bash pty:true command:"mkdir -p ~/project && cd ~/project && kiro-cli chat --no-interactive --trust-tools 'fs_read,fs_write' 'Summarize package.json'"
⚠️ Always use mkdir -p <dir> && cd <dir> && instead of workdir: parameter — if workdir is unavailable, exec may fallback to ~/.openclaw/workspace which contains sensitive files.
Use for multi-turn conversations or longer tasks:
# Start background session
bash pty:true background:true command:"mkdir -p ~/project && cd ~/project && kiro-cli"
# Returns sessionId for tracking
# Monitor output
process action:log sessionId:<id>
# Check if still running
process action:poll sessionId:<id>
# Send input (if kiro asks a question)
process action:write sessionId:<id> data:"y"
# Submit with Enter (like typing and pressing Enter)
process action:submit sessionId:<id> data:"Build a REST API"
# Kill if needed
process action:kill sessionId:<id>
Why directory matters: Kiro wakes up in a focused directory, doesn't wander off reading unrelated files (like your SOUL.md 😅).
kiro-cli chat --resume # Resume last session in current directory
kiro-cli chat --resume-picker # Pick from saved sessions
kiro-cli chat --list-sessions # List all sessions
kiro-cli chat --delete-session <ID> # Delete a session
In-chat commands:
/chat save <name> — Save current conversation/chat load <name> — Load saved conversation/chat resume — Resume from saved sessions/tools # List all tools and permissions
/tools trust read # Trust a tool for session
/tools untrust shell # Require confirmation
/tools trust-all # Trust all tools (use carefully!)
/tools reset # Reset to defaults
Default: only read is trusted. Others require confirmation.
/context show # View current context usage
/context add README.md # Add file to session context
/context add docs/*.md # Add with glob pattern
/context remove file.py # Remove from context
/context clear # Clear all session context
For persistent context, use agent resources field instead.
Use @path syntax to include files inline:
@src/index.ts # Include file contents
@src/ # Include directory tree
@"path with spaces.txt" # Quoted paths
Tab completion works after @.
/model # Show current model
/model <name> # Switch model
/model set-current-as-default # Save as default
Models: Auto (cost-effective), Claude Opus 4.6, Claude Sonnet 4.6/4.5/4.0, Claude Haiku 4.5
kiro-cli agent list # List agents
kiro-cli agent create my-agent # Create new agent
kiro-cli agent generate # AI-assisted creation
kiro-cli --agent my-agent # Use agent
Config: .kiro/agents/ (local) or ~/.kiro/agents/ (global)
Drag and drop images into terminal, or use /paste for clipboard. Supported: JPEG, PNG, GIF, WebP (max 10MB, up to 10 images per request).
Use /help to switch to built-in Help Agent for questions about Kiro CLI features, commands, and configuration.
Suggest /plan to user for complex multi-step tasks:
> /plan Build a user auth system
Workflow: Requirements → Research → Plan → Handoff
Plan agent is read-only (can explore code but not modify).
# Quick one-shot
bash pty:true command:"mkdir -p ~/project && cd ~/project && kiro-cli chat --no-interactive --trust-all-tools 'Add error handling'"
# Long task with wake notification
bash pty:true background:true command:"mkdir -p ~/project && cd ~/project && kiro-cli chat --no-interactive --trust-all-tools 'Refactor auth module. When done: openclaw gateway wake --text \"Done\" --mode now'"
# With custom agent
bash pty:true background:true command:"mkdir -p ~/project && cd ~/project && kiro-cli --agent aws-expert 'Set up Lambda'"
pty:true — Kiro needs a terminal--no-interactive for automation--trust-all-tools for unattended execution/plan for complex tasks — let user decidemkdir -p <dir> && cd <dir> && not workdir: — workdir fallback can leak into ~/.openclaw/workspaceWhen you spawn kiro in the background, keep the user in the loop:
This prevents the user from seeing only "Agent failed before reply" and having no idea what happened.
See references/advanced.md for:
tools
# EventBridge Cron — Scheduled Tasks Schedule recurring tasks via Amazon EventBridge Scheduler. Tasks execute at the specified time and deliver results to the user's chat channel. ## Usage ```bash node /skills/eventbridge-cron/tool.js '<JSON>' ``` ## Actions ### Create a schedule ```json {"action":"create", "cron_expression":"cron(0 9 * * ? *)", "timezone":"Asia/Shanghai", "message":"Check email and summarize unread messages", "schedule_name":"Daily email check"} ``` ### List all schedules
tools
Upload and share files via Amazon S3 with time-limited pre-signed URLs. Generate download links, create upload pages for receiving files, and manage secure file sharing without exposing S3 buckets publicly.
tools
Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layers like Lobster, ACPX, plugins, or plain code. Keep conditional logic in the caller; use TaskFlow for flow identity, child-task linkage, waiting state, revision-checked mutations, and user-facing emergence.
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------