New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@sleekwp/agent

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sleekwp/agent

Local agent server that connects SleekWP plugins to Claude Code CLI via WebSocket

latest
Source
npmnpm
Version
1.0.4
Version published
Maintainers
1
Created
Source

@sleekwp/agent

Local agent server that connects SleekWP plugins to Claude Code CLI via WebSocket.

What it does

Runs a WebSocket server on your machine that:

  • Syncs plugin files to a temp directory
  • Spawns Claude Code CLI with full terminal emulation
  • Watches for file changes and streams them back
  • Supports session resume across page reloads
  • Adapts Claude Code theme to match your editor (light/dark)

The SleekWP plugin frontend connects via ws://localhost:5733 and renders an interactive terminal using xterm.js.

Quick start

npx @sleekwp/agent

Requires Claude Code to be installed and authenticated.

How it works

Browser (SleekWP plugin)          @sleekwp/agent (your machine)

  xterm.js terminal  ◄──────────►  WebSocket server (:5733)
  Canvas file editor ◄──────────►  │
                                   ├── node-pty (spawns claude CLI)
                                   ├── chokidar (watches file changes)
                                   └── temp dir with synced files
  • Plugin sends files + CLAUDE.md context via WebSocket
  • Agent writes files to a temp directory
  • Claude Code spawns in that directory with --permission-mode acceptEdits
  • Terminal I/O streams bidirectionally over WebSocket
  • File changes detected by chokidar are sent back to the plugin
  • On disconnect, the session detaches (temp dir kept for resume)
  • On reconnect, Claude Code resumes with --continue

WebSocket protocol

Client to server

MessageDescription
session:startStart a new session with files, dimensions, theme, and optional CLAUDE.md
session:stopStop and destroy a session
terminal:inputSend terminal input (keystrokes)
terminal:resizeResize the terminal

Server to client

MessageDescription
session:readySession started, terminal is live
session:endedSession was stopped or Claude Code exited
terminal:outputTerminal output data
files:changedFiles modified by Claude Code
files:deletedFiles deleted by Claude Code
errorError message

Configuration

The agent is zero-config. It uses port 5733 and auto-detects the Claude Code binary.

Theme is synced by temporarily setting ~/.claude.json before spawning, then restoring to the OS default after 3 seconds.

Development

npm run dev    # Start with tsx watch
npm run build  # Build with tsup
npm run test   # Run test suite

Requirements

  • Node.js 20+
  • Claude Code CLI installed and authenticated
  • macOS, Linux, or Windows

License

MIT

Keywords

sleekwp

FAQs

Package last updated on 29 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts