Skeletons
Skeletons are agent templates that don’t generate JSON files. They exist only to be inherited by other agents.
Purpose
Use skeletons to:
- Create reusable configuration components
- Define common tool settings
- Build agent templates
- Organize complex inheritance hierarchies
Declaration
Mark an agent as a skeleton with skeleton = true:
[agents]
git-base = { skeleton = true }
kg will skip generating ~/.kiro/agents/git-base.json but the configuration is available for inheritance.
Example: Git Permissions
Create a skeleton with git commands:
[agents.git-readonly]
skeleton = true
[agents.git-readonly.toolsSettings.execute_bash]
allowedCommands = [
"git status .*",
"git fetch .*",
"git diff .*",
"git log .*"
]
autoAllowReadonly = true
Use it in real agents:
[agents.rust]
inherits = ["git-readonly"]
allowedTools = ["@rustdocs", "@cargo"]
Example: Permission Levels
Create a hierarchy of permission skeletons:
[agents.git-readonly]
skeleton = true
[agents.git-readonly.toolsSettings.execute_bash]
allowedCommands = ["git status .*", "git fetch .*", "git diff .*"]
[agents.git-write]
skeleton = true
inherits = ["git-readonly"]
[agents.git-write.toolsSettings.execute_bash]
allowedCommands = ["git add .*", "git commit .*"]
[agents.git-full]
skeleton = true
inherits = ["git-write"]
[agents.git-full.toolsSettings.execute_bash]
allowedCommands = ["git push .*", "git pull .*"]
Then use them:
[agents.reviewer]
inherits = ["git-readonly"]
[agents.developer]
inherits = ["git-write"]
[agents.maintainer]
inherits = ["git-full"]
Validation
Skeletons appear in kg validate output but are marked as templates:
kg validate
They won’t appear in the generated agents directory.
Best Practices
- Use descriptive names that indicate purpose (
git-readonly, notgit1) - Keep skeletons focused on a single concern
- Document what each skeleton provides
- Avoid deep skeleton-only inheritance chains (max 2-3 levels)