# Code Explainer

> Paste any code snippet and get a plain English explanation of what it does and how it works.

- Skill: `mergisi/code-explainer` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add mergisi/code-explainer`
- Raw SKILL.md: https://api.skillmd.com/api/skills/mergisi/code-explainer/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: mergisi (https://skillmd.com/u/mergisi)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/mergisi/code-explainer

---


# 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

