yq-code-explain

yq-code-explain is a skill for Claude Code, Codex from rockyflux/yq-workflow. It costs 35 tokens per session (668 once invoked), scanned A, original, MIT.

A guide for explaining how existing code works, including its purpose, main flow, dependencies, state changes, and hidden assumptions.

In plain words
What is it for?
Use it for onboarding, explaining a function or module, tracing a call chain, or preparing for a safe change.
Why use it?
It helps developers understand unfamiliar code before changing or debugging it, including areas where mistakes are easy to make.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for onboarding, explaining a function or module, tracing a call chain, or preparing for a safe change.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rockyflux/yq-workflow/yq-code-explain
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.

Any agent
npx skills add rockyflux/yq-workflow --skill yq-code-explain
Clone the repo
git clone --depth 1 https://github.com/rockyflux/yq-workflow

Made for: Claude Code, Codex.

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 yq-code-explain

README.md
[![agentmods](https://agentmods.dev/badge/skills/rockyflux/yq-workflow/yq-code-explain/github.svg)](https://agentmods.dev/skills/rockyflux/yq-workflow/yq-code-explain)
Your own site
<a href="https://agentmods.dev/skills/rockyflux/yq-workflow/yq-code-explain"><img src="https://agentmods.dev/badge/skills/rockyflux/yq-workflow/yq-code-explain/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for yq-code-explain

Your own site · 80×15
<a href="https://agentmods.dev/skills/rockyflux/yq-workflow/yq-code-explain"><img src="https://agentmods.dev/badge/skills/rockyflux/yq-workflow/yq-code-explain.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 668 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00035 $0.00668
Opus 5.5 $0.00014 $0.00267
Sonnet 5.5 $0.00007 $0.00134
Haiku 4.5 $0.00003 $0.00067

Measured 3mo ago against content hash c3fb19c7e667, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

yq-code-explain 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 3mo 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.

templates/yq-skills/yq-code-explain/SKILL.md · 88 lines

What it actually says

YQ Code Explain

Overview

把代码从“能看见”解释成“能理解”,说明职责、主流程、依赖、状态变化和隐含约束。

Core principle: 解释代码时优先回答“它为什么存在、怎样工作、哪里容易踩坑”。

When to Use

  • 用户要读代码、解释函数、梳理调用链或快速上手模块
  • 需要先理解现状再做修改、排障或评审
  • 模块行为复杂,单看代码难以快速形成心智模型
  • 需要把实现翻译成更可讨论的业务和工程语言

Route Elsewhere

  • 主要是定位故障和根因:转 yq-debug
  • 主要是交付新代码:转 yq-code-gen
  • 主要是评审改动风险:转 yq-code-review

Process

  1. 明确解释目标:函数、模块、链路还是整体架构。
  2. 提炼入口、出口、关键状态和依赖。
  3. 说明主流程、分支逻辑和异常处理。
  4. 标出重要假设、配置点和外部影响。
  5. 总结最值得关注的风险或修改前提。

Output

# Code Explanation
## Purpose
## Main Flow
## Inputs / Outputs / State
## Dependencies
## Hidden Assumptions
## Risky Areas
## Recommended Next Step
  • 作为 yq-debug、yq-code-refactor 的常见前置
  • 看完代码后准备动手实现时接 yq-code-gen
  • 需要系统层解读时可回到 yq-system-design
  • 如果解释结果暴露了异常路径或怀疑点,默认接 yq-debug
  • 如果已经明确结构问题,改接 yq-code-refactor
  • 如果目的只是理解后继续实现,接 yq-code-gen

Common Mistakes

  • 只复述代码,不提炼职责
  • 没有说明状态和数据流
  • 忽略外部依赖与隐含前提
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. 3mo ago First seen · 88 lines · 35 tokens per session scan A c3fb19c7e667

Subscribe to this mod's changes

yq-code-explain is a skill published in the GitHub repository rockyflux/yq-workflow (2 stars, last pushed 1mo ago), licensed MIT. It adds 35 tokens to every session and 668 once invoked, about $0.0001 per session on Opus 5.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

yq-code-explain compared with skills from other repositories

yq-code-explain next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
yq-code-explainrockyflux/yq-workflowSkill21mo agoMITA35Claude Code, Codex
ss-learnbitjaru/styleseedSkill1.1k3d agoMITA73Claude Code, Codex
mindosGeminiLight/MindOSSkill707todayMITA136Claude Code
explore-unknownsdzhng/skillsSkill1.5k20d agoMITA162Claude Code, Codex
eli5dzhng/skillsSkill1.5k20d agoMITA29Claude Code
review-animationsclassroomio/classroomioSkill1.8ktodayAGPL-3.0A34Claude Code
ship-featureclassroomio/classroomioSkill1.8ktodayAGPL-3.0A66Claude Code, Codex