Agent skill

Explain

by penwyp in penwyp/ClaudePreference

Analyze a code snippet, file path, symbol name, or the current conversation context against the local repository and explain what it does in the project.

MITAuto-check passedDevelopment

Install Explain

skills CLI
$ npx skills add penwyp/ClaudePreference --skill explain -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install penwyp/ClaudePreference explain --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/penwyp/ClaudePreference.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/explain .claude/skills/explain && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
explain
GitHub stars
136
Token cost
~1.2k tokens
SKILL.md length
651 words
Files
2
Skills in repo
7
Repo updated
First seen
Licence
MIT

At a glance

Analyze a code snippet, file path, symbol name, or the current conversation context against the local repository and explain what it does in the project.

  • Works in 3 steps: Classify the input: code snippet →… → Resolve ambiguity before explaining. If… → Keep scope aligned: a single-function…
  • The user asks to explain code
  • SKILL.md covers Input Decision, Analysis Workflow, What To Explain and Parameter Priority, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Explain is an agent skill from penwyp/ClaudePreference. Analyze a code snippet, file path, symbol name, or the current conversation context against the local repository and explain what it does in the project. Use when the user asks to explain code, understand a file or module's role, clarify how a function/class/config participates in the architecture, or wants important parameters, flags, callbacks, dependencies, and return values highlighted instead of only a line-by-line paraphrase.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/openai.yaml`).

It sits in Development, covering Technical documentation. The repository describes itself as: A comprehensive collection of development workflow commands for Claude Code. The licence is MIT.

When your agent uses it

  • The user asks to explain code
  • Understand a file
  • Clarify how a function/class/config participates in the architecture
  • Wants important parameters

Example prompts

  • “/explain”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Classify the input: code snippet → locate symbols in repo; file path → read file and expand to callers/callees; symbol name or implicit…
  2. Resolve ambiguity before explaining. If multiple matches, explain the best match and mention the ambiguity briefly.
  3. Keep scope aligned: a single-function question does not need a subsystem tour.

What it can do on your machine

Read from SKILL.md and the folder at commit a5eea54. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Explain loads about 1.2k tokens when it runs. Until then it costs about 111 tokens; SKILL.md has 651 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~111
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from penwyp/ClaudePreference at commit a5eea54, republished under its MIT licence (© penwyp). 651 words, ~1,231 tokens.

Download SKILL.mdSave it as .claude/skills/explain/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
explain
description
Analyze a code snippet, file path, symbol name, or the current conversation context against the local repository and explain what it does in the project. Use when the user asks to explain code, understand a file or module's role, clarify how a function/class/config participates in the architecture, or wants important parameters, flags, callbacks, dependencies, and return values highlighted instead of only a line-by-line paraphrase.

Explain

Explain the target in repository context, not in isolation. Always connect the local code to the surrounding call chain, owning module, upstream inputs, downstream effects, and user-visible responsibility.

Prefer evidence from the codebase. If a claim depends on inference, label it clearly as inference.

Input Decision

  1. Classify the input: code snippet → locate symbols in repo; file path → read file and expand to callers/callees; symbol name or implicit target → search repo for best match.
  2. Resolve ambiguity before explaining. If multiple matches, explain the best match and mention the ambiguity briefly.
  3. Keep scope aligned: a single-function question does not need a subsystem tour.

Analysis Workflow

  1. Read the target artifact.
  2. Expand one layer outward.
    • Check who imports it, who calls it, what it calls, which config or env values feed it, and what outputs or side effects it produces.
  3. Place it in project structure.
    • Identify whether it is an entry point, adapter, domain service, data model, UI component, CLI command, tool handler, scheduler job, test helper, or glue code.
  4. Extract the important parameters.
    • Prioritize constructor params, function args, config fields, env vars, callback hooks, flags, discriminators, and return objects.
  5. Explain why those parameters matter.
    • State what each important parameter controls, where it comes from, typical values, and what behavior changes when it is absent or changed.
  6. Summarize the role.
    • End with the target's responsibility in one sentence that a new contributor can keep in their head.

What To Explain

  • The target's direct responsibility.
  • Why it exists in this project.
  • Where it sits in the call path or module graph.
  • What invokes it and what it invokes.
  • What data it consumes and produces.
  • Which parameters are key and which are incidental.
  • What would break or change if a key parameter changed.
  • Whether it is framework boilerplate, business logic, integration glue, or cross-cutting infrastructure.

Parameter Priority

When explaining parameters, focus on the ones that alter behavior or architecture:

  • Branch selectors such as type, mode, kind, provider, platform, strategy.
  • Lifecycle and control flags such as enabled, background, stream, retry, timeout, strict, dry_run.
  • Dependency injection points such as client, session, registry, store, callbacks.
  • External integration inputs such as API keys, endpoints, model names, file paths, and environment variables.
  • User-facing filters and identifiers such as id, name, slug, query, task_id, session_id.
  • Return values and mutated state when they determine what the next layer can do.

Do not spend most of the answer on trivial parameters such as obvious booleans, loop variables, or one-off temporary names unless they are central to correctness.

Show full SKILL.md (228 more words)Show less

Output Shape

Adapt the depth to the request, but prefer this structure:

  1. Start with a short summary of what the target does in the project.
  2. Explain its place in the surrounding architecture or flow.
  3. Highlight the important parameters in a dedicated section or paragraph.
  4. Add concise file or symbol references when they strengthen the explanation.
  5. If useful, finish with "read this next" suggestions for the adjacent files or functions.

Evidence Rules

  • Prefer concrete repository evidence over generic language-level explanations.
  • Distinguish observed behavior from inferred intent.
  • If the provided snippet is partial, say what is confirmed by the snippet and what required repo lookup.
  • If the target is generated code or framework glue, say so directly and shift focus to the real integration points.
  • If the code is not found locally, explain based on the snippet or context and state that the project-level role could not be fully verified.

Example Triggers

  • "解释这段代码在项目里是干嘛的"
  • "看看 tools/mcp_tool.py 的作用"
  • "这个函数为什么要传 session_id"
  • "这个配置项 background_process_notifications 会影响什么"
  • "我没贴代码,结合我们刚才聊的 gateway 流程解释一下"

Pitfalls

  • Do not answer with a pure line-by-line translation while ignoring project role.
  • Do not explain every parameter equally; rank them by behavioral impact.
  • Do not assume a file is important just because it is large.
  • Do not treat tests as the source of truth when production code is available.
  • Do not overstate certainty when the user only provided a fragment.

© penwyp, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/explain of penwyp/ClaudePreference.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit a5eea54

Compare with similar skills

Explain next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Explain compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Explain this skillpenwyp/ClaudePreference136—~1.2kAutomated safety check: PassMIT
Diagram Designcathrynlavery/diagram-design44k1 repos~7.5kAutomated safety check: PassMIT
Simple Englishmoeru-ai/airi50k2 repos~4.6kAutomated safety check: PassMIT
Get API Docs with chubandrewyng/context-hub14k2 repos~775Automated safety check: PassMIT
Doc SyncJetBrains/ideavim10k2 repos~2.6kAutomated safety check: PassMIT
Mailspring App ScreenshotsFoundry376/Mailspring18k—~1.4kAutomated safety check: PassGPL-3.0

Similar skills

  • Diagram Design

    cathrynlavery/diagram-design

    Creates branded diagrams, from architecture, flowchart and sequence to charts and maps, as self-contained HTML with inline SVG, with import from draw.io, Mermaid and Excalidraw.

    44k GitHub starsUsed in 1 repo~7.5k tokens
    DevelopmentAuto-check passed
  • Simple English

    moeru-ai/airi

    Write or rewrite technical text with the rules of ASD-STE100 Simplified Technical English so it is clear, unambiguous, and free of AI slop.

    50k GitHub starsUsed in 2 repos~4.6k tokens
    DevelopmentAuto-check passed
  • Get API Docs with chub

    andrewyng/context-hub

    Fetches current documentation for third-party APIs and SDKs with the chub CLI before the agent writes code against them, instead of relying on remembered API shapes.

    14k GitHub starsUsed in 2 repos~775 tokens
    DevelopmentAuto-check passed
  • Doc Sync

    JetBrains/ideavim

    Official

    Keeps IdeaVim documentation in sync with code changes. An agent skill from JetBrains/ideavim.

    10k GitHub starsUsed in 2 repos~2.6k tokens
    DevelopmentAuto-check passed
  • Mailspring App Screenshots

    Foundry376/Mailspring

    Captures screenshots of the running Mailspring dev app for docs, PRs or visual checks by launching it with a debugging port, driving the UI and clipping to an element.

    18k GitHub stars~1.4k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Draw.io Diagram Studio

    Agents365-ai/drawio-skill

    Creates and edits editable draw.io diagrams from descriptions, code, infrastructure files, SQL and API schemas, with sync, review, test and export tools.

    10k GitHub stars~2.4k tokensUpdated 5 days ago
    DevelopmentAuto-check: notes

More from penwyp/ClaudePreference

  • Local Project Runtime

    penwyp/ClaudePreference

    Diagnose and stabilize local project setup after clone or checkout.

    136 GitHub stars~1.1k tokensUpdated 4 mo ago
    Auto-check: notes
  • Image Converter

    penwyp/ClaudePreference

    Convert images between common formats on macOS, especially SVG/PNG/ICO/ICNS/JPEG/WebP/PDF, using installed local tools such as ImageMagick, rsvg-convert, sips, qlmanage, and iconutil.

    136 GitHub stars~955 tokensUpdated 4 mo ago
    Auto-check passed
  • Refactor Design Report

    penwyp/ClaudePreference

    Produce a professional, code-grounded refactor or implementation design report from identified technical problems, product gaps, review findings, architecture concerns, or frontend-backend contract…

    136 GitHub stars~1.4k tokensUpdated 4 mo ago
    Auto-check passed
  • Doc Code Review Report

    penwyp/ClaudePreference

    Review text input or documents against the local codebase and produce a structured review report with findings and refactor suggestions.

    136 GitHub stars~1.5k tokensUpdated 4 mo ago
    Auto-check passed
  • Browser Flow Fallbacks

    penwyp/ClaudePreference

    Diagnose flaky browser automation flows (login, OAuth, signup, multi-step forms).

    136 GitHub stars~1.1k tokensUpdated 4 mo ago
    Auto-check passed
  • Develop Review Gate

    penwyp/ClaudePreference

    适用于这类请求:直接在当前 checkout 完成开发、固定做两轮自我 review/refactor、先把最终 review 结果给人类确认、确认后再继续改动、提交或进入下一步。用户可能会说:"先开发再自审两轮"、"先 review 两次再给我确认"、"不要开 worktree,直接改"、"先输出 review 结论不要继续"、"做完先停在 gate"。

    136 GitHub stars~846 tokensUpdated 4 mo ago
    Auto-check passed

Categories

Questions about Explain

What does Explain do?

Analyze a code snippet, file path, symbol name, or the current conversation context against the local repository and explain what it does in the project. Explain is an agent skill from penwyp/ClaudePreference. Analyze a code snippet, file path, symbol name, or the current conversation context against the local repository and explain what it does in the project.

When should I use Explain?

Explain fits situations like: the user asks to explain code; understand a file; clarify how a function/class/config participates in the architecture; wants important parameters.

How do I install Explain in Claude Code?

Run `npx skills add penwyp/ClaudePreference --skill explain -a claude-code`. Or copy the skill folder (skills/explain in penwyp/ClaudePreference) into .claude/skills/explain in your project. Claude Code loads it when a task matches its description.

How do I install Explain in Codex?

Run `npx skills add penwyp/ClaudePreference --skill explain -a codex`. Or copy the skill folder (skills/explain in penwyp/ClaudePreference) into .agents/skills/explain in your project. Codex loads it when a task matches its description.

Can I use Explain in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add penwyp/ClaudePreference --skill explain -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/explain, .gemini/skills/explain, .github/skills/explain and .opencode/skills/explain in your project.

What does Explain need to run?

SKILL.md names no scripts, command-line tools or credentials: Explain is instructions for the agent only.

Does Explain access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Explain safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Explain use?

Explain is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Explain use?

About 1.2k tokens (SKILL.md is roughly 4.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Explain?

Skills that share tags, products or a category with Explain: Diagram Design (cathrynlavery/diagram-design, 44k stars), Simple English (moeru-ai/airi, 50k stars), Get API Docs with chub (andrewyng/context-hub, 14k stars) and Doc Sync (JetBrains/ideavim, 10k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Explain?

penwyp (a GitHub user) maintains it in penwyp/ClaudePreference, which has 136 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on May 27, 2026.

Source: penwyp/ClaudePreference on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.