Opt editor install
Install or upgrade @reopt-ai/opt-editor in a consumer project. Auto-branches by current install state. Triggers on "opt-editor install", "opt-editor init", "opt-editor setup", "editor install", "editor init", "opt-editor upgrade", "opt-editor update", "editor upgrade", "editor update".From its SKILL.md
npx -y skills add reopt-ai/reopt-skills --skill opt-editor-installAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
- runs commandsInstructs the agent to run 3 commands, including `npm config get @reopt-ai:registry` and 2 more.
SKILL.md
4.1 KB, ~1.0k tokens by cl100k_base, as published. Nobody here has run it
opt-editor Install
This is NOT the opt-editor you know. Read
node_modules/@reopt-ai/opt-editor/dist/docs/before writing code.
When to apply
Consumer project depends on @reopt-ai/opt-editor. Triggers: "install", "init", "setup", "upgrade", "update" — with or without an opt- / editor prefix.
Invocation
/opt-editor-install # Auto-branch (missing → init, installed → upgrade)
/opt-editor-install --with-ai # Init + AI streaming integration
/opt-editor-install 1.0.0 # Upgrade to a specific version
/opt-editor-install --dry-run # Analyze only
Step 1 — Pin agent rules into AGENTS.md / CLAUDE.md
Source: the module's own agent-rules file once it ships one (@reopt-ai/opt-editor does not, as of 1.1.2). Fallback: agent-rules.md bundled with this skill. Wrap content between:
<!-- BEGIN:reopt/opt-editor-agent-rules -->
…content from source…
<!-- END:reopt/opt-editor-agent-rules -->
Idempotent: replace only between markers.
Step 2 — Consumer-side setup (this skill owns; docs cannot)
-
Public npm registry — no token or scoped
.npmrcentry is required. Inspect the project.npmrcandnpm config get @reopt-ai:registry; if the scope still resolves to GitHub Packages, remove only the legacy project entry@reopt-ai:registry=https://npm.pkg.github.com. Preserve unrelated registry/auth settings, and ask before changing user/global npm config. -
Prereqs — Node 18+, React 19+, bun or npm. AI integration uses optional peers
ai >= 7andzod >= 3; do not install them for a non-AI editor. -
App wiring — properties of the consumer app:
- Editor CSS import at the app root.
- Catalog file (
catalog.tsor similar) — block-definition registry. - AI endpoint (when
--with-ai): a Vercel AI SDK–compatible route.
-
Doctor —
npx @reopt-ai/opt-cli doctorruns the audit (unified design CLI; there is noopt-editor-cli).
Step 3 — Route to module docs
| Task signal | Read |
|---|---|
| Start here — doc index | dist/docs/index.md |
| Getting started / install / upgrade | dist/docs/01-getting-started.md |
| API (components, hooks, store, serialization, types) | dist/docs/02-api/ |
| AI streaming integration | dist/docs/02-api/04-ai-stream.md, dist/docs/03-recipes/03-ai-streaming.md |
| High-level AI ops / agent-mode tools (EditorOperation, OperationCompiler) | dist/docs/03-recipes/08-editor-operations.md |
Diff-mode suggestion review (mode="diff") | dist/docs/03-recipes/09-diff-review-integration.md |
| Recipes (basic, custom blocks, markdown, image, …) | dist/docs/03-recipes/ |
| Troubleshooting | dist/docs/05-troubleshooting.md |
Pipeline (auto-branch)
| # | Step | Init | Upgrade |
|---|---|---|---|
| 1 | Detect current state | ✓ | ✓ |
| 2 | Public-registry preflight + legacy override cleanup | ✓ | ✓ |
| 3 | Install / update package | ✓ | ✓ |
| 4 | CSS import check | ✓ | ✓ |
| 5 | Catalog generation | ✓ | – |
| 6 | Editor component generation | ✓ | – |
| 7 | Breaking-change edits | – | ✓ |
| 8 | Deprecated fixes (opt-in) | – | ✓ |
| 9 | Doctor (environment audit) + summary | ✓ | ✓ |
Detailed procedure lives in module docs — start at dist/docs/index.md, then dist/docs/01-getting-started.md. Read before acting.
Safety
- Never upgrade without an impact scan (run
--dry-runfirst). - Confirm before overwriting existing files.
- Apply breaking-change edits in logical groups — never bulk-apply.
- Do not finish until
tsc --noEmitpasses. - Always provide a rollback path.
Verify
npx @reopt-ai/opt-cli doctorpasses.npx tsc --noEmitpasses.- Editor mounts and
StaticRendererrenders a storedEditorSpec(itscontent) without console warnings.
What ships with it: 3 files
2.6 KB alongside SKILL.md
- agent-rules.md1.9 KB
- metadata.json301 B
- README.md417 B