agentleFS
timothywarner-orgtimothywarner-org/claude-code/segment_4_hero/CLAUDE.md

claude-code / segment_4_hero

CLAUDE.md224 starsChanged 4 months agoMITView on GitHub

This file is per-segment context for Claude Code. It tells Claude what lives in this directory and how to think about it. The fact that this file exists, in this directory, and is being read right now, is part of the lesson - that is exactly the subdirectory-scoped CLAUDE.md pattern Segment 2 introduced. Demo punchlist for live walkthrough: demos/segment_4_hero_punchlist.md. Hands-on exercises: tests/segment_4_production/.

The file

We split this CLAUDE.md into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    No em dashes. Hyphens with spaces, commas, or periods.

    line 25
  2. Distinctive:

    Never use "ask" as a noun.

    line 26

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

Segment 4 - Hero (Skills, Subagents, and MCP)

This file is per-segment context for Claude Code. It tells Claude what lives in this directory and how to think about it. The fact that this file exists, in this directory, and is being read right now, is part of the lesson - that is exactly the subdirectory-scoped CLAUDE.md pattern Segment 2 introduced.

What lives here

  • 01_skills_intro.md - Skills, slash commands, dynamic context injection
  • 04_mcp_consumption.md - MCP as reach when CLAUDE.md hierarchy is not enough
  • 02_production_workflows.ts - Production multi-skill workflow demo (TypeScript)
  • MCP_SPEC_CHANGELOG.md - Spec-version reference for advanced learners

Demo punchlist for live walkthrough: demos/segment_4_hero_punchlist.md. Hands-on exercises: tests/segment_4_production/.

Conventions for this directory

  • Skills live in .claude/skills/, not .claude/commands/. Legacy .claude/commands/ still works for back-compat, but every new skill ships as .claude/skills/<name>/SKILL.md.
  • Subagents live in .claude/agents/ as single markdown files with frontmatter. Existing examples to reference: code-quality-coach.md, python-mcp-expert.md, claude-code-tutor.md.
  • MCP is consumed, not authored in this segment. The microsoft-learn HTTP server registered in .mcp.json (repo root) is the canonical demo target. Do not write a new MCP server in this segment unless the learner specifically opts in to the optional homework. Point them at segment_4_hero/memory_server/ (existing Python FastMCP server) for that.
  • segment_4_hero/memory_server/ is the optional build-your-own MCP asset. Moved here from the old segment_2_mcp/ on 2026-05-25. Do not delete it. The 02_mcp_architecture.ts and MCP_SPEC_CHANGELOG.md in this directory came along for the same reason.

Voice and style for prose written under this directory

  • Bold key terms.
  • No em dashes. Hyphens with spaces, commas, or periods.
  • Never use "ask" as a noun.
  • Senior-engineer plain-spoken. First-principles. Mildly irreverent.
  • Three-superpower framing for skills: arguments, dynamic context injection, forked context.
  • Three-primitive framing for MCP: tools (model-controlled), resources (app-controlled), prompts (user-controlled).

Ground-truth facts (do not re-fetch)

  • MCP spec 2025-11-25, transports stdio + Streamable HTTP. SSE-only is retired.
  • Skills frontmatter: description, disable-model-invocation, user-invocable, allowed-tools, model, effort, context: fork, agent, paths, argument-hint, arguments, hooks, shell.
  • Dynamic context injection: !`<bash>` at line start or after whitespace; multi-line via ```! fenced block.
  • ${CLAUDE_SKILL_DIR} for portable script paths under any scope.
  • Model lineup: Sonnet 5 (default, native 1M context) / Opus 4.8 / Haiku 4.5. Model IDs claude-sonnet-5, claude-opus-4-8, claude-haiku-4-5-20251001. The 1M window is on by default; disable with CLAUDE_CODE_DISABLE_1M_CONTEXT=1. Lineups move fast - re-confirm at code.claude.com/docs before recording rather than trusting this line blind.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.