Agent skill

Code Explainer

by mergisi in mergisi/awesome-openclaw-agents

Explains a pasted code snippet in plain English, returning the detected language, a one-sentence summary, how it works and one practical tip.

MITAuto-check passedDevelopment

Install Code Explainer

skills CLI
$ npx skills add mergisi/awesome-openclaw-agents --skill code-explainer -a claude-code

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

GitHub CLI
$ gh skill install mergisi/awesome-openclaw-agents code-explainer --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/mergisi/awesome-openclaw-agents.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/gemma/code-explainer .claude/skills/code-explainer && 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
code-explainer
GitHub stars
4k
Token cost
~283 tokens
SKILL.md length
142 words
Files
3 (incl. scripts, assets)
Skills in repo
16
Repo updated
First seen
Licence
MIT

At a glance

Explains a pasted code snippet in plain English, returning the detected language, a one-sentence summary, how it works and one practical tip.

  • Understanding an unfamiliar function found in a codebase
  • SKILL.md covers Examples and Instructions
  • Decoding a SQL query or shell one-liner you did not write
  • Getting a quick gotcha or improvement hint for a snippet

What it does

This skill takes a code snippet from the user and answers with a short plain-English explanation. It names Python, JavaScript, SQL, Bash, TypeScript and Go as examples of languages it handles, and its sample requests include a recursive Fibonacci function, an array reduce call, an SQL query over error logs and a find command that deletes old log files.

The agent has to hand its result to a run_js tool as a JSON string with five fields: the detected language, the snippet (cut to its first 100 characters when longer), a one-sentence summary of what the code does, a one-sentence account of the mechanism, and one practical tip, gotcha or improvement. The folder also bundles webview.html and index.html files.

When your agent uses it

  • Understanding an unfamiliar function found in a codebase
  • Decoding a SQL query or shell one-liner you did not write
  • Getting a quick gotcha or improvement hint for a snippet

Example prompts

  • “Explain this SQL query: SELECT name FROM users WHERE active = 1 ORDER BY created_at.”
  • “What does reduce do in this line: total = items.reduce((a, b) => a + b.price, 0)?”
  • “Walk me through this bash script that deletes old log files.”

Requirements

  • An agent environment that provides a run_js tool

What it can do on your machine

Read from SKILL.md and the folder at commit 05820c5. 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

    Ships 1 file in scripts/, which the agent can run.

    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

Code Explainer loads about 283 tokens when it runs. Until then it costs about 27 tokens; SKILL.md has 142 words of instructions outside code blocks.

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

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); the scripts in this folder are not scanned.

SKILL.md

The full file from mergisi/awesome-openclaw-agents at commit 05820c5, republished under its MIT licence (© mergisi). 142 words, ~283 tokens.

Download SKILL.mdSave it as .claude/skills/code-explainer/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
code-explainer
description
Paste any code snippet and get a plain English explanation of what it does and how it works.

Code Explainer

Understand any code instantly. Works with Python, JavaScript, SQL, Bash, TypeScript, Go, and more.

Examples

  • "Explain this Python: def fib(n): return n if n <= 1 else fib(n-1) + fib(n-2)"
  • "What does this do: arr.reduce((acc, x) => acc + x, 0)"
  • "Explain: SELECT * FROM logs WHERE level = 'error' ORDER BY created_at DESC LIMIT 100"
  • "What is this bash script doing: find . -name '*.log' -mtime +7 -delete"

Instructions

You MUST use the run_js tool with the following exact parameters:

  • data: A JSON string with the following fields:
    • language: String - the programming language detected (e.g. Python, JavaScript, SQL, Bash)
    • snippet: String - the code snippet, truncated to first 100 characters if longer
    • summary: String - one sentence plain English explanation of what the code does overall
    • how: String - one sentence explaining how it works (the mechanism)
    • tip: String - one practical tip, gotcha, or improvement suggestion for this code

© mergisi, 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 2 other files (scripts, assets) in skills/gemma/code-explainer of mergisi/awesome-openclaw-agents.

  • SKILL.md
  • assets/webview.html
  • scripts/index.html

Open the folder on GitHubat commit 05820c5

Compare with similar skills

Code Explainer 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.

Code Explainer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Code Explainer this skillmergisi/awesome-openclaw-agents4k—~283Automated safety check: PassMIT
Coding Agentmastra-ai/mastra29k—~2.3kAutomated safety check: PassCustom licence
LSP Symbol Navigation Guideweave-os/router5.6k—~794Automated safety check: PassApache-2.0
CodeScope Codebase Graph AnalysisQwenLM/qwen-code28k1 repos~9.3kAutomated safety check: PassApache-2.0
Codegraph QAQwenLM/qwen-code-examples143—~4.3kAutomated safety check: PassNone
Code Review ChecklistshareAI-lab/learn-claude-code78k5 repos~1.1kAutomated safety check: PassMIT

Similar skills

  • Coding Agent

    mastra-ai/mastra

    Authoring playbook for building agents that write, edit, review, or refactor code.

    29k GitHub stars~2.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Shows when to answer a code question through a real language server instead of grep, covering definitions, references, hover, outlines, and errors.

    5.6k GitHub stars~794 tokensUpdated today
    DevelopmentAuto-check passed
  • Answers questions about code structure, history, bugs and PR risk using a CodeScope knowledge graph and semantic index built from the repository.

    28k GitHub starsUsed in 1 repo~9.3k tokens
    DevelopmentAuto-check passed
  • Codegraph QA

    QwenLM/qwen-code-examples

    Use CodeScope to analyze any indexed codebase via its graph database (neug) and vector index (zvec).

    143 GitHub stars~4.3k tokensUpdated 4 mo ago
    DevelopmentAuto-check passed
  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 5 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Measures a code port between languages or frameworks with jscpd's function-level comparison, porting tests before code and tracking what is left unmatched.

    6.3k GitHub stars~5k tokensUpdated yesterday
    DevelopmentAuto-check passed

More from mergisi/awesome-openclaw-agents

All 16 skills in this repo
  • Claude Code Cost Optimizer

    mergisi/awesome-openclaw-agents

    Audits a project's Claude Code setup for common token-cost leaks and returns a prioritized fix list, using only static inspection of files and settings.

    4k GitHub stars~1.1k tokensUpdated 11 days ago
    Auto-check passed
  • Excalidraw Architecture Diagram

    mergisi/awesome-openclaw-agents

    Generates or updates a whiteboard-style architecture diagram of the current codebase as an Excalidraw JSON file, showing services and data flow.

    4k GitHub stars~1.1k tokensUpdated 11 days ago
    Auto-check passed
  • Git Commit Message Writer

    mergisi/awesome-openclaw-agents

    Drafts a commit message from your staged diff, matching the repo's own style and explaining why the change happened, not just what changed.

    4k GitHub stars~664 tokensUpdated 11 days ago
    Auto-check passed
  • Model Cost Compare

    mergisi/awesome-openclaw-agents

    Trigger when the user asks which model to use, wants to compare model costs, says "what's cheapest for this task", "should I use Opus or Sonnet", "can a smaller model handle this", or…

    4k GitHub stars~1k tokensUpdated 11 days ago
    Auto-check passed
  • Openclaw Debugger

    mergisi/awesome-openclaw-agents

    Trigger when an OpenClaw agent is broken, silent, crashing, stuck, not responding, returning empty output, or the user says "my agent is down", "agent not working", "/openclaw-debugger".

    4k GitHub stars~959 tokensUpdated 11 days ago
    Auto-check passed
  • Commit Message

    mergisi/awesome-openclaw-agents

    Generate a clean, conventional commit message from a description of your changes.

    4k GitHub stars~239 tokensUpdated 11 days ago
    Auto-check passed

Categories

Questions about Code Explainer

What does Code Explainer do?

Explains a pasted code snippet in plain English, returning the detected language, a one-sentence summary, how it works and one practical tip. This skill takes a code snippet from the user and answers with a short plain-English explanation. It names Python, JavaScript, SQL, Bash, TypeScript and Go as examples of languages it handles, and its sample requests include a recursive Fibonacci function, an array reduce call, an SQL query over error logs and a find command that deletes old log files.

When should I use Code Explainer?

Code Explainer fits situations like: understanding an unfamiliar function found in a codebase; decoding a SQL query or shell one-liner you did not write; getting a quick gotcha or improvement hint for a snippet.

How do I install Code Explainer in Claude Code?

Run `npx skills add mergisi/awesome-openclaw-agents --skill code-explainer -a claude-code`. Or copy the skill folder (skills/gemma/code-explainer in mergisi/awesome-openclaw-agents) into .claude/skills/code-explainer in your project. Claude Code loads it when a task matches its description.

How do I install Code Explainer in Codex?

Run `npx skills add mergisi/awesome-openclaw-agents --skill code-explainer -a codex`. Or copy the skill folder (skills/gemma/code-explainer in mergisi/awesome-openclaw-agents) into .agents/skills/code-explainer in your project. Codex loads it when a task matches its description.

Can I use Code Explainer 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 mergisi/awesome-openclaw-agents --skill code-explainer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/code-explainer, .gemini/skills/code-explainer, .github/skills/code-explainer and .opencode/skills/code-explainer in your project.

What does Code Explainer need to run?

SKILL.md names no scripts, command-line tools or credentials: Code Explainer is instructions for the agent only. Our summary lists: An agent environment that provides a run_js tool.

Does Code Explainer 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 Code Explainer 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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Code Explainer use?

Code Explainer 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 Code Explainer use?

About 283 tokens (SKILL.md is roughly 1.1k 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 Code Explainer?

Skills that share tags, products or a category with Code Explainer: Coding Agent (mastra-ai/mastra, 29k stars), LSP Symbol Navigation Guide (weave-os/router, 5.6k stars), CodeScope Codebase Graph Analysis (QwenLM/qwen-code, 28k stars) and Codegraph QA (QwenLM/qwen-code-examples, 143 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Code Explainer?

mergisi (a GitHub user) maintains it in mergisi/awesome-openclaw-agents, which has 3,995 GitHub stars. The repository holds 16 skills in this directory. The repository was last updated on September 26, 2026.

Source: mergisi/awesome-openclaw-agents on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.