Keep AI context fresh by automating the generation of documentation and diagrams. Set up a GitHub action to create these assets when a pull request is closed, ensuring your AI assistant always works with the latest application logic without manual updates.
For recurring AI tasks, such as loading project-specific diagrams or switching models in Claude Code, create short shell aliases (e.g., 'cdi' for 'Claude diagram load'). This avoids retyping long commands and allows you to quickly switch contexts or modes.
Instead of manually providing context in each prompt, use Claude Code's 'append system prompt' command. This preloads crucial information, like architectural diagrams, at the start of a session, leading to faster and more accurate AI responses without repeated file reads.
Configure an AI stop hook to not only run quality checks but also to automatically commit the changes if all checks pass. This creates a fully automated loop: the AI generates code, the hook validates it, and if it's clean, it's committed to the repository with a generated message.
Use 'stop hooks' in Claude Code to create an automated quality gate. After code generation, the hook runs checks like type checking or linting. If errors exist, the output is fed back to the AI with a prompt to fix them, creating a self-correcting workflow.
When prototyping new AI-powered ideas, build them as command-line interface (CLI) tools instead of web apps. The constrained UI of the terminal forces you to focus on the core workflow and logic, preventing distraction from visual design and enabling faster shipping of a functional version.
Feed AI coding tools text-based Mermaid diagrams which compress complex application logic into a format AIs can parse much faster and more accurately than raw code. This improves the quality and speed of AI-generated work by providing compressed, robust context.
When your primary AI assistant gets stuck, export the conversation and feed it to a different model (e.g., GPT-4 or Gemini). This 'second opinion' can critique the original interaction and help you revise your prompt to get back on track, rather than trying to argue with the stuck AI.
To unlock the full potential of AI, don't just assign it single tasks. Instead, ask: 'If I had infinite, always-available junior talent, what is the ideal process I'd have them follow for a new ticket?' This framing helps you design more comprehensive, multi-step prompts and automations.
