/
© 2026 RiffOn. All rights reserved.
  1. How I AI
  2. Advanced Claude Code techniques: context loading, mermaid diagrams, stop hooks, and more | John Lindquist
Advanced Claude Code techniques: context loading, mermaid diagrams, stop hooks, and more | John Lindquist

Advanced Claude Code techniques: context loading, mermaid diagrams, stop hooks, and more | John Lindquist

How I AI · Jan 26, 2026

Master advanced Claude Code techniques: Leverage mermaid diagrams for context, alias commands for speed, and use stop hooks for code quality.

Automate AI Context Generation by Creating Diagrams in Your CI/CD Pipeline

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.

Advanced Claude Code techniques: context loading, mermaid diagrams, stop hooks, and more | John Lindquist thumbnail

Advanced Claude Code techniques: context loading, mermaid diagrams, stop hooks, and more | John Lindquist

How I AI·24 days ago

Create Shell Aliases for Repetitive AI Commands to Accelerate Your Workflow

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.

Advanced Claude Code techniques: context loading, mermaid diagrams, stop hooks, and more | John Lindquist thumbnail

Advanced Claude Code techniques: context loading, mermaid diagrams, stop hooks, and more | John Lindquist

How I AI·24 days ago

Preload Persistent Context into Claude Code Using the 'append system prompt' Command

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.

Advanced Claude Code techniques: context loading, mermaid diagrams, stop hooks, and more | John Lindquist thumbnail

Advanced Claude Code techniques: context loading, mermaid diagrams, stop hooks, and more | John Lindquist

How I AI·24 days ago

Automate Git Commits Using AI Stop Hooks After Successful Quality Checks

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.

Advanced Claude Code techniques: context loading, mermaid diagrams, stop hooks, and more | John Lindquist thumbnail

Advanced Claude Code techniques: context loading, mermaid diagrams, stop hooks, and more | John Lindquist

How I AI·24 days ago

Implement AI Stop Hooks to Automatically Run Quality Checks and Trigger Self-Correction

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.

Advanced Claude Code techniques: context loading, mermaid diagrams, stop hooks, and more | John Lindquist thumbnail

Advanced Claude Code techniques: context loading, mermaid diagrams, stop hooks, and more | John Lindquist

How I AI·24 days ago

Build Prototypes as CLI Tools to Avoid UI Distractions and Ship Faster

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.

Advanced Claude Code techniques: context loading, mermaid diagrams, stop hooks, and more | John Lindquist thumbnail

Advanced Claude Code techniques: context loading, mermaid diagrams, stop hooks, and more | John Lindquist

How I AI·24 days ago

Use Machine-Readable Mermaid Diagrams to Efficiently Load Context into AI Coding Assistants

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.

Advanced Claude Code techniques: context loading, mermaid diagrams, stop hooks, and more | John Lindquist thumbnail

Advanced Claude Code techniques: context loading, mermaid diagrams, stop hooks, and more | John Lindquist

How I AI·24 days ago

Use a Second AI Model as a Mediator to Troubleshoot a Stuck AI Assistant

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.

Advanced Claude Code techniques: context loading, mermaid diagrams, stop hooks, and more | John Lindquist thumbnail

Advanced Claude Code techniques: context loading, mermaid diagrams, stop hooks, and more | John Lindquist

How I AI·24 days ago

Design AI Workflows by Framing the AI as 'Infinite Junior-to-Mid Career Talent'

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.

Advanced Claude Code techniques: context loading, mermaid diagrams, stop hooks, and more | John Lindquist thumbnail

Advanced Claude Code techniques: context loading, mermaid diagrams, stop hooks, and more | John Lindquist

How I AI·24 days ago