Video summary

10 Crazy Claude Code Tips That Give You An Unfair Advantage

Main summary

Key takeaways

Technology

Why “Cloud Code” can fail & what’s changed recently

  • The video argues that even though Anthropic Claude Code is powerful for AI development, its behavior can “fall apart” on certain tasks.
  • The presenters note Anthropic has added new features recently, changing the “proper” way to use Claude Code/workflows.

New feature: insights command (self-analysis of past sessions)

Anthropic added an insights command for Claude Code.

It analyzes past Claude Code sessions over a time window and generates a report that:

  • assesses the user’s working style
  • “roasts” patterns
  • highlights what went well vs. what didn’t
  • provides improvement suggestions

The team used the report to identify where they experienced the most friction and then adjusted workflow prompts/features accordingly.

Example fix from the report

  • They had a session where a main agent kept pulling a task list indefinitely (using “agent teams”).
  • Mitigation:
    • copy a prompt into claude.md so Claude won’t poll indefinitely in multi-agent setups
    • establish expected behavior so multi-agent execution completes

Core productivity tip: context quality > everything

The presenters emphasize that the most important step is providing excellent context to the agent.

They recommend:

  • splitting requirements into subparts
  • documenting frameworks/libraries the agent must use

Claim: with strong context, errors drop dramatically (“errors basically drop to zero” in their experience).

Claude-written project documentation templates

Instead of writing docs manually, they prefer having Claude generate them using a structured prompt that creates four key files:

  1. PRD: requirements + scope
  2. architecture.md: data formatting, file structure, APIs, architecture details
  3. decision.mmd: a record of decisions Claude made (reference for future work)
  4. feature.json: features encoded in a token-efficient JSON format
    • includes criteria for “feature completeness”
    • tracks implementation progress via a passes key

Tooling via Context 7 MCP (keeping dependencies current)

They use Context 7 MCP to provide up-to-date docs for libraries/frameworks to agents.

Setup is described as quick:

  • once installed, the MCP fetches library info directly

Benefits:

  • reduces “dependency mismatch” bugs
  • improves implementation accuracy due to current documentation

Lifecycle hooks in Claude Code (exit codes for control)

They highlight hooks as an underused feature.

Hooks are shell commands triggered at specific lifecycle points (e.g., session start, before tool use, after tool use).

The key mechanism: exit codes that control whether the agent proceeds:

  • exit code 0 = success
  • exit code 2 = blocking error (agent receives an error message and can correct itself)
  • other codes = non-blocking; execution continues (often shown in verbose mode)

Test protection via hook

For TDD-related behavior, Claude sometimes modifies tests to make them pass. To prevent this, they add a hook triggered on pre-tool use to block test modifications:

  • if the path is a test directory or contains “test”
  • return exit code 2 with an error message (“modifications to test folders are not allowed”)

Result: Claude stops editing protected test files.

Experimental MCP CLI mode to prevent context bloat

MCP usage can bloat the context window, especially as more MCP tools are connected.

Claude Code has an experimental MCP CLI mode:

  • set experimentalMCPLI flag to true

Mechanism:

  • instead of loading all MCP tool schemas into memory/context, Claude uses:
    • MCPLI info
    • MCPLI calls
    • runs required tools on demand via bash

Benefit:

  • reduces context exhaustion by only loading what’s needed when it’s needed

Workflow reliability: Git + isolated parallelism (work trees)

They stress using Git version control for traceability and rollback.

Workflow described using work trees rather than branches:

  • parallel agents work in isolated work trees to avoid file conflicts
  • after implementation, outputs are merged into a single directory

Reasoning:

  • branches share working directories → more conflicts
  • work trees provide isolation

Strict mode for fewer runtime failures (TypeScript example)

They use language strict mode (specifically TypeScript strict: true) to shift error detection earlier.

Strict mode enables checks like:

  • null safety
  • implicit type restrictions
  • stricter typing

Claim: AI agents don’t inherently catch runtime errors well, so strict compile-time checking + terminal logs reduces runtime failures.

Testing strategy beyond “scripts”: user stories + acceptance criteria

They add an additional testing layer using user stories that specify:

  • how users interact with the system
  • priority
  • acceptance criteria
  • edge cases and “best case”

They generate these stories before implementation to set a standard.

Then they have Claude implement features and verify them story-by-story, starting with each story’s optimal path and ensuring edge cases are covered.

Parallelization tradeoff: speed vs token usage

They recommend parallel agents where possible to speed up workflow.

Downside:

  • parallelization increases token usage

Adversarial agent setup for research accuracy (fact checking)

They describe a failure mode: research with a single agent kept hallucinating, even when sources were provided, causing repeated manual corrections.

Fix: a two-agent adversarial setup:

  • Agent A conducts the research
  • Agent B fact-checks the output (blocked until first draft exists)

Outcome:

  • the fact-checker quickly identifies inaccuracies
  • both agents continuously communicate to tighten correctness

Suggested pattern also for dev tasks:

  • one agent implements; another reviews against the plan

“Eyes” for agents: browser-based verification tools

They argue agents need ways to verify their own work, but terminal-only agents can’t see runtime/client-side issues—so they add browser/automation tools:

  1. Claude Chrome extension
    • browser-centric tools like DOM capture and console log checking
  2. Puppeteer MCP
    • isolated browser session that doesn’t share existing logins/sessions (privacy benefit)
  3. “Versil’s agent browser” (preferred)
    • CLI tool providing navigation and screenshot capture
    • uses the accessibility tree with unique element references
    • compacts the DOM from thousands of tokens to ~200–400 tokens
    • addresses the main context issue with the Claude Chrome extension (which loads the full DOM into context)

Instruction they add

  • In claude.md, Claude is instructed to prefer agent browser first, with MCP-based testing as fallback.

Predictive error finding (before tests catch anything)

Beyond testing and code review, they use Claude to:

  • predict failures that haven’t happened yet
  • inspect code for likely break points by pattern matching against failures seen in other apps

Result claim:

  • they found 18 production-harmful issues that passed their multi-layer testing

Templates via “AIABS Pro”

They mention all these tips are packaged as ready-to-use templates/prompts/commands/skills in AIABS Pro, a community for plugging workflows into projects.

Main speakers / sources

  • Main speaker: “our team / we” (narrator) — a single primary speaker presenting the tips from their team’s experience.
  • Referenced sources/creators:
    • Anthropic (for Claude Code features like insights, hooks, MCP behavior, MCP CLI mode)
    • Claude Code creator (quoted conceptually about giving agents a way to verify work / “eyes”)
  • Tools mentioned (not as speakers): Claude Code, Context 7 MCP, Puppeteer MCP, Versil agent browser, Claude Chrome extension.

Original video