Video summary

The senior engineer's guide to AI coding: Context loading, custom hooks, and automation

Main summary

Key takeaways

Technology

Overview

The episode presents advanced workflows for using AI coding tools—especially Claude Code and Cursor—to improve code quality, reduce repetitive work, and help engineers understand unfamiliar codebases.

Key Techniques and Workflows

Preload application context with Mermaid diagrams

Mermaid diagrams stored in Markdown can describe application flows, database operations, user interactions, and connections between components. Because AI tools can process diagrams as text, they can answer questions—such as how authentication works—without first searching through many files.

John demonstrates using --append-system-prompt in Claude Code to load project diagram files into context at startup. This uses more tokens up front, but can make subsequent work faster and more reliable.

For existing projects, generate diagrams to help AI and engineers get oriented. For new work, the suggested sequence is to build and verify the feature first, then document it.

Use documentation for people and AI

Markdown, diagrams, and metadata can provide shared context for engineers, AI agents, and customer-facing documentation. Diagrams can also help explain data flows to customers or prepare compliance and security materials. Documentation can be generated or updated as part of a pull-request workflow.

Create shell aliases for recurring AI workflows

Short aliases can launch Claude Code with specific settings, models, permissions, prompts, or project context. For example, an alias could use a faster, less capable model for a task or start a session with selected diagrams already loaded.

The discussion emphasizes exploring command-line options rather than using AI tools only through their chat interfaces.

Build small command-line tools for personal workflows

John demonstrates a CLI that wraps Gemini to generate visual concepts for a website—in this example, a Christmas-decoration store—and produce multiple image variations. A generated image can then serve as a starting point for building the site with an AI coding tool.

More broadly, use AI to quickly build small, purpose-specific tools. A simple terminal interface may be more useful than spending time creating a full UI.

Automate code checks with Claude Code hooks

A stop hook can run when Claude finishes a turn. John’s example checks whether files have changed, runs a TypeScript check, returns any errors to Claude for correction, and commits the changes if the checks pass.

Hooks can also run formatting, linting, build checks, dependency checks, complexity analysis, or duplicate-code detection. They can be configured locally or shared through project settings so a team can apply consistent workflows.

Implementation note: Hook output sent through console.log can become input to the agent. Keep command output controlled, and use other logging methods for debugging.

Guidance for Senior Engineers and Teams

AI can help with more than writing code. It can investigate an issue, trace file history, identify likely risks and affected areas, and produce an orientation summary before implementation begins. Teams can automate an initial investigation when an issue is opened in tools such as GitHub or Linear.

To achieve meaningful productivity gains, engineers should identify the checks and investigative steps they would perform with unlimited time, then turn suitable parts into prompts, scripts, or hooks.

The recommended setup combines a CLI and an IDE: CLIs are well suited to configurable, repeatable workflows, while IDEs support focused code editing and can provide diagnostics and extensions to AI agents.

For substantial changes, use planning modes. If an AI conversation has drifted and cannot be corrected promptly, consider reverting to a previous commit and starting over. A second model can review an exported conversation and relevant code to provide an independent assessment.

Guides and Demonstrations

  1. Loading Mermaid diagrams into Claude Code as startup context.
  2. Creating aliases for repeatable AI coding configurations.
  3. Building a Gemini-powered CLI for generating website design concepts.
  4. Setting up a Claude Code stop hook for TypeScript validation, error correction, and conditional commits.
  5. Using AI to investigate unfamiliar code and prepare for software issues.

Main Speakers and Sources

  • John Lindquist — Co-founder of egghead.io; demonstrates the coding workflows and tools.
  • Claire Vo — Host of How I AI; asks questions and adds commentary on engineering workflows and team adoption.
  • Sponsors mentioned — WorkOS and Tines.

Rate this summary

Your feedback will help improve summaries.

Improve this summary

Reprocess with a stronger model when the summary feels incomplete or inaccurate.

Pro

Translate summary in another language

Pro

Ask questions to this video

Chat for follow-up questions, clarifications, and source-backed answers.

Coming soon

Share this summary

Original video