Member-only story
Script to Create an Amazon Q CLI Agent With Custom Context
An agent to automatically enforce coding standards and other rules
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
⚙️ Security Automation (Pre-AI). The Code.
⚙️ AI Automation. The Code.
🔒 Related Stories: Cybersecurity | Penetration Tests
💻 Free Content on Jobs in Cybersecurity | ✉️ Sign up for the Email List
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I’ve already explored different ways to get Q to stop making mistakes and follow all my wishes in prior post. Here’s today’s experiment.
The goal: Get Q to generate the correct content in the first place instead of fixing it after the fact
I’ve been doing things like writing rust tests that check my code to ensure code is written the way I want, but the problem is, Q writes the code and then I have to fix it all. I want to save some time by getting Q to write the code correctly in the first place.
Today’s solution ~ a custom agent that has it’s own context added when started
I added a script to my AWS scripts repository that creates a custom agent that can enforce rules while you’re generating code. It deploys the agent and a…

