Markdown Editor With Chat
v1.1.2Lightweight markdown editor with optional OpenClaw gateway chat. Filesystem-based, no database required.
Security Scan
OpenClaw
Benign
high confidencePurpose & Capability
The name/description (filesystem markdown editor with optional gateway chat) aligns with the files and runtime: node is required, MARKDOWN_DIR is required, and the server implements file listing, reading, writing, and an optional chat proxy. No unrelated binaries or credentials are requested.
Instruction Scope
SKILL.md instructs running the provided Node server with a folder argument or MARKDOWN_DIR; the runtime instructions and APIs in server.mjs stay within that scope (serve UI, list/get/save .md files, proxy chat). The server implements path traversal protection and blocks dotfiles and non-.md files.
Install Mechanism
There is no install spec (instruction-only skill besides bundled source). No external downloads or package installs are requested. The only runtime dependency is the node binary (no npm modules), which is proportional for a pure-Node script.
Credentials
Only MARKDOWN_DIR is required; OPENCLAW_GATEWAY_URL and OPENCLAW_GATEWAY_TOKEN are optional and relevant only for the chat proxy feature. The declared sensitive env var (gateway token) matches its use. No unrelated secrets or multiple external credentials are requested.
Persistence & Privilege
The skill does not request always:true and does not modify other skills or system-wide settings. It runs a local HTTP server and stores files only under the supplied MARKDOWN_DIR, which is consistent with its purpose.
Assessment
This package appears to be what it says: a local markdown editor that serves files from a directory and can optionally proxy chat requests to an OpenClaw gateway. Before installing/running, consider the following:
- Set MARKDOWN_DIR to a directory you control and do not point it at system or secret-bearing directories (e.g., /, /root, ~/.ssh). The server will read and write files under that directory.
- If you enable chat, the server will make outbound requests to OPENCLAW_GATEWAY_URL using OPENCLAW_GATEWAY_TOKEN; the token is sent only by the server (not exposed to the browser) but you should ensure the gateway endpoint is trusted.
- The server enforces a localhost/private-host binding by default, but verify you run it on a safe host and do not deliberately expose it to the public internet.
- The code uses the Node global fetch API — run with a modern Node.js (Node 18+).
If you need higher assurance, you can review the complete scripts/server.mjs and index.html (both included) locally before running; otherwise running it in an isolated environment (e.g., a throwaway VM or container) is a reasonable precaution.Like a lobster shell, security has layers — review code before you run it.
Runtime requirements
📝 Clawdis
Binsnode
EnvMARKDOWN_DIR
latest
Markdown Editor with Chat
A lightweight, self-contained markdown editor that serves files from a local directory with optional OpenClaw gateway chat integration.
Features
- Filesystem-based: Point to any directory containing markdown files
- No database: Files are the source of truth
- Folder navigation: Browse nested directories
- Live preview: See rendered markdown as you type
- Optional chat: Connect to OpenClaw gateway for AI assistance
- Zero external dependencies: Pure Node.js, self-contained HTML
Quick Start
# Start with CLI arguments (recommended)
node scripts/server.mjs --folder /path/to/markdown --port 3333
# Or short form
node scripts/server.mjs -f /path/to/markdown -p 3333
# With gateway chat enabled (via env vars)
export OPENCLAW_GATEWAY_URL=http://127.0.0.1:18789
export OPENCLAW_GATEWAY_TOKEN=your-token
node scripts/server.mjs -f /path/to/markdown
Then open http://localhost:3333 in your browser.
CLI Arguments
| Argument | Short | Required | Default | Description |
|---|---|---|---|---|
--folder | -f | Yes* | - | Directory containing markdown files |
--port | -p | No | 3333 | Server port |
--host | -h | No | 127.0.0.1 | Server host (localhost only by default) |
--help | No | Show help message |
*Required unless MARKDOWN_DIR env var is set.
Environment Variables (fallback)
| Variable | Required | Default | Description |
|---|---|---|---|
MARKDOWN_DIR | Yes* | - | Directory containing markdown files |
PORT | No | 3333 | Server port |
HOST | No | 127.0.0.1 | Server host |
OPENCLAW_GATEWAY_URL | No | - | Gateway URL for chat feature |
OPENCLAW_GATEWAY_TOKEN | No | - | Gateway auth token |
CLI arguments take precedence over environment variables.
Security
- Localhost only by default: Server binds to 127.0.0.1, rejects public IPs
- Same-origin only: No CORS headers, browser enforces same-origin policy
- Path traversal protection: Cannot access files outside MARKDOWN_DIR
- No credentials in code: All secrets via environment variables
- Gateway proxy: Tokens never exposed to browser
This is a local development tool. The API is intentionally simple (no auth) because it's designed for localhost use on directories you control.
API Endpoints
GET /- Serves the editor UIGET /api/files- List files and foldersGET /api/files/:path- Get file contentPUT /api/files/:path- Save file contentPOST /api/files/:path- Create new filePOST /api/chat- Proxy chat to gateway (if configured)
Use Cases
- Browse and edit OpenClaw pearls
- Personal markdown wiki
- Note-taking with AI assistance
- Documentation browser
Comments
Loading comments...
