Duck + Doctor · Your code reading companion

Less guessing.
More understanding.

Let AI explain the code. Let Ducktor put the explanation where you need it — right beside the source, in VS Code.

VS Code 1.85+ · English & 中文 · No API key needed in the extension

src/share/aggregate/group_concat.h
24template <VecValueTypeClass in_tc> 25class GroupConcatAggregate final ← Ducktor 30 using BaseClass = BatchAggregateWrapper<…>;
From a class overview to a real implementation.

How are grouped strings concatenated? Where do ORDER BY and DISTINCT fit? What happens when the result is too long?

Explore the interactive case below → · Full source, terms, line notes, and source-linked diagrams.

01 Separate explanation files02 Layered understanding03 Source-linked navigation04 Bilingual interface
Your tools, your workflow

One format. More places to read.

Extension · IDEs

VSVS CodeQQoderCCursorTTrae IDECBCodeBuddy…Other IDEs

Designed for VS Code and VS Code-compatible IDEs, including Qoder, Cursor, Trae IDE, and CodeBuddy. Install the VSIX from Releases. The IDE must support VSIX installation and the required VS Code APIs (1.85+); availability can vary by IDE version.

Generator skill · AI agents

CCursorCXCodexCCClaude Code…Other agents

Use the same generator skill with Cursor, Codex, Claude Code, or another agent that can read skill instructions and workspace files. Skill discovery differs by agent; installation instructions are below.

These are just some of the IDEs and agents you can use. Other tools supporting the required extension APIs or skill instructions can work too. Compatibility depends on the tool and version; product names do not imply endorsement.

Try Ducktor in your browser

Real code. Real context.

Explore the GROUP_CONCAT implementation in OceanBase’s open-source code, using the complete C++ source and its accompanying .ducktor explanations. Try the dotted-underlined terms, inline Ducktor hints, hover actions, and right-hand panel; click flowchart nodes to locate the source, then use “Line by line” to read the details alongside the code.

The .ducktor explanations were generated by openai/gpt-6.1-sol through the skill. These are relatively basic explanations, provided for reference only.

This webpage simulates the experience. Refer to the actual extension for its real behavior.

Built for reading real code

Context, without clutter.

Onboard into a new project, trace an implementation, or review a change. Explanations live in mirrored .ducktor files, not in your source.

01 / OVERVIEW

Block explanations

Read a block overview from its first-line hint, in a hover or a dedicated right-hand panel.

02 / VOCABULARY

Terms in context

Hover dotted-underlined keywords for definitions. Aliases and local, module, or global scopes keep them relevant.

03 / DETAIL

Line-by-line reading

A standalone preview aligns complete, read-only source with Markdown explanations. Switch to an overall view whenever you need.

04 / CONNECTIONS

Follow the references

Jump to source files, line ranges, workspace symbols, and external documentation directly from explanations.

05 / RELATIONSHIPS

Understand the flow

Read Mermaid diagrams in explanation panels. Click mapped nodes to navigate to their source ranges.

06 / EXPLORER

Find your next entry point

Browse explained files in the Ducktor File Explorer. Search file names and filter for line explanations or diagrams.

Two tools. One reading workflow.

Generate once. Read alongside.

The generator skill guides your AI agent. The extension displays the results. Use them together, or independently.

01 / SOURCE

Choose your scope

A function, a file, or code affected by a change. Scope is independent of explanation depth.

02 / AI + SKILL

Generate explanations

Your AI agent reads current code and verifies positions and references using the generator skill.

03 / .DUCKTOR

Keep source untouched

Explanations are UTF-8 YAML files under the workspace-root .ducktor/ directory.

04 / IDE

Read and navigate

Explore overviews, terms, line explanations, and linked code without leaving your editor.

Choose the detail you need

From a quick overview to guided learning.

L1–L5 are generation presets, not file-format fields. Capabilities can be combined independently; add G for review concerns.

LevelFocusWhat it adds
L1OverviewResponsibilities and results
L2UsageInputs, outputs, prerequisites, side effects, and failure behavior
L3UnderstandingExecution stages, branches, and data flow
L4Line-by-lineExplanations for every meaningful source line
L5Guided learningNecessary symbols, relevant type members, and collaboration

L5 covers only members involved in the current function by default, not the entire class or dependency tree. Explore capabilities ↗

Quick start

Your next codebase, a little clearer.

Ask your Agent to install both

Copy this prompt into your Agent. It must confirm the installation targets before proceeding:

Please install the Ducktor skill and VSIX extension from https://github.com/ZoruaSama/Ducktor.
1. Detect the OS and installed VS Code-like IDEs (VS Code, Cursor, Qoder, Trae, CodeBuddy, and others). List their names, versions, and available CLI or installation paths; do not assume VS Code is the only IDE.
2. Ask which IDE(s) should receive the extension and which Agent(s) I use. Wait for my confirmation before installing.
3. Install the skill globally under my home directory, never in the project. For manual installation, copy the complete skills/ducktor-generator/ directory, including SKILL.md and references/, to the selected Agent's global path: ~/.codex/skills/ducktor-generator/ for Codex, ~/.claude/skills/ducktor-generator/ for Claude Code, or ~/.cursor/skills/ducktor-generator/ for Cursor.
4. For OpenSkills, check Node.js/npm, install npm install -g openskills if needed, then run openskills install ZoruaSama/Ducktor --global --universal and select ducktor-generator. Confirm the selected Agent can load ~/.agent/skills/; otherwise use its native global skill directory. Update later with openskills update ducktor-generator.
5. Download the latest released VSIX from GitHub Releases and use the selected IDE's supported installation method to install it into that user's global extension directory, not the project or another IDE. Preserve existing settings. Ask before adding dependencies, elevating privileges, or overwriting files.
6. Verify the extension is installed and the skill's SKILL.md and references/ are readable and complete. Report actual installation paths and required IDE/Agent reloads. Never report unexecuted steps as successful.
7. End by showing the user these usage instructions:
Press Ctrl + Shift + P (macOS: ⌘ + Shift + P) to open the command palette. Search directly for these keywords, select the corresponding toggle commands, and make sure each feature is enabled:
hover: enable hover tooltips.
codelens: enable CodeLens.
inlay hints (or inline hints): enable inline hints.

Install it yourself

1. Install the extension

Ducktor is not yet published to the VS Code Marketplace. Download the latest .vsix from GitHub Releases. In your IDE, open the command palette and run Extensions: Install from VSIX..., then select the downloaded file.

Open your project folder in VS Code. Press Ctrl + Shift + P (macOS: ⌘ + Shift + P) to open the command palette. Search directly for these keywords, select the corresponding toggle command, and make sure each feature is enabled:

  • hover: enable hover tooltips.
  • codelens: enable CodeLens.
  • inlay hints (or inline hints): enable inline hints.

Alternatively, open the command palette and search for Preferences: Open User Settings (JSON). Merge the following into your existing settings without replacing other entries:

{
  "editor.inlayHints.enabled": "on",
  "editor.hover.enabled": true,
  "editor.codeLens": true
}

2. Install the generator skill

OpenSkills installation: use OpenSkills to install the complete skill. First install Node.js LTS (includes npm), then install OpenSkills in your terminal:

npm install -g openskills

Install globally into the universal Agent skill directory under your home directory (~/.agent/skills/). --global selects global installation; --universal selects the shared directory. Using only --universal is not a global installation.

openskills install ZoruaSama/Ducktor --global --universal

Update this skill later:

openskills update ducktor-generator

For agents that load skills through AGENTS.md, run this registration command in the relevant project (it does not reinstall the skill into the project):

openskills sync

Select ducktor-generator when prompted. sync registers it for agents that read AGENTS.md; other agents use their own loading conventions.

Manual installation: download or clone the repository, then copy skills/ducktor-generator/ as a complete directory, including SKILL.md and references/.

  • Codex: ~/.codex/skills/ducktor-generator/
  • Claude Code: ~/.claude/skills/ducktor-generator/
  • Cursor: ~/.cursor/skills/ducktor-generator/

These are global skill paths under your home directory (~), not your project directory. Restart or reload your agent if required. If skills are not discovered, ask the agent to read skills/ducktor-generator/SKILL.md from your cloned repository and follow it.

After installation, ask your AI Agent to generate explanations:

Generate L3 Ducktor explanations for
src/main.js in English, with verified
references to related symbols.
Browse your project

The File Explorer.

Need an overview of every file that has Ducktor explanations? Open the Ducktor File Explorer from the command palette. It shows your entire explained project at a glance, without leaving VS Code.

How to open it

Press Ctrl + Shift + P (macOS: ⌘ + Shift + P), type Ducktor, and run Ducktor: Open File Explorer / 打开文件目录. The command ID is ducktor.showIndex.

Need to open it again? Just search for Ducktor — it sits right next to all the other Ducktor commands in the palette.

What you can do

  • Browse every explained source file in its original directory structure
  • Expand any file to see its line-by-line explanations, code blocks, and term definitions
  • Click any entry to jump straight to the corresponding source line
  • Filter to files that have line explanations, diagrams, or both
  • Search file names to quickly locate what you need
Good to know

A few practical details.

Does the extension generate explanations?

No. Generation is handled by your AI agent using the Ducktor generator skill. The extension reads and displays existing explanations and needs no model or API-key configuration. You can also write the files manually.

Where do explanation files go?

Mirror source paths under the workspace-root .ducktor/ directory and append .ducktor. For example, src/main.js maps to .ducktor/src/main.js.ducktor. Files next to the source are not read. Each folder in a multi-root workspace has its own explanation directory.

How do I open the reading views?

Hover a Ducktor hint or underlined term. Use the top-of-file CodeLens when valid line explanations exist. To browse the project, run Ducktor: Open File Explorer from the command palette. Set ducktor.displayMode to panel for the right-hand panel.

Can explanations be in Chinese?

Yes. Request the explanation language during generation. Set ducktor.language to zh-CN for the extension's localized interface. This setting does not translate existing explanation content.

Read code. Build understanding.

Meet your code reading companion.