claude-code-studio CLAUDE.md

claude-code-studio CLAUDE.md is an instructions file for coding agents from wat-hiroaki/claude-code-studio. It costs 879 tokens per session, scanned A, original, MIT.

Repository instructions for Claude Code Studio, an Electron desktop application built with React and TypeScript. They describe its build commands, process structure, secure communication between processes, and session managers.

In plain words
What is it for?
For developing, checking, packaging, and understanding Claude Code Studio, including its main process, secure bridge, React interface, and shared types.
Why use it?
They give a coding agent the project’s development commands and architectural rules, reducing mistakes when changing the desktop app or its cross-process communication.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/wat-hiroaki/claude-code-studio/claude-md
Clone the repo
git clone --depth 1 https://github.com/wat-hiroaki/claude-code-studio

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for claude-code-studio CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/wat-hiroaki/claude-code-studio/claude-md.svg)](https://agentmods.dev/instructions/wat-hiroaki/claude-code-studio/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/wat-hiroaki/claude-code-studio/claude-md"><img src="https://agentmods.dev/badge/instructions/wat-hiroaki/claude-code-studio/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 879 This file is loaded in full into every session.
When invoked 879 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00879 $0.00879
Opus 5 $0.00439 $0.00439
Sonnet 5 $0.00176 $0.00176
Haiku 4.5 $0.00088 $0.00088

Measured 4d ago against content hash df1eb2ca0ac3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

claude-code-studio CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 69 lines

How it starts

The opening of the file, as written. The whole thing — 69 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Build & Development Commands

npm run dev          # Dev with HMR (electron-vite dev)
npm run build        # Production build (electron-vite build)
npm run lint         # ESLint (.ts,.tsx)
npm run lint:fix     # ESLint with auto-fix
npx tsc --noEmit     # TypeScript type check (no emit)
npm run package      # Windows installer
npm run package:all  # Windows + Mac + Linux

Architecture

Electron app (main + preload + renderer) built with electron-vite.

  • Main process (src/main/) — Node.js: IPC handlers, database, session managers, plugins
  • Preload (src/preload/index.ts) — Secure bridge: 70+ IPC channels exposed via contextBridge
  • Renderer (src/renderer/src/) — React 18 + Tailwind CSS + Zustand
  • Shared types (src/shared/types.ts) — Single source of truth for all cross-process types

IPC Pattern

Renderer calls window.api.method() → preload's ipcRenderer.invoke() → main's ipcMain.handle(). All IPC handlers are in src/main/ipc/ and receive a typed deps object. All inputs validated in main process before execution.

Three Session Managers

Manager Transport Use case
SessionManager spawn() + stream-JSON Headless/API sessions
PtySessionManager node-pty Interactive terminal (xterm.js)
SshSessionManager ssh2 + tmux Remote persistent sessions

PtySessionManager is the primary mode. It spawns Claude CLI with --session-id --verbose and detects status (thinking, tool_running, awaiting, active) by parsing terminal output in ptyOutputParser.ts.

Database

JSON file at {userData}/claude-code-studio/database.json. Atomic writes with dirty flag + debounced save. Query modules in src/main/db/ (agentQueries, workspaceQueries, chainQueries, etc.).

Plugin System

Plugins are MCP servers discovered from ~/.claude-code-studio/plugins/{id}/manifest.json. Each manifest declares tools, toolbar buttons, and context tabs. Plugin install requires user confirmation via dialog before executing any shell commands.

Read the full file on GitHub · 69 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 69 lines · 879 tokens per session scan A df1eb2ca0ac3

Subscribe to this mod's changes

claude-code-studio CLAUDE.md is an instructions file published in the GitHub repository wat-hiroaki/claude-code-studio (11 stars, last pushed 4mo ago), licensed MIT. It adds 879 tokens to every session, about $0.0044 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.