Understanding Commands
Relevant source files
The following files were used as context for generating this wiki page:Commands in the Kiro system are automation functions designed to perform specific, high-level tasks, such as setting up project guidelines or retrieving context from the codebase. They are a core part of the Kiro ecosystem, often linked to underlying "skills" that define their behavior. The primary documented command is create-steering-documents, which automates the generation of project-specific standards and conventions.
Other commands provide contextual information from the development environment, such as file contents, git diffs, and terminal output. These commands streamline development by providing AI assistants with the necessary context to perform tasks accurately and consistently.
Sources: kiro-web-app/src/pages/Commands.tsx:5-8, skills/create-steering-documents/SKILL.md:2-3, README.md:214-217
The create-steering-documents Command
This is the most prominent command, designed to generate a set of comprehensive "steering documents" for a development project. These documents act as contextual guidelines for AI assistants, ensuring they adhere to project-specific standards, conventions, and best practices.
Sources: skills/create-steering-documents/SKILL.md:2-3, 19-21, commands/create-steering-documents.md:3-5
Usage
The command is invoked with a natural language description of the project.
Create steering documents for [project description]
Examples:
Create steering documents for a React TypeScript e-commerce applicationCreate steering documents for a Python Django REST API with PostgreSQLCreate steering documents for a Node.js microservices architecture
Sources: commands/create-steering-documents.md:7-13, kiro-web-app/src/pages/Commands.tsx:18-35
Execution Process
The command follows a systematic process to generate the appropriate documents.
This diagram illustrates the four main steps the create-steering-documents command follows, from analyzing the user's request to outputting the final customized documents.
Sources: commands/create-steering-documents-standalone.md:15-200, skills/create-steering-documents/SKILL.md:25-135
1. Project Analysis
The first step is to analyze the project description to determine which steering documents are necessary. The selection is based on the project type.
| Project Type | Recommended Documents |
|---|---|
| Frontend | project-standards.md, git-workflow.md, frontend-standards.md, development-environment.md |
| Backend/API | project-standards.md, git-workflow.md, api-design.md, development-environment.md |
| Full-Stack | All core documents plus technology-specific ones |
| Library/Package | project-standards.md, git-workflow.md, documentation-standards.md |
Sources: commands/create-steering-documents.md:18-32, kiro-web-app/src/pages/Commands.tsx:48-55
2. Document Creation & Customization
Based on the analysis, the system creates documents from a set of core and conditional templates. These are then customized based on language, framework, project scale, and domain-specific needs (e.g., e-commerce, healthcare).
Sources: commands/create-steering-documents.md:34-86, skills/create-steering-documents/SKILL.md:111-126
Steering Documents and Inclusion Logic
Steering documents are markdown files that guide AI assistants. Their inclusion in the AI's context is controlled by front-matter at the top of each file.
The output is a set of files in the .kiro/steering/ directory.
.kiro/steering/
├── project-standards.md
├── git-workflow.md
├── frontend-standards.md
└── api-design.md
Sources: skills/create-steering-documents/SKILL.md:137-143, commands/create-steering-documents-standalone.md:310-317
Inclusion Mechanisms
There are three ways a steering document can be included in an AI interaction's context.
| Inclusion Type | Description |
|---|---|
always | (Default) Included in every interaction. Used for documents without front-matter. |
fileMatch | Included when files matching a fileMatchPattern are in the context. |
manual | Only included when explicitly referenced (e.g., with #steering-name). |
Sources: skills/create-steering-documents/SKILL.md:28-34, 145-151, commands/create-steering-documents-standalone.md:208-214
The front-matter defines this logic.
---
inclusion: always|fileMatch|manual
fileMatchPattern: 'glob-pattern' # for fileMatch only
---
Sources: skills/create-steering-documents/SKILL.md:147-151, commands/create-steering-documents-standalone.md:319-322
The following diagram shows how the system decides which steering documents to use.
This flow shows the decision process for including a steering document based on its front-matter configuration.
Sources: commands/create-steering-documents-standalone.md:208-220, skills/create-steering-documents/SKILL.md:28-34
Contextual Commands
In addition to create-steering-documents, the system supports several commands prefixed with # to fetch contextual information. These are essential for providing the AI with real-time data about the codebase.
| Command | Description |
|---|---|
#File | Get the contents of a specific file. |
#Folder | Get the contents of a specific folder. |
#Problems | View problems in the current file. |
#Terminal | View terminal output. |
#Git Diff | View Git differences. |
#Codebase | Scan the entire codebase. |
Sources: kiro-web-app/src/pages/Commands.tsx:100-129
Relationship between Commands and Skills
Commands are often the user-facing entry point for more complex "skills". A skill defines a capability, like spec-driven-development or create-steering-documents. The command is the mechanism to invoke that skill.
This diagram shows how a user command triggers a corresponding skill within the Kiro system.
The create-steering-documents functionality is defined as a skill, which can be installed as a plugin for AI assistants like Claude Code. This illustrates the modular and extensible nature of the system, where commands are manifestations of underlying, well-defined skills.
Sources: README.md:214-227, skills/create-steering-documents/SKILL.md:1-17, skills/spec-driven-development/SKILL.md:1-10
Conclusion
Commands are a fundamental feature of the Kiro system, providing powerful automation and context-retrieval capabilities. The create-steering-documents command exemplifies this by automating the setup of project-specific guidelines, which enhances the consistency and relevance of AI-assisted development. Simpler contextual commands like #File and #Git Diff further empower the AI by giving it direct access to the state of the development environment. Together, these commands form a robust interface for developers to interact with and guide AI collaborators effectively.
Sources: skills/create-steering-documents/SKILL.md:19-21, kiro-web-app/src/pages/Commands.tsx:5-8