code-explainer

Trace call paths and data flow across multi-language repositories with file evidence.

1|Updated Apr 15, 2024
One-click install
npx skills add https://github.com/yiminllin/dotfiles --skill code-explainer-yiminllin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-explainer
Source: https://github.com/yiminllin/dotfiles/tree/main/opencode/.config/opencode/skills/code-explainer
Command: npx skills add https://github.com/yiminllin/dotfiles --skill code-explainer-yiminllin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Trace and explain call paths and code behavior across multi-language repositories. Use when asked to show a call graph, find callers/callees, locate entry points, explain how a function/module works, summarize code flow, or explain an error message with evidence.

Core Features & Use Cases

  • Identify entry points, responsibilities, and data flow.
  • Trace minimal call paths and dependencies, with evidence from file snippets.
  • Provide concise summaries, TL;DR, ASCII diagram, and a structured explanation.

Quick Start

Provide a starting scope (function, file, or directory) and receive a structured code explanation with evidence.

Frequently Asked Questions about code-explainer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I trace function call paths and data flow across a multi-language repository?

To trace call paths across a multi-language repository, provide a starting scope like a function or file to map callers, callees, and dependencies. You receive concise summaries, an ASCII diagram, and structured explanations backed by file references.

What is the best way to locate code entry points and summarize module behavior?

Locating code entry points and summarizing module behavior involves identifying the starting scope and reading top-level docs to map responsibilities. The process yields evidence-backed explanations with file snippets and uncertainty notes for accurate analysis.

Can I use this to explain how a specific function works with evidence from the code?

Yes, you can explain how a function works by providing it as the starting scope. The tool traces minimal call paths and dependencies, providing concise summaries, TL;DR, and structured explanations with direct file references as evidence.

How do I generate an ASCII call graph diagram for my codebase?

To generate an ASCII call graph diagram for your codebase, apply the tool to a specified directory or file. It maps the call paths and dependencies, outputting a visual diagram alongside a structured explanation of the code flow.

Does this approach work for analyzing code and tracing dependencies across different programming languages?

Yes, this approach works for analyzing code and tracing dependencies across different programming languages. It is specifically designed to explain code call paths and behavior across multi-language repositories without requiring specific language dependencies.

What should I provide as a starting scope to get a structured code explanation?

You should provide a function, file, or directory as the starting scope to get a structured code explanation. The tool then identifies entry points, traces data flow, and outputs evidence-backed explanations with file references and uncertainty notes.