Free & open sourceMIT LicenseIntelliJ IDEA 2025.1–2026.2

A table of contents for your SQL and HTTP files

Write Markdown headings in your comments — -- # Heading in SQL, // # Heading in HTTP — and IntelliJ IDEA shows them as a collapsible Comment Outline you can click to jump. It works in project files and in Scratches, where iteration scripts grow longest.

Version 1.2.4 · MIT License · runs locally, no network code · IntelliJ IDEA 2025.1–2026.2

The illustration above is a mock of an IntelliJ IDEA window: a scratch file orders.sql on the left whose comment headings (-- # Order analytics, -- ## Daily totals, -- ## Per customer, -- ### Repeat buyers, -- # Customer profile, -- ## Active users) appear on the right in the Comment Outline tool window as a tree with their line numbers. The ordinary comment on line 2 does not appear. "Daily totals" is selected in the tree, and the matching comment line is highlighted in the editor.

One command, and your AI writes files with a navigable outline

Install this Skill in the AI tool you already use, and the SQL and HTTP files it writes come organised under short comment headings you can click through in Comment Outline.

Claude Code

mkdir -p ~/.claude/skills/comment-navigator && curl -fsSL https://commentnavigation.plugins.topxup.com/skills/en/comment-navigator/SKILL.md -o ~/.claude/skills/comment-navigator/SKILL.md

Run it in a terminal. SKILL.md is saved to your personal Claude Code skills folder.

Codex

mkdir -p ~/.codex/skills/comment-navigator && curl -fsSL https://commentnavigation.plugins.topxup.com/skills/en/comment-navigator/SKILL.md -o ~/.codex/skills/comment-navigator/SKILL.md

Run it in a terminal. SKILL.md is saved to the Codex skills folder.

Cursor

mkdir -p .cursor/rules && curl -fsSL https://commentnavigation.plugins.topxup.com/skills/en/comment-navigator/SKILL.md -o .cursor/rules/comment-navigator.mdc

Run it in your project root. The file is saved as a Cursor project rule.

Paste anywhere

Download SKILL.md

Paste it at the start of the conversation, then describe your task.

What AI writes by default → with the Skill

AI by defaultBanner lines, hand-numbered sections, prose that repeats the code
-- ============================
-- 1. Query orders
-- ============================
-- This query reads data from the orders table,
-- counts orders and sums the amount per day,
-- and only includes orders that are paid.
SELECT DATE(created_at) AS day, COUNT(*), SUM(amount)
FROM orders
WHERE status = 'PAID'
GROUP BY DATE(created_at);
With the SkillTwo headings, which become two levels in Comment Outline
-- # Order analytics
-- ## Daily totals of paid orders
SELECT DATE(created_at) AS day,
       COUNT(*)    AS order_count,
       SUM(amount) AS total_amount
FROM orders
WHERE status = 'PAID'
GROUP BY DATE(created_at);
Read the full Skill

The commands, the copy button and the download all use the same file. No registration.

How it works

  1. Write headings in comments

    Mark sections with # to ###### inside an ordinary comment line — -- # Heading in SQL, // # Heading in HTTP. A space after the hashes is required. Nothing else about the file changes.

  2. Open Comment Outline

    Click the Comment Outline tab on the right edge, or go to View → Tool Windows → Comment Outline. The Comment Structure action in the editor context menu and the Edit menu opens it too (Shift+Cmd+F12 in the default keymap).

  3. Click to jump, type to search

    Click a heading — or select it with the up and down keys and press Enter — to jump to that comment line. Typing in the tree searches headings directly.

Iteration scripts in Scratches keep growing: a few hundred lines of SQL with no structure and no quick way back to the section you were reading. The outline gives that file a table of contents without changing how you write it.

Features

Everything the outline does, and nothing it does not.

  • Follows the editor, updates in about 250 ms

    The panel follows whichever editor is selected and rebuilds the outline about 250 ms after an edit — no save needed. Empty or unsupported files clear it.

  • Search the outline

    Click the gray file name at the top to turn it into a search box. Matches filter instantly, ignore case and keep their parent path; Up and Down pick, Enter jumps, Esc clears.

  • Scratches tree and file search

    Click the Scratches bar at the bottom of the panel to open a tree of your scratch .sql and .http files with a file-name search box. Both areas scroll on their own; drag the divider to resize.

  • Create, drag and rename Scratch files

    Press + to create orders.sql, api.http or a folder inside the panel; new files open with a heading template. Drag a file onto a folder to move it — name clashes are reported, never overwritten. Right-click for IDEA’s rename, cut, copy, paste and delete.

  • Remembers what you folded

    Expand or collapse any node, or everything at once. Folding state is kept while you edit the same file, and resets to expanded when you switch files.

  • Follows your IDE, stays local

    The UI follows IDEA’s display language (Chinese or English, otherwise English) and its light or dark theme. The outline is built inside the IDE: no document content is uploaded, no telemetry, no ads.

  • No dependency on the SQL/Database or HTTP Client language plugins: parsing uses the platform Document API.
  • The existing comment popup for Java and Kotlin is retained and opens from the same Comment Structure action (Shift+Cmd+F12).

Heading syntax

Headings are ordinary comments. The database console and the HTTP Client still see plain comments, so a file stays runnable exactly as before.

SQL

-- # Roles and permissions audit
-- ## Role entities
-- ### System templates
SELECT 'system role';

-- ### Merchant roles
SELECT 'merchant role';

-- ## Grant details
/*
 * ### Page permissions
 * #### PRO pages
 */
SELECT 'page permission';
Comment Outline
  • Roles and permissions audit
  • Role entities
  • System templates
  • Merchant roles
  • Grant details
  • Page permissions
  • PRO pages
  • -- line comments, MySQL # line comments and /* … */ block comments are all read.
  • Each heading has to sit on its own comment line.
  • Trailing comments after a statement, strings and quoted identifiers are never mistaken for headings.

HTTP

@host = https://example.invalid

###
// # Orders API
// ## Create order
// ### Normal case
POST {{host}}/orders
Content-Type: application/json

{ "skuId": 1001, "quantity": 2 }

###
// ## Query orders
// ### Find by ID
GET {{host}}/orders/example-order-id
Comment Outline
  • Orders API
  • Create order
  • Normal case
  • Query orders
  • Find by ID
  • // # Heading is the recommended form; # # Heading — a hash comment plus a Markdown marker — works too.
  • ### Request name is always a level-2 node, so do not use it for level 3; write // ### Heading when you need an explicit level.
  • Empty ### separators are skipped, and comments inside request pre/post scripts are ignored.
HTTP heading levels
Written as Outline level
// # Heading or # # Heading Level 1
// ## Heading or # ## Heading Level 2
// ### Heading or # ### Heading Level 3
### Request name Level 2 — the HTTP Client request separator

Rules

  • A space is required after the hash marker. Levels 1 to 6.
  • A skipped level attaches to the nearest shallower heading; same-level headings keep file order.
  • Once a file has explicit headings, only headings are shown — ordinary comments and decorative separator lines stay out.
  • Without explicit headings, numbered sections such as 0. Parameters or 1. Endpoint notes are picked up first; only then does the outline fall back to a flat list of ordinary comments.
  • MySQL: write # # Role audit, # ## Permission details for levels. The first # is the SQL comment marker; the hashes after it set the level.
  • HTTP: after a request body, write the next ### separator first, then the next headings — otherwise they become part of the body.

Install

Two minutes, one command, and an IDE restart when IntelliJ IDEA asks for one.

JetBrains Marketplace

Live

Open the Marketplace listing and install the plugin into IntelliJ IDEA 2025.1–2026.2, or search for Code Comment Navigator in Settings → Plugins → Marketplace.

Install from JetBrains Marketplace

Install from source

  1. Build

    Clone the repository and run ./gradlew test buildPlugin with JDK 21. The installable package is written to build/distributions/comment-navigation-1.2.4.zip.

  2. Install Plugin from Disk

    In the IDE: Settings → Plugins → gear menu → Install Plugin from Disk…, choose the ZIP, and follow the IDE prompts to finish.

  3. Open a SQL or HTTP file

    Open a .sql, .http or .rest file, then click the Comment Outline tab on the right edge, or go to View → Tool Windows → Comment Outline.

Compatibility covers IntelliJ IDEA 2025.1–2026.2 (builds 251–262.*). The plugin builds against the 2025.1 SDK and targets Java 21 bytecode. Building from source needs JDK 21.

Want to see the outline before installing? The repository ships two example files: SQL example · HTTP example

Frequently asked questions

Is Code Comment Navigator free?

Yes. It is released under the MIT License and is free for personal and commercial use — no purchase, no subscription, no activation key. You may modify it, redistribute it and sell it as long as the copyright and license notices are kept. The software is provided as is, with no fixed update schedule and no promised support response time.

Which IntelliJ IDEA versions does it support?

Compatibility covers IntelliJ IDEA 2025.1–2026.2 (builds 251–262.*). The plugin builds against the 2025.1 SDK and targets Java 21 bytecode. Building the plugin from source needs JDK 21.

Do I need the Database or HTTP Client plugins?

No. Parsing uses the platform Document API, so the outline has no dependency on the SQL/Database or HTTP Client language plugins. It reads .sql, .http and .rest files on its own.

Does it send my code anywhere?

No. The plugin contains no network code. It only reads the text of the editor you have open and builds the outline locally inside the IDE.

Why does ### Request name show up as level 2?

Because it is the HTTP Client’s own request separator, and it is always mapped to a level-2 node so existing .http files keep working unchanged. Empty ### lines are skipped. When you need an explicit third level, write // ### Heading instead.

Does it work in Scratch files?

Yes. Project files and Scratches are both supported — the ever-growing iteration scripts people keep in Scratches are the reason the outline exists. Open the scratch SQL or HTTP file and the panel follows the editor as usual.

License and contact

Code Comment Navigator is released under the MIT License, copyright 2024–2026 Fuuqiu (Tinyue). It is free for personal and commercial use — no purchase, no subscription, no activation key.

You may modify it, redistribute it and sell it, as long as the copyright notice and the license notice are kept. The software is provided as is, without warranty. There is no fixed update schedule and no promised support response time.