Claude Code & Context Engineering

CLAUDE.md/AGENTS.md systems, Skills, hooks, subagents and cost control for AI coding agents.

Claude Code works out of the box and still wastes your money out of the box. The gap between a default install and a tuned one is not model quality — it is setup: what your CLAUDE.md loads into every request, which hooks guard your workflow, how subagents split the work, and which settings stop small sessions turning into long expensive ones. The guides in this category close that gap in the order it pays off.

Read it in this order

Start with your first CLAUDE.md, then the version that actually works once a project grows, then the team variant if anyone else touches the repo. Next, hooks: read the by-event map before the deep dive, so you know which hook fires when before you write one. Then subagents versus a single long session, the briefs that make subagents useful, and finally cost: the settings that cut spend, the habits that keep it cut, and the cost ladder for deciding whether a paid plan is even your problem.

Where people go wrong

The expensive mistakes repeat. A CLAUDE.md that tries to document the whole project charges you for that documentation on every single request. Hooks written before you know the event order fire at the wrong moment and get deleted in frustration. Subagents spawned without a tight brief return summaries you cannot act on, so you pay twice — once for the subagent, once for redoing the work in the main session. And the most common one: upgrading a plan to fix a cost problem that was actually a context problem.

The sequenced hub for this cluster: Claude Code hub · All articles: the full library

42 articles

Claude Code & Context Engineering

How to Point Claude Code at a Free Gemini API Key (and What You Lose)

Claude Code has no official Gemini mode — but a local router can translate its requests to a free Gemini API key. The exact setup from Anthropic's env-var docs and the router's repo, what breaks in translation, and when the trade is worth it.

11 min read

Claude Code & Context Engineering

Aider: Terminal Pair Programming Where Every Edit Is a Git Commit

An Aider setup and workflow guide built from the official docs: installation, the repo map, architect mode's two-model split, the slash commands that matter, real costs, and who this open-source tool still suits.

10 min read

Claude Code & Context Engineering

Cursor vs Claude Code: Editor Agent or Terminal Agent?

Cursor vs Claude Code compared on working surface, Tab completions, context handling, long tasks, automation and pricing — with a winner per criterion and a decision worksheet.

13 min read

Claude Code & Context Engineering

Local LLMs for Coding: Ollama and LM Studio Set Up Honestly

Run coding models on your own hardware with Ollama or LM Studio: real memory requirements from published model data, the context-length trap and its fix, which agents connect, and what local models still cannot do.

12 min read

Claude Code & Context Engineering

Cursor, Set Up Properly: Rules, Codebase Indexing, and Agent Mode

A practical Cursor setup guide: rules files that actually constrain the agent, how codebase indexing works, agent mode habits, and the new X Subscription pricing explained plainly (checked November 2026).

12 min read

Claude Code & Context Engineering

Claude Code vs Codex: Pricing, Features and Workflow Compared

A sourced comparison of Claude Code and Codex — current plan pricing checked November 2026, how each tool's workflow is shaped, customisation depth, CI support, and a blank scorecard to run your own evaluation.

11 min read

FAQ

Do I need a paid Claude plan to use these guides?

No. Most of the gains here are free: instruction-file hygiene, session habits, hook setup and settings changes work on any plan. The cost ladder article exists precisely to show which problems a plan upgrade solves and which it does not.

CLAUDE.md or AGENTS.md — which should I keep?

Both files exist in this category because the answer depends on your tool mix. If you only run Claude Code, CLAUDE.md is enough. If other agents read the same repo, the field guide and the head-to-head comparison show how to split shared rules from Claude-specific ones without duplicating them.

Are hooks safe to copy into a real project?

The hook guides state what each hook can block, what it receives as input, and where people get hurt — a PreToolUse hook that always exits non-zero will freeze your workflow. Test a new hook on a throwaway repo first; the deep dive shows the order to do that in.

How do I know if my setup is actually wasting tokens?

Run the context budget audit. It walks through everything that loads automatically in your sessions and prices it, so you can see the waste as a number instead of a feeling.

Get the free Agent-Ready Astro — Free Mini Kit

Get the free mini kit (CLAUDE.md + AGENTS.md templates and 3 production Skills) plus one practical email a week — a template or checklist in every issue. No spam, unsubscribe anytime.

Download the free mini kit — no email needed

The mini kit is a direct download — no address required. Downloads are covered by our Privacy Policy.

Prefer social? Follow @yang158s on X — new articles and downloads are posted there first.