siclaw CLAUDE.md

siclaw CLAUDE.md is an instructions file for coding agents from scitix/siclaw. It costs 16,448 tokens per session, scanned A, original, Apache-2.0.

An operating guide for Siclaw, an AI assistant that runs Kubernetes diagnostics from natural-language requests. It explains the shared agent core and its terminal, local, and production modes.

In plain words
What is it for?
Use it when changing runtime behavior, synchronizing user skills, building skill bundles, or working on the terminal and portal integration.
Why use it?
It documents architecture rules that protect user isolation, skill selection, and read-only snapshots in sensitive runtime environments.

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

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/scitix/siclaw/claude-md.svg)](https://agentmods.dev/instructions/scitix/siclaw/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/scitix/siclaw/claude-md"><img src="https://agentmods.dev/badge/instructions/scitix/siclaw/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 16,448 This file is loaded in full into every session.
When invoked 16,448 The same file — it is already loaded in full.
Security scan A 1 finding. 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.16448 $0.16448
Opus 5 $0.08224 $0.08224
Sonnet 5 $0.03290 $0.03290
Haiku 4.5 $0.01645 $0.01645

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

Security

Grade A, and why

siclaw CLAUDE.md scanned grade A with 1 finding 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

Primary defense: **OS-level user isolation** — child processes run as `sandbox` user; `kubectl` has setgid `kubecred` (ADR-010). Secondary: **whitelist-only command validation** (`src/tools/infra/command-sets.ts`). `sed`
CLAUDE.md · 165 lines

How it starts

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

Siclaw — Operating Manual for Claude

Auto-loaded at session start. Keep concise — deep reference lives in docs/design/.


What This Project Is

Siclaw is an AI-powered SRE copilot that runs Kubernetes diagnostics via natural language.

Three runtime modes share one agent core:

TUI (single-user terminal; may pair with a local Portal sidecar — see §1.4)
Gateway + LocalSpawner (multi-user, local dev — all users share one process + filesystem)
Gateway + K8sSpawner  (production — one isolated pod per user)

Critical Architecture Invariants

Full spec: docs/design/invariants.md

🔴 Local Mode: Shared Filesystem

LocalSpawner runs ALL AgentBox instances in-process, sharing one filesystem.

  • skillsHandler.materialize() must NOT be called in local mode — wipes all users' skills
  • Local skills sync writes only to skills/user/{userId}/ scoped paths

🔴 Skill Bundle Contract

buildSkillBundle() packages only global + skillset (dev only) + personal skills selected for the current workspace. Core skills are baked into the Docker image. materialize() does NOT restore core skills.

🔴 TUI + Local Portal: Read-Only Snapshot Contract

When siclaw (TUI) starts in a cwd that has a reachable local Portal (.siclaw/local-secrets.json present AND /api/health responds), Portal becomes the read-only source of truth for skills, knowledge, credentials, agents, MCP servers, and LLM providers. Do not add code paths that let the TUI write back to Portal — writes belong in Portal Web UI. The existing /setup slash command detects Portal mode and switches to read-only + "Open in Portal →" behaviour; preserve that symmetry in any new command that would mutate configuration.

  • Snapshot contract: GET /api/v1/cli-snapshot?agent=<name> — see src/portal/cli-snapshot-api.ts. Agent-scoped joins via agent_skills, agent_hosts, agent_clusters, agent_mcp_servers, agent_knowledge_repos.
  • Materialization: payload unpacked to .siclaw/.portal-snapshot/{skills,knowledge,credentials}/. SIGINT/SIGTERM wipe the dir. These materializers (src/lib/portal-*-materializer.ts) are NOT the same as skillsHandler.materialize() (§1.2) — different code path, scoped ephemeral output, safe in TUI cwd.
  • First-run wizard: when Portal is reachable, src/cli-first-run.ts redirects user to Portal Web UI for provider setup and exits without writing settings.json. This prevents "ghost providers" that desync across workstations.
  • Standalone TUI (no Portal): legacy settings.json flow unchanged. Do not break that path.

Read the full file on GitHub · 165 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 · 165 lines · 16,448 tokens per session scan A a76291d3c58a

Subscribe to this mod's changes

siclaw CLAUDE.md is an instructions file published in the GitHub repository scitix/siclaw (230 stars, last pushed 6d ago), licensed Apache-2.0. It adds 16,448 tokens to every session, about $0.0822 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories