AWS Builder Center

10 Kiro CLI Tips You're Probably Not Using

These 10 Kiro CLI tips (goals, custom agents, permissions, and conversation branching) will level up your AI-assisted development workflow.

If you've been using Kiro CLI for a few weeks, you're probably familiar with asking questions, generating code, and getting explanations. But there's a lot more under the surface. Here are 10 Tips to help you work faster and get more out of your AI-assisted workflow.

1. Start Every Session with /goal

The single biggest productivity unlock in Kiro CLI is setting a clear goal at the start of your session. The /goal command tells Kiro what you're trying to accomplish, giving it persistent context that shapes every subsequent interaction.
1
/goal fix all failing tests in auth module --max 10
Without a goal, Kiro treats each prompt independently. With one, it maintains focus across your entire session: suggesting relevant files, anticipating next steps, and keeping its responses aligned with your objective. Think of it as the difference between giving someone a single task vs. briefing them on the mission.

2. Configure Granular Permissions

By default, Kiro CLI asks for confirmation before running shell commands. For commands you run hundreds of times a day (npm test, cdk diff, git status) this friction adds up. You can reduce it by pre-approving known commands.
Permissions is one area changing between Kiro CLI v2 and v3. When working with tools like Kiro CLI, I strongly prefer granular permissions associated with the task or agent. I frequently use Kiro CLI to generate the needed permissions for smooth agent execution.

Kiro CLI v2 Permissions (toolSettings)

In v2, permissions were managed by a combination of CLI flags, slash commands, and per-tool settings in your agent configuration.
1
2
3
4
5
# CLI Flags
kiro-cli --trust-tools shell, write

# Slash Commands
/tools trust <tool>
1
2
3
4
5
6
7
8
9
10
"toolsSettings":{
"shell":{
"allowedCommands":["git *","npm *"],
"deniedCommands":["rm -rf *","sudo *"]
},
"read":{
"allowedPaths":["src/**"],
"deniedPaths":["*.env"]
}
}

v3 Permissions (permissions.yaml)

In v3, Kiro CLI replaces toolSettings with permissions.yaml files. User scoped rules can be defined within ~/.kiro/settings/permissions.yaml. Workspace scoped rules are stored outside the repository ~/.kiro/workspace-roots/<hash>/permissions.yaml.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
rules:
- capability: shell
match: ["git *", "npm *", "npx *"]
effect: allow

- capability: fs_write
match: ["src/**", "tests/**"]
effect: allow

- capability: fs_read
effect: allow

- capability: mcp
match: ["my-server/*"]
effect: allow

3. Let LSP Do the Heavy Lifting

Improve Kiro CLI code generation and refactoring with a Language Server. This integration will enable real type information, symbol references, and compiler diagnostics. Kiro won't hallucinate method names because it sees the same API surfaces your IDE does. If it generates code with a type mismatch or missing import, it catches the diagnostic immediately and self-corrects.
1
2
3
4
5
> rename FetchUser to fetchUserData across the project

✓ Found 12 references across 5 files
✓ AST-aware rename (not string replace)
✓ Updated: auth.ts, userService.ts, handlers.ts, tests/auth.test.ts, types.d.ts

4. Run External Commands with !command

Need to check something without leaving your Kiro session? The ! prefix executes shell commands inline. The command and response are not part of your Kiro CLI context.
1
2
3
!aws sts get-caller-identity # Retrieve AWS credentials

!clear #shell clear command
This command will save you time having to quit and restart the application.

5. Reference Files with @path

Use the @ prefix to reference files or directories inline with your prompt. This gives the agent precise, targeted context, or tells it exactly where to apply changes, without copy-pasting content.
1
@myproject/infra/docker-compose.yml add a Redis container on port 6379
The @ prefix turns vague requests into precise operations. Instead of letting the agent guess which file you mean or search the entire codebase for context, point it exactly where to look and what to change.

6. Manage Context Window with /compact

Long sessions accumulate context. When reaching your limit, /compact compresses your conversation history, preserving key decisions and context while freeing up token budget for new work.
Use it proactively:
  • After completing a major subtask
  • When switching focus areas within a session
  • Before starting a complex multi-file refactor
Think of /compact as "saving your progress". Kiro retains what matters and drops the noise.

7. Custom Agents

Kiro lets you build a roster of focused agents with their own tools, permissions, and prompts. Built-in agents cover the essentials. Custom agents can be locked down to narrow workflows like deploys or PR reviews. Each agent only has access to what it needs. The result is shorter prompts, safer operations, and agents that get better at one job instead of mediocre at everything.
You can switch between agents mid-session without losing context.
1
2
3
4
5
# Launch a session w/ non-default agent
kiro-cli chat --agent reviewer

# Swap agents mid-session
/agent swap tester

8. Get Your Bearings with /code overview

Joining a new project? Returning to code you haven't touched in weeks? /code overview gives Kiro a structured scan of your project: directory layout, key files, dependencies, and architecture patterns.
1
/code overview
Kiro will read your project structure, identify the tech stack, and build a mental model it uses for the rest of the session. This is more effective than starting from scratch.

9. Fork Your Conversation with /rewind

Made a wrong turn? /rewind lets you jump back to any earlier prompt and branch off in a new direction — without losing your original thread.
This is particularly valuable when the conversation drifts:
  1. Ask Kiro to refactor your auth module using JWTs
  2. Three prompts later, you realize it went down a middleware rabbit hole
  3. /rewind — pick the turn right after step 1
  4. Say "Actually, keep the token logic but skip the custom middleware — use the framework's built-in auth guard instead"
No need to start a fresh session or re-explain your entire context. /rewind rolls back the conversation — not your files — so you keep your working codebase while resetting Kiro's train of thought. Think of it as git branching for your AI dialogue.

10. /copy - Clipboard Access That Works Everywhere (Even Over SSH)

The /copy command grabs the last assistant response and puts it directly in your local clipboard. No mouse, no selection, no scrollback archaeology.
1
2
3
4
5
> generate an nginx reverse proxy config for port 3000
✓ Generated config with SSL termination, rate limiting, and WebSocket support

/copy
✓ Copied to clipboard
Your terminal forwards the clipboard write back to your local machine transparently. Remote Kiro session on a jump box three hops deep? /copy still lands the text on your machine's clipboard, ready to paste into your local editor, Slack message, or PR description.

What Did I Miss?

What Kiro CLI tips are you using that didn't make this list? And which of these would you like to see a deeper dive on? Drop a comment or reach out — I'm always looking for the next post.

Additional Resource


Steve Wolfe is a Senior Solutions Architect at AWS specializing in AI/ML and modern application development.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article