Omniscio

OmniscioSkills examplesExplain code

A Claude Code skill that explains unfamiliar code

One complete SKILL.md for the first hour on someone else's codebase: how a thing works, what calls it, where the value comes from. It is also the example where the fork setting changes what you type. What a skill is, and how the folder mechanism works, is covered in the skills guide; the file is below.

Checked against Anthropic's documentation on November 25, 2026. By the Omniscio team. Updated .

When this skill fires

The description names the questions people ask about code they do not know yet: how something works, what calls a function, where a value comes from, a tour of a module.

  • On its own when you ask "how does the billing flow work", "what calls this", "where does the session id come from", or "walk me through this folder".
  • Directly with the question as the argument: /explain-code how are retries scheduled. The answer is only useful when the question is in the command, and the next section explains why.

Model invocation stays on: reading code has no side effect, so Claude can reach for this skill on its own.

The whole skill, ready to copy

Save this as SKILL.md inside a folder named explain-code, frontmatter first.

---
name: explain-code
description: Explains how a part of a codebase works - the entry points, the data flow, where to change a behaviour, and the traps. Use when the user asks how something works, what calls a function, where a value comes from, or for a tour of a module.
argument-hint: [path-or-question]
context: fork
agent: Explore
---

Answer this question about the codebase: $ARGUMENTS

This skill runs in its own context and cannot see the conversation that started it, so answer only from what you can read. If the arguments are empty, describe the shape of the repository from its entry point. If they name only a file, explain what that file does and what calls it. Do not ask a follow-up question nobody will answer.

## What to report

1. The answer, in two or three sentences, before any detail.
2. The path: the entry point, the files the data passes through, and where it ends up.
3. Where a change would go, if the question is about behaviour, naming the file and the function.
4. Traps: the surprising part, the duplicated source of truth, the thing that looks unused and is not.

Reference every claim as path/to/file.ts:120, and never state a behaviour you have not read. If the answer is not in the code, say what you could not find.

Do not propose a diff and do not edit anything: this skill answers questions.

What each part does

Every field is optional, and only description is recommended. Two of the fields here are not the usual ones, so this table is the part worth reading twice.

The five frontmatter fields in this file, and what each one changes.
FieldWhat it does here
name: explain-codeThe command in the / menu; the folder name is used when the field is absent
descriptionWhat the skill does and when to use it. This is the text Claude matches against the question you ask
argument-hint: [path-or-question]The autocomplete hint, which matters more here than usual because the argument is the question
context: forkRuns the skill in a new subagent instead of your conversation: Claude Code starts a subagent of the type in agent and gives it the skill content as its prompt. The subagent does not see your conversation history
agent: ExploreWhich subagent to use. Explore is a built-in read-only agent, and it starts without your CLAUDE.md files or git status, which is why the instructions have to carry everything the task needs
  • Why fork at all. Reading twenty files to answer one question fills your context with files you will not mention again. A fork pays that cost in its own window and hands back the answer.
  • Why the question has to be in the command. A forked subagent does not see the conversation, so "explain that" arrives with no "that". The body's opening line hands $ARGUMENTS to the subagent as its task for exactly this reason.
  • Why it runs in the background. A forked subagent runs in the background by default: you keep working while it reads, and its answer arrives when it is done. Add background: false to the frontmatter to wait for it in the same turn instead. Non-interactive runs, which is anything with -p or the Agent SDK, wait anyway.
  • "Do not propose a diff" keeps a read-only agent read-only, so an exploration never comes back as an unrequested patch.

Where to put it: personal or project

The same file, two locations, two audiences.
ChoosePathWho gets it
Personal~/.claude/skills/explain-code/SKILL.mdYou, in every project on this machine, but not Cowork or cloud sessions
Project.claude/skills/explain-code/SKILL.mdEveryone in this repository once it is committed, which is what an onboarding team wants

If both exist, personal wins over project. On a team that onboards through the repository, that means a home-folder copy silently replaces the one the project ships.

Claude Code watches both directories and picks up an added or edited skill within the session, except in bare mode; /reload-skills loads one that does not appear.

How to confirm it loads

  1. Find the command. Type / and look for explain-code, or open /skills, which lists what you can run.
  2. Ask a question with a real answer. /explain-code where is the request timeout set should come back with a file and a line, not a summary of the repository.
  3. Watch where the work happens. A forked skill starts a subagent and runs in the background, so you keep your conversation while it reads; the answer arrives as the subagent's result.
  4. Test the automatic route. Ask "how does X work" in an ordinary message. If it does not fire, put the words you used into the description.

/doctor estimates the skill listing's context cost, and /skill-doctor reports what each skill costs and how often it is used.

The common failure

The trap is the fork itself. A forked subagent does not see your conversation, so the request "explain that function" arrives with no function named, and the answer is generic or empty. Anthropic's warning is blunt: a forked skill only makes sense when it carries explicit instructions, because a skill that holds guidelines without a task gives the subagent nothing to act on.

  • If the answer ignores what you were discussing, put the subject in the command. That is the whole fix: /explain-code src/invoice.ts rather than "explain this".
  • If nothing comes back, check that the skill content contains a task and not just a description of the codebase. A fork with no instruction returns without meaningful output.
  • If the answer arrives after you moved on, that is the background default. Add background: false to wait for it in the turn that invoked the skill.
  • If it knows nothing about your project's rules, that is expected: Explore starts without your CLAUDE.md. Put what matters into the skill body, or use agent: general-purpose and give up the read-only guarantee that Explore gives you.

And the silent one underneath: if the opening three dashes are not the file's first line, the frontmatter — context and agent included — is plain text, and the skill runs in your conversation instead of a fork.

Where this fits

A skill that forks is halfway to a subagent: the same isolated context, started by a skill instead of by Claude's own judgement. If you want the worker to exist independently, with its own tools and its own description, write the subagent and list explain-code under skills: in its frontmatter, so it carries these instructions into its own context. The skills guide has the rest of the mechanism.

For a change to the code rather than an explanation of it, see the refactor skill. The rest of the library is at the skills examples hub.

Where these answers come from

  • Extend Claude with skills, read November 25, 2026: the folder and file, the frontmatter reference, arguments, where skills load, live change detection and the content lifecycle.
  • Run skills in a subagent: what context: fork and agent do, the background default, background: false, and the warning about a fork with no task.
  • The changelog: release 2.1.332, dated November 25, 2026, the newest listed on the day this page was checked.

Common questions

Does the forked skill see what we were just talking about?

No. context: fork gives the subagent the skill content and nothing else from your conversation. If the task depends on the conversation, do not use a fork: put what you need into the command, or ask in the main conversation.

Why did the answer take a while?

A forked subagent runs in the background by default, and reading a codebase takes time. Add background: false when you would rather wait in the same turn.

Can it change the code it reads?

No. Explore has no edit tools, and the body also tells it not to propose a diff. For a change, use the refactor skill.

What is the Explore agent?

One of the built-in subagents. Anthropic describes it as read-only tools optimised for codebase exploration, and it starts without your CLAUDE.md or git status to keep its context small.