explain-code-slice

explain-code-slice is a skill for Codex from gaelic-ghost/socket. It costs 157 tokens per session (1,618 once invoked), scanned A, original, Apache-2.0.

A step-by-step method for explaining one bounded path through a codebase, from incoming data to final output. It shows the calls, transformations, branches, and system boundaries involved.

In plain words
What is it for?
Use it to document how data moves through modules, services, queues, storage, or APIs and who receives the result.
Why use it?
It makes unfamiliar request flows, pipelines, and feature behavior easier to follow without skipping important handoffs.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: mentions subagents; mentions Codex.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/gaelic-ghost/socket/explain-code-slice
Any agent
npx skills add gaelic-ghost/socket --skill explain-code-slice
Clone the repo
git clone --depth 1 https://github.com/gaelic-ghost/socket

Made for: Codex.

Its marketplace also offers this one on its own, as the plugin codebase-understanding-skills/plugin install codebase-understanding-skills after adding the marketplace above.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for explain-code-slice

README.md
[![agentmods](https://agentmods.dev/badge/skills/gaelic-ghost/socket/explain-code-slice.svg)](https://agentmods.dev/skills/gaelic-ghost/socket/explain-code-slice)
Your own site
<a href="https://agentmods.dev/skills/gaelic-ghost/socket/explain-code-slice"><img src="https://agentmods.dev/badge/skills/gaelic-ghost/socket/explain-code-slice.svg" alt="Measured on agentmods" height="20"></a>
Per session 157 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,618 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00157 $0.01618
Opus 5 $0.00078 $0.00809
Sonnet 5 $0.00031 $0.00324
Haiku 4.5 $0.00016 $0.00162

Measured 2d ago against content hash 425e244ee5e1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

explain-code-slice scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/codebase-understanding-skills/skills/explain-code-slice/SKILL.md · 161 lines

How it starts

The opening of the file, as written. The whole thing — 161 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Explain Code Slice

Use this skill when the user wants one bounded walkthrough of how part of a system works from start to finish. The canonical term is slice.

Purpose

  • Explain one slice end to end without dropping meaningful steps.
  • When the user wants the slice recorded durably, preserve an existing repository-owned slice record or ask where it belongs.
  • Start with the incoming data shape, what it represents, who sends it, and why it enters the flow.
  • Walk the execution path in order, including boundaries, branch points, shared versus specialized steps, and data transformations.
  • End with the final output shape, who receives it, and what purpose it serves.
  • Let the user control explanation density with a detail level, not by silently skipping steps.

Canonical vocabulary

  • slice: one bounded end-to-end walkthrough of a request, event, feature action, job, or data item.
  • data shape: the meaningful structure of the data at a point in the slice, what it represents, and why it has that shape.
  • boundary: a meaningful crossing such as caller/callee, module, package, process, service, client/server, queue, storage, or external API.
  • branch point: any step that can route execution down different paths.

Treat pipeline, execution flow, request lifecycle, data flow, trace, and walkthrough as compatibility language for the same underlying workflow unless the user clearly means something else.

Inputs

  • The slice subject:
    • a feature
    • a request or event
    • a job or workflow
    • a specific datum moving through code
    • a code entrypoint or path to follow
  • Optional detail level:
    • quick
    • standard
    • thorough
  • Optional focus:
    • branch-heavy
    • data-shape-heavy
    • boundary-heavy
    • debugging-oriented
  • Optional comparison target for compare slices

Use standard when no detail level is specified.

Primary workflow: explain a slice

  1. Identify the slice trigger or entrypoint.
  2. Explain the incoming data first:
    • what shape it has
    • what it represents
    • who is sending or constructing it
    • why it is entering the slice
  3. Walk the slice in strict execution order from start to finish.
  4. For each meaningful step, explain:
    • where it happens
    • what responsibility it has
    • whether it is shared or specialized
    • whether it crosses a boundary
    • whether it branches
    • whether the data shape changes
    • why any transformation exists
  5. End with the output or return path:
    • final shape
    • final destination
    • why that result is consumed there
  6. Include a simple step diagram with markers for branch points and data-shape changes.
  7. Add short notes for those markers so the diagram stays readable.

Read the full file on GitHub · 161 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 161 lines · 157 tokens per session scan A 425e244ee5e1

Subscribe to this mod's changes

explain-code-slice is a skill published in the GitHub repository gaelic-ghost/socket (7 stars, last pushed 10d ago), licensed Apache-2.0. It adds 157 tokens to every session and 1,618 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

learning-and-development

Builds capability — skills gaps, career frameworks, training that transfers to the job, and internal mobility. Use this to design a career ladder, close a capability gap, decide whether to build or hire a skill, structure onboarding into a role, or work out why training keeps failing to change anything.

cbrock84/headcount · 64 tokens

explain

Explain jig vocabulary and artifacts in plain language. Three modes: term mode defines one lexicon term; artifact mode walks through a spec or ADR and its linked references; passage mode explains pasted jig output. Output is ephemeral (chat-only). Auto-triggers when you say explain this term, walk me through this…

ramboz/jig · 173 tokens

pipeline

Use when the user wants a feature idea taken end-to-end in one autonomous run — phrases like "run the whole pipeline", "take this feature from idea to finished branch", "brainstorm then build it autonomously", "do everything from idea to merged", "implement all phases without stopping". Triggers when they want…

kardebadas/claude-plugin · 80 tokens

craft

Use when a product idea is still vague and needs to become a clear definition of what to build — "let's craft an app like X", "help me define what I actually want", "clarify this idea before we plan it". Also use before planning or implementation when requirements, UX, domain behaviour, or technical preferences have…

kardebadas/claude-plugin · 83 tokens

bug-fix

Use when a bug, regression, or unexpected behaviour is reported and the user wants it fixed end to end — "why is X broken", "this stopped working after Y", "fix this crash". Also use when a symptom is known but its cause is not. Not for building new behaviour, and not for a change whose cause is already proven.

kardebadas/claude-plugin · 74 tokens

bug-investigate

Use when someone wants to know WHY something is broken and has not asked for it to be fixed — "why is this happening", "what's causing this error", "find out what's wrong", "diagnose this before we decide". Also use before committing to a fix, when the cause is unknown and the decision depends on it. Not for fixing …

kardebadas/claude-plugin · 83 tokens