siclaw: Instructions file for Claude Code

CLAUDE.md

siclaw CLAUDE.md is an instructions file for Claude Code from scitix/siclaw. It costs 18,577 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 for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions subagents.

This is scitix/siclaw's own configuration. It tells Claude Code how to work on siclaw itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything siclaw configures →

Reuse

Borrowing it

Nothing to install: this file belongs to scitix/siclaw. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/scitix/siclaw/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/scitix/siclaw

Made for: Claude Code.

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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for siclaw CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/scitix/siclaw/claude-md"><img src="https://agentmods.dev/badge/instructions/scitix/siclaw/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 18,577 This file is loaded in full into every session.
When invoked 18,577 The same file — it is already loaded in full.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.18577 $0.18577
Opus 5.5 $0.07431 $0.07431
Sonnet 5.5 $0.03715 $0.03715
Haiku 4.5 $0.01858 $0.01858

Measured 1mo ago against content hash be5d2cdce293, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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 · 167 lines

How it starts

The opening of the file, as written. The whole thing — 167 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:

Headless CLI (single diagnostic invocation; optionally paired with local Portal — see invariants.md §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.

🔴 Headless CLI + Local Portal: Read-Only Snapshot Contract

When siclaw --prompt "..." 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 headless CLI write back to Portal — writes belong in Portal Web UI.

  • 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/run-<random>/{skills,knowledge,credentials}/. Each invocation owns its root and removes only that root on exit or cancellation. Empty snapshots remain authoritative; never substitute ambient resources. These materializers (src/lib/portal-*-materializer.ts) are NOT the same as skillsHandler.materialize() (§1.2) — different code path, scoped ephemeral output, safe in headless CLI cwd.
  • CLI requires --prompt and exits on missing provider configuration. Interactive setup and terminal slash commands have been removed; configuration belongs in Portal Web UI or a pre-provisioned standalone settings file.
  • Standalone headless CLI (no Portal, no selected agent): legacy settings.json flow unchanged. A selected Portal agent must load successfully; never silently execute against local configuration when its snapshot fails.

Read the full file on GitHub · 167 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. 1mo ago Changed · -2 lines · -444 tokens per session be5d2cdce293
  2. 2mo ago Changed · +4 lines · +2,573 tokens per session 1b451eba968f
  3. 2mo 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 (238 stars, last pushed 25d ago), licensed Apache-2.0. It adds 18,577 tokens to every session, about $0.0743 per session on Opus 5.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

siclaw CLAUDE.md compared with instructions from other repositories

siclaw CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
siclaw CLAUDE.mdscitix/siclawInstructions file23825d agoApache-2.0A18,577Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode