A collection of custom agents for Amazon Q CLI, designed to enhance productivity and streamline development workflows.
This repository demonstrates best practices for creating maintainable Amazon Q CLI agents using external prompt files and streamlined resource management.
File: context-logger.json
A project context manager that creates comprehensive event-based documentation for work sessions, decisions, and troubleshooting.
Features:
- Event-based context logging with
YYYY-MM-DD-context-name.mdformat - Stores files in
.orbit/context/directory - Includes technical details, current state, and decision rationale
- Optimized for team continuity and work resumption
Usage:
q chat --agent context-loggerYou can also swap agents in Amazon Q. Here's how you can do that.
In Q type:
/agent swap <agent_name>This repository uses an external prompts pattern for better maintainability:
- Agent JSON: Contains configuration and references to external resources
- Prompt Files: Detailed instructions stored in
prompts/directory - Resource Files: Supporting documentation and conventions
Benefits:
- Easier editing and version control of prompts
- Improved readability and collaboration
- Clear separation of configuration and content
├── context-logger.json # Agent configuration
├── context-logger/ # Agent resources
│ ├── commands.md # Usage examples
│ └── conventions.md # File format and structure
├── prompts/
│ └── context/
│ └── prompt.md # External prompt file
└── .gitignore # Protects sensitive configs
-
Clone the repository:
git clone <repository-url> cd custom-q-agents
-
Copy agents to your Q CLI directory:
# For workspace-specific agents mkdir -p .amazonq/cli-agents cp *.json .amazonq/cli-agents/ cp -r prompts/ .amazonq/cli-agents/ cp -r */ .amazonq/cli-agents/ # For global agents mkdir -p ~/.aws/amazonq/cli-agents cp *.json ~/.aws/amazonq/cli-agents/ cp -r prompts/ ~/.aws/amazonq/cli-agents/ cp -r */ ~/.aws/amazonq/cli-agents/
-
Use the agents:
q chat --agent context-logger
- Modify prompt files in
prompts/for different behavior - Update resource files for project-specific conventions
- Adjust agent configurations as needed
- External Prompts: Keep complex prompts in separate
.mdfiles - Resource Consolidation: Eliminate duplication across agents
- Clear Conventions: Document file formats and organizational patterns
- Sensitive Data: Use
.gitignoreto protect personal configurations
- Fork the repository
- Create agents following the external prompts pattern
- Test thoroughly with Amazon Q CLI
- Submit pull requests with clear descriptions
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.