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/.
In this repository14 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- data/CLAUDE.mdCLAUDE.md
- mcp-teaching-kit-main/CLAUDE.mdCLAUDE.md
- segment_1_quickstart/CLAUDE.mdCLAUDE.md
- segment_2_context/CLAUDE.mdCLAUDE.md
- segment_3_agents/CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- azure-ai-deploySkill
- azure-bicep-skillSkill
- claude-md-auditSkill
- genai-prompt-evalSkill
- kubernetes-patternsSkill
- mcp-scaffoldSkill
- review-changesSkill
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
- Distinctive: line 25
No em dashes. Hyphens with spaces, commas, or periods.
- Distinctive: line 26
Never use "ask" as a noun.
≈ “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.
Files
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 injection04_mcp_consumption.md- MCP as reach when CLAUDE.md hierarchy is not enough02_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-learnHTTP 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 atsegment_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 oldsegment_2_mcp/on 2026-05-25. Do not delete it. The02_mcp_architecture.tsandMCP_SPEC_CHANGELOG.mdin 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 withCLAUDE_CODE_DISABLE_1M_CONTEXT=1. Lineups move fast - re-confirm at code.claude.com/docs before recording rather than trusting this line blind.
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
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.

