Skip to content

brettg98/custom-q-agents

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Custom Q Agents

A collection of custom agents for Amazon Q CLI, designed to enhance productivity and streamline development workflows.

Overview

This repository demonstrates best practices for creating maintainable Amazon Q CLI agents using external prompt files and streamlined resource management.

Available Agents

Context Logger

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.md format
  • 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-logger

You can also swap agents in Amazon Q. Here's how you can do that.

In Q type:

/agent swap <agent_name>

Architecture

External Prompts Pattern

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

Directory Structure

├── 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

Getting Started

  1. Clone the repository:

    git clone <repository-url>
    cd custom-q-agents
  2. 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/
  3. Use the agents:

    q chat --agent context-logger

Customization

  • Modify prompt files in prompts/ for different behavior
  • Update resource files for project-specific conventions
  • Adjust agent configurations as needed

Best Practices

  1. External Prompts: Keep complex prompts in separate .md files
  2. Resource Consolidation: Eliminate duplication across agents
  3. Clear Conventions: Document file formats and organizational patterns
  4. Sensitive Data: Use .gitignore to protect personal configurations

Contributing

  1. Fork the repository
  2. Create agents following the external prompts pattern
  3. Test thoroughly with Amazon Q CLI
  4. Submit pull requests with clear descriptions

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.

GPL v3 Summary

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.

References

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published