Context documents provide essential information to AI skills about your project, its architecture, and the roles they should play. These documents help skills make better decisions and produce more relevant code.
--file <path> - Path to file containing new content
--content <text> - Direct content to set
Examples:
Copy
# Update from filenut context update project --file ./new-project.md# Update with direct contentnut context update role --content "# Role Definition\n\nAI skills should focus on code quality and testing..."# Replace architecture documentnut context update architecture --file ./docs/architecture.md
Using update replaces the entire document. Use append to add content without replacing existing text.
# Architecture## System DesignWe use a microservices architecture with the following services:- API Gateway- Auth Service- Product Service- Order Service- Payment Service## Design Patterns- Repository pattern for data access- Factory pattern for service creation- Observer pattern for event handling## Code Organization- `/src/services` - Business logic- `/src/models` - Data models- `/src/controllers` - API controllers- `/src/utils` - Utility functions
Regularly update context documents as your project evolves. Outdated information can lead to AI skills making incorrect assumptions.
Be specific and detailed
The more detail you provide, the better AI skills can understand your project and make appropriate decisions. Include coding standards, architectural patterns, and specific requirements.
Use consistent formatting
Structure your context documents with clear headings and sections. Markdown formatting makes documents easier to read and parse.
Start simple, iterate
Begin with basic context and expand over time. You don’t need perfect, comprehensive context on day one—add details as you discover what information skills need most.