Skip to content

PeppeDAlterio/vscode-crab

Repository files navigation

Crab

Crab

AI-native Markdown IDE for VS Code
Select text. Leave comments. Let Claude revise — all without leaving your editor.

MIT VS Code 1.85+


Crab is a VS Code extension that brings a review-style editing workflow to Markdown. Instead of switching between your document and an AI chatbox, you highlight passages directly in the editor, attach short instructions as comments, and submit them all at once. Claude reads every annotation in context and returns precise, scoped edits you can inspect and apply individually — giving you the speed of AI assistance with the control of a human-in-the-loop review.

Crab runs on top of the Claude Code CLI — if you already have a Claude Code subscription, there is nothing extra to pay. No additional API keys, no separate billing.


Why Crab?

  • Comment-driven editing — Annotate your document in context, like a code review. No copy-pasting into a chatbox. Claude addresses every comment in a single pass.
  • Your edits, your control — Claude returns targeted diffs you can review, tweak in an inline editor, and apply or reject individually. Nothing changes until you say so.
  • Comments follow the text — Anchor tracking keeps highlights pinned to the right passage as you keep editing, so annotations never go stale.
  • Per-document memory — Each Markdown file gets its own chat thread, persisted across VS Code sessions. Pick up where you left off.

Features

  • Contextual Comments — Select text, press Cmd+Shift+C (Ctrl+Shift+C on Windows/Linux), type your instruction. A yellow highlight pins the comment to that range and follows your edits.
  • Batch Review — Submit all comments at once. Claude reads the full document and produces targeted search-and-replace edits addressing every annotation.
  • Sidebar Chat — Ask free-form questions about your document. Claude sees the full content and recent conversation history.
  • Review & Apply — Each proposed change appears as a diff block in the sidebar. Edit the replacement text inline before applying, or click Apply All to accept everything.
  • Refine Edits — Modified a proposed edit? Click Refine to ask Claude to iterate on your changes.
  • Model Selection — Switch between Sonnet, Opus, Haiku, or Opus 1M from the sidebar dropdown. Adjust effort level (low / medium / high / max).
  • Session Persistence — Chat history, pending comments, and model preferences are saved per document across sessions.

Quick Start

Prerequisites

  • VS Code 1.85+
  • Claude CLI installed and authenticated (run claude once in your terminal)

Install

From VSIX (recommended):

code --install-extension vscode-crab-0.1.0.vsix

Download the .vsix from GitHub Releases.

From source:

git clone https://github.com/PeppeDAlterio/vscode-crab.git
cd vscode-crab
npm install && npm run compile
# Press F5 in VS Code to launch the Extension Development Host

VS Code Marketplace — coming soon.

Your first edit

  1. Open any .md file in VS Code
  2. Select a passage you want to improve
  3. Press Cmd+Shift+C (or Ctrl+Shift+C) and type your comment
  4. Add more comments on other passages if you like
  5. Open the Crab sidebar (crab icon in the activity bar)
  6. Choose your model and effort level from the dropdowns
  7. Click Submit Comments
  8. Review the proposed edits — modify inline if needed
  9. Click Apply on each edit, or Apply All

Commands

Command Keybinding Description
Crab: Add Comment Cmd+Shift+C / Ctrl+Shift+C Attach a comment to the selected text
Crab: Remove Comment Remove a comment from the sidebar or command palette

Tip: "Add Crab Comment" also appears in the right-click context menu when text is selected in a Markdown file.

How It Works

Commenting — When you add a comment, Crab highlights the selected text and pins the comment to that exact range. As you continue editing, the highlight moves with the text automatically. Pending comments appear in the sidebar, where you can edit or remove them before submitting.

Submitting — Clicking "Submit Comments" sends the full document and all annotations to Claude. Claude reads every comment and returns targeted edits — one per change — using a search-and-replace format.

Reviewing — Each proposed edit appears in the sidebar as a diff block showing what Claude wants to find and what it will replace it with. You can modify the replacement text in the inline editor before applying. Click "Refine" to ask Claude to iterate on your modification.

Chatting — The sidebar also has a free-form chat input. Ask questions about the document, request explanations, or ask for edits without placing specific comments. Claude sees the full document and recent conversation history.

Development

git clone https://github.com/PeppeDAlterio/vscode-crab.git
cd vscode-crab
npm install && npm run watch
# Press F5 to launch the Extension Development Host

Found a bug or have an idea? Open an issue.

License

MIT

About

AI-powered Markdown editor for VS Code — comment, review, and refine documents

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors