code-editor-expert

Build a headless CodeMirror 6 JSON editor with schema-aware autocompletion.

3|Updated Feb 7, 2026
One-click install
npx skills add https://github.com/Develonaut/bnto --skill code-editor-expert
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-editor-expert
Source: https://github.com/Develonaut/bnto/tree/main/.claude/skills/code-editor-expert
Command: npx skills add https://github.com/Develonaut/bnto --skill code-editor-expert

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Designs a production-grade CodeMirror 6 JSON editor that lets developers build robust, testable in-browser editors with headless capabilities, schema-aware autocomplete, and command-driven workflows.

Core Features & Use Cases

  • Headless-first editing model that can run in Web Workers without DOM
  • JSON language support with schema-aware autocomplete and validation
  • Slash commands and a command registry for template insertion
  • Dynamic extension composition via compartments and facets
  • Breadcrumbs, theming, and a React hook integration pattern for seamless integration

Quick Start

Instantiate the headless CodeMirror 6 JSON editor with a sample document to begin editing and testing features.

Frequently Asked Questions about code-editor-expert

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

FAQPage Schema
How do I build a headless CodeMirror 6 JSON editor that runs in a Web Worker?

You can build a headless CodeMirror 6 JSON editor by instantiating an EditorState without attaching it to a DOM element, enabling testable in-browser editing and Web Worker execution. It leverages extension composition via facets, state fields, and compartments.

How do I add schema-aware autocompletion to a CodeMirror 6 JSON editor?

Schema-aware autocompletion integrates JSON schema validation directly into the CodeMirror 6 editor state. This provides context-aware suggestions and validation feedback as users type structured JSON documents.

Can I use CodeMirror 6 with React for a JSON editing component?

CodeMirror 6 integrates with React using a dedicated hook pattern that wraps the headless EditorState and dynamic extensions. This provides seamless state synchronization and component lifecycle management.

How do I implement slash commands for template insertion in CodeMirror 6?

Slash commands are implemented in CodeMirror 6 using a command registry that triggers template insertion upon typing a slash. This workflow integrates with the editor's extension composition to inject predefined snippets dynamically.

What is the best way to dynamically compose extensions in CodeMirror 6?

The best way to dynamically compose CodeMirror 6 extensions is by using compartments and facets. This architecture allows you to reconfigure individual extensions at runtime without recreating the entire EditorState.

Does a headless CodeMirror 6 editor support testing without a DOM?

A headless CodeMirror 6 editor explicitly supports DOM-free testability by operating purely on EditorState. This allows frontend teams to run unit tests for JSON editing logic in Node.js or Web Worker environments.