claudedeck CLAUDE.md

claudedeck CLAUDE.md is an instructions file for coding agents from RaZLeN/claudedeck. It costs 1,181 tokens per session, scanned A, original, MIT.

Project instructions for ClaudeDeck, a self-hosted web interface and admin panel for the Claude Code command-line tool. It lets multiple users start streamed AI conversations in separate workspaces and lets administrators manage settings and users.

In plain words
What is it for?
Use them when developing or changing ClaudeDeck's backend, frontend, session handling, user management, model settings, or integrations.
Why use it?
They explain the parts that must work together, including the streamed command output, error handling, authentication, and configurable AI settings.

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/razlen/claudedeck/claude-md
Clone the repo
git clone --depth 1 https://github.com/RaZLeN/claudedeck

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 claudedeck CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/razlen/claudedeck/claude-md.svg)](https://agentmods.dev/instructions/razlen/claudedeck/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/razlen/claudedeck/claude-md"><img src="https://agentmods.dev/badge/instructions/razlen/claudedeck/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,181 This file is loaded in full into every session.
When invoked 1,181 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.01181 $0.01181
Opus 5 $0.00590 $0.00590
Sonnet 5 $0.00236 $0.00236
Haiku 4.5 $0.00118 $0.00118

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

Security

Grade A, and why

claudedeck 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 · 70 lines

How it starts

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

Project: ClaudeDeck

What this is

A self-hostable web UI + admin console for the Claude Code CLI. Multi-user streaming chat where each message spawns claude -p in an agent workspace; admins manage model / MCP / instructions / users from a panel. Open-source framework (MIT), meant to be forked and customized per deployment.

Lineage: extracted from an internal requirements-gathering service as its reusable, domain-free core. All product-specific integrations (task tracker, domain personas, document workflow) were intentionally dropped. Auth was switched from third-party OAuth to local username/password.

Architecture (load-bearing details)

  • Stream-json contract. session-manager.ts spawns claude -p <msg> --output-format stream-json --include-partial-messages --max-turns N --model <m> --verbose [--resume <id>]. Streamed text arrives wrapped as stream_event.event.content_block_delta.delta.text. assistant and result.result events are ignored once streaming has been seen (seenAnyStream flag) to avoid duplicating the reply. result.is_error / non-zero exit → ClaudeCliError. The CLI version is pinned in backend/Dockerfile because this contract is version-sensitive.
  • Marker parser (claude/marker-parser.ts, pure, unit-tested). Three-state machine (IDLE / INSIDE_ARTIFACT / INSIDE_QUESTIONS). Filters two block types from visible text: <<<ARTIFACT>>>…<<<ARTIFACT_END>>> (final markdown doc) and <<<QUESTIONS>>>…<<<QUESTIONS_END>>> (JSON questions, strict schema: ≤20 questions × ≤20 options × ≤500 chars, id [a-zA-Z0-9_-], type single|multi|text). ARTIFACT wins over QUESTIONS. Robust to markers split across chunks, 64 KB buffer overrun, invalid JSON, unclosed blocks. Don't change marker strings without updating the parser, tests, and agents/*/CLAUDE.md together.
  • Agents = workspace directories under agents/<key>/ (CLAUDE.md + .claude/rules/*.md + .mcp.json + .claude/settings.json) + a row in the agents table (key, label, enabled, sort, workspace_dir, config JSONB with optional model). _base is the scaffold template. CLI cwd = the agent workspace, so each agent is isolated (no CLAUDE.md walk-up contamination — agents/ itself has no CLAUDE.md). Model resolves agent.config.model → global claude_model → 'sonnet'.
  • MCP admin (claude/mcp-admin.ts). Writes .mcp.json (definitions) AND .claude/settings.json (enabledMcpjsonServers + permissions.allow: mcp__<name>) together — both are needed for tools to work in non-interactive claude -p. UI accepts only http/sse (RCE prevention). Live status via claude mcp list, filtered to the agent's own servers.
  • Auth. Local username/password (auth/password.ts — scrypt; auth/local-auth.ts — routes + first-admin bootstrap; auth/access.ts — requireAuth/requireAdmin + user management). Session is the standard express-session cookie; the WS layer in index.ts reads & HMAC-verifies it directly.
  • Sessions are active | expired only (cron expires idle ones; any user message revives an expired one). The latest artifact is stored in sessions.last_artifact. No task/finalize workflow (that was domain-specific and removed).
  • Schema lives in db/migrations/001_init.sql, applied idempotently by db/migrate.ts on startup (works for Docker and external DBs). Tables: users, agents, sessions, messages, settings.

Read the full file on GitHub · 70 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 · 70 lines · 1,181 tokens per session scan A 6c3b53fbdf23

Subscribe to this mod's changes

claudedeck CLAUDE.md is an instructions file published in the GitHub repository RaZLeN/claudedeck (5 stars, last pushed 1mo ago), licensed MIT. It adds 1,181 tokens to every session, about $0.0059 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-31.