kg init --skeleton, you install the kg-helper agent and let it help inspect your current Kiro setup, suggest a TOML layout, and migrate hand-written JSON agents into something more maintainable.
kg installs an agent whose first job is to improve the way its future agents are defined. Very normal behavior.
What kg init does
Run:
kg-helper agent to:
What the helper actually helps with
The helper is meant for two common situations:- You already have hand-written Kiro JSON agents and want to migrate them to
kg - You want help designing a sane inheritance and template layout instead of freehanding TOML from scratch
- Inspect the current setup with
kg treeand existing agent files - Identify repeated tools, permissions, resources, and MCP servers
- Suggest a flat, layered, or composable layout
- Create the TOML manifests and agent files
- Run
kg diff --format agentbeforekg generate
Back up existing agents first
If you already have JSON agents, make a backup before generating anything:Choose a layout
The helper should not blindly transliterate JSON into TOML line-for-line. That would technically work, but it would miss the whole point. Instead, it should look for repetition and suggest one of these shapes:- Flat: a few agents with little overlap
- Layered: a shared
defaultagent plus child agents - Composable: reusable templates for permissions, tools, resources, or MCP servers
- Shared git shell rules
- Shared MCP server definitions
- Shared resource bundles
- Permission tiers like read-only vs write-capable agents
Review before generating
After the helper creates or updates TOML files, preview the result before writing agent JSON:Generate
Once the diff looks right:~/.kiro/agents/for global agents.kiro/agents/for local agents
Compare against the backup
After generation, compare the new output against your backup:When to use this path
Use the guided path when:- You already have existing Kiro JSON agents
- You want help designing inheritance instead of inventing it from scratch
- You want
kgto inspect the current state before rewriting anything
- You want to learn the file layout first
- You are starting fresh
- You prefer the direct, manual route