Pular para o conteúdo
← Back to Skalablog

Published article

Claude Code Extensions: Which Pattern to Use

Software EngineeringClaude CodeClaudeAnthropic

Claude Code extensions fall into five patterns: Claude.md rules, skills, subagents, MCP servers, and plugins. The right choice depends on whether your requirement is passive context, on-demand procedure, isolated delegation, external tool access, or team-wide distribution. Picking the wrong pattern causes context bloat, context leaks, and failed handshakes rather than better agent behavior.

Which Claude Code extension mechanism fits your problem?

The five Claude Code extension mechanisms differ by trigger, context scope, and distribution path, and the wrong choice is an architectural fault rather than a style preference. Claude Code is Anthropic agentic coding tool that runs in the terminal (Claude Code documentation). Use the table below to match the mechanism to the requirement.

MechanismTriggerBest forMain risk if misused
Claude.md rulesPassive, loaded by file pathProject and directory conventionsContext bloat from a monolithic root file
SkillsModel-triggered by taskReusable on-demand proceduresConfusing them with slash commands
SubagentsCoordinator delegationIsolated specialist tasksMissing context and duplicate work
MCP serversClient-server handshakeExternal tools and dataFailed negotiation leaves tools invisible
PluginsTeam-wide installationDistribution of combined capabilitiesOverkill for a single-project convention

The video this article is based on, published in September 2026 by the channel LearningPathX, frames the same decision for CCARF certification candidates, claiming the exam blueprint weights agentic architecture and orchestration at 27%, Claude Code configuration at 20%, and tool design and MCP integration at 18%. Those percentages are the speaker's account and are not independently verified here; the architectural reasoning behind them stands on its own.

How do Claude.md rules differ from skills?

Claude.md files are passive and load by location; skills are active and load by task. The distinction is the foundation of context control in Claude Code extensions, because it decides what occupies the LLM context window on every session and what appears only when the model decides a procedure is relevant.

Claude.md files rely on a strict hierarchy. They load according to the active file path and are scoped to the user, the project, or a nested directory. Skills, defined in SKILL.md files, are triggered by the model based on the task at hand, and they arrive with task-specific context and restricted tool access.

When instructions leak across projects, or a nested rule never activates, the usual mistake is editing a user-level rule to solve what should be a repository-only convention. The diagnostic sequence is to work backwards from evidence: run the memory command from the affected directory, inspect which rules and imports are actually active, and confirm the path selector matches the edited file. Downstream edits cannot repair an unmet upstream contract.

Skills suit procedures you want available on demand without occupying the context window on every session. Conventions that must always apply to a code path belong in the matching Claude.md scope instead. Mixing the two, for example treating a slash command and a model-triggered skill as interchangeable, ignores how loading actually works.

When should you delegate to subagents?

Subagents are appropriate when a task needs isolated context, specialist behavior, or parallel execution under a coordinator. A subagent does not automatically inherit the full parent conversation; the coordinator must explicitly pass the facts and the output contract the child cannot infer. If the parent provides nothing, the child acts on assumptions.

The transcript's diagnostic map links each symptom to a controlling object:

  • A child lacking context points to a failure in the coordinator's task decomposition policy.
  • Lost or mixed session history points to a failure in persistent session storage.
  • Duplicate or racing subtasks point to overlapping ownership in decomposition.

Two rules keep multi-agent orchestration stable. Parallel tasks must be strictly independent, with non-overlapping ownership and an explicit return contract. Dependent tasks must preserve strict order rather than being launched concurrently. When these rules are violated, the system has a dependency failure, and prompt tuning will not fix it.

How does MCP integrate external tools into Claude Code?

MCP, the Model Context Protocol, is Anthropic open standard for connecting AI applications and LLMs to external tools and data sources, first announced in November 2024 (Anthropic MCP announcement; Model Context Protocol site). In Claude Code, the transport, command arguments, environment, and protocol negotiation must all succeed before the model can see a tool at all.

When no capabilities appear or calls fail before reaching a handler, do not edit the tool prompt. Verify the client-server handshake instead. The video prescribes three steps: run claude mcp list, inspect the MCP configuration directory, and use the MCP inspector to observe server status and discovered tools directly. Only a completed handshake puts the tool in front of the model.

Tool design then follows a least-capability rule. Prefer narrow built-in tools such as glob or grep over a broad shell tool like bash when the goal is evidence gathering. For API tools, use minimal schemas with decision-useful descriptions so the model does not guess parameters. Structured error responses matter too: a tool result that only says "error" as plain text will not trigger real error recovery. Return a stable error category and explicit retry guidance in the structured tool result block instead, or the model will treat the failure as ordinary data and may blindly retry an unsafe operation.

What are the most common configuration mistakes?

The most frequent configuration traps in Claude Code extensions share one property: they encode the wrong assumptions early, and later edits cannot undo the damage cheaply. Each trap replaces a deterministic mechanism with something the runtime cannot enforce, which is why they account for so many failed agentic workflows in production. The video names five.

  • Storing all conventions in a single root Claude.md, which bloats the context window on every session.
  • Confusing local development workflow with production runtime orchestration.
  • Using natural language where a programmatic state gate is required, because language is not a deterministic block.
  • Asking the model to rewrite entire subsystems after one vague failure, which breaks the edit-test-review loop.
  • Using direct execution while requirements or blast radius are still unclear.

Plan mode exists for exactly that last case: it offers read-only planning where a proposed file set requires approval before any mutation. Direct execution allows state-changing edits without prior inspection, which is appropriate only when the requirement and the affected surface are already known. Small feedback loops anchored in tests and diffs, enforced by programmatic hooks, keep regressions contained.

How do you diagnose a broken agentic workflow?

Diagnose from the earliest controlling state, not from downstream behavior. If an agentic loop repeats or ends early, the controlling object is the response stop reason, and the proof is the terminal stop reason in the trace. If a workflow bypasses a required block, a programmatic state gate failed. The serialized response and the tool result ledger are the evidence surfaces to inspect first.

This ordering explains why perfectly prompted agents still fail in production. A missing subagent contract or a failed MCP handshake is an upstream fault; no amount of prompt refinement supplies the missing context or completes the negotiation. Verify the contract at the layer that controls the failure, then change downstream configuration only if the upstream state is confirmed healthy.

Frequently asked questions

  • Are Claude.md files and skills interchangeable? No. Claude.md rules are passive and load by file path; skills are model-triggered by task and carry their own scoped context and tool restrictions. Use rules for conventions that must always apply within a path, and skills for procedures invoked on demand.
  • Do subagents inherit the parent conversation in Claude Code? No. A subagent receives only what the coordinator explicitly passes. If the parent omits facts or an output contract, the subagent works from incomplete assumptions, which is a decomposition failure rather than a prompt problem.
  • Why does my MCP tool not appear to the model? Because the client-server handshake did not complete. Transport, arguments, environment, and protocol negotiation must all succeed before capability discovery. Verify with claude mcp list and the MCP inspector before touching any prompt.
  • What is the safest way to expose tools? Least capability. Prefer narrow built-in tools over a broad shell tool for file discovery, keep schemas minimal with clear parameter descriptions, and return structured error categories with retry guidance so failures trigger recovery rather than blind retries.
  • What is CCARF? It is a certification referenced in the September 2026 LearningPathX video as covering agentic architecture, Claude Code configuration, and MCP integration. Its blueprint weightings are the speaker's claims and are not independently verified in this article.

From working sessions to written knowledge

The core lesson of these extension patterns is that clear ownership beats clever prompting: verify the earliest controlling state before changing anything downstream. That habit, reading the evidence before touching the configuration, is what separates an agent that holds up under pressure from one that fails quietly. The same discipline applies to how you preserve your own technical knowledge.

If you have explanations, architectural lessons, or walkthroughs sitting inside YouTube videos, Skalablog can turn that existing recording into a structured written article. Visit Skala Blog, paste a YouTube URL, and the video is transcribed and shaped into an article you can review and publish.

For anyone documenting agentic workflows, whether for a team wiki, study notes, or a publication like this one from writer Gustavo dev doido, converting a recorded explanation into a searchable article makes the knowledge findable long after the video stops playing.

Source video