claude-sethu: Instructions file for Claude Code

CLAUDE.md

claude-sethu CLAUDE.md is an instructions file for Claude Code from NamrataAShettar/claude-sethu. It costs 2,116 tokens per session, scanned A, original, MIT.

Project instructions for sethu, a Claude Code plugin that runs terminal commands typed with `> cmd` or `>> cmd` and includes a management command-line tool.

In plain words
What is it for?
Use them when changing sethu so you understand its prompt hook, command runner, configuration storage, locking, and release process.
Why use it?
They give Claude Code a map of the codebase, explain how commands and configuration work, and record important implementation details.

Instructions file for Claude Code

Written for Claude Code: UserPromptSubmit hook event. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

This is NamrataAShettar/claude-sethu's own configuration. It tells Claude Code how to work on claude-sethu 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 claude-sethu configures →

Reuse

Borrowing it

Nothing to install: this file belongs to NamrataAShettar/claude-sethu. 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/NamrataAShettar/claude-sethu/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/NamrataAShettar/claude-sethu

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 claude-sethu CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/namrataashettar/claude-sethu/claude-md/github.svg)](https://agentmods.dev/instructions/namrataashettar/claude-sethu/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/namrataashettar/claude-sethu/claude-md"><img src="https://agentmods.dev/badge/instructions/namrataashettar/claude-sethu/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 claude-sethu CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/namrataashettar/claude-sethu/claude-md"><img src="https://agentmods.dev/badge/instructions/namrataashettar/claude-sethu/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,116 This file is loaded in full into every session.
When invoked 2,116 The same file — it is already loaded in full.
Security scan A 0 findings. 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.02116 $0.02116
Opus 5 $0.01058 $0.01058
Sonnet 5 $0.00423 $0.00423
Haiku 4.5 $0.00212 $0.00212

Measured 10d ago against content hash 34bb7d9b72f0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

claude-sethu 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 10d 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 · 116 lines

How it starts

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

sethu — working notes for Claude

sethu is a Claude Code plugin: a UserPromptSubmit hook (hooks/sethu_hook.pyhooks/_engine.py) that runs terminal commands typed as > cmd / >> cmd, plus a management CLI (sethu --allow …, --mode …, --runner). Pure stdlib, no deps.

Code map

(By module and function/section, not line numbers, so it survives edits. _engine.py is banner-commented — # ── <section> ── — grep those to jump.)

  • hooks/sethu_hook.py — the UserPromptSubmit entry. Cheap fast-path gate (_maybe_sethu, decides with json/os only, does NOT import _engine for a normal prompt); routes a sethu prompt to process(); runs sethu … management commands as a subprocess; _block emits the zero-token decision:block.
  • hooks/_engine.py — the core, in banner sections:
    • configDEFAULTS, load_config (type + value coercion, whitespace-canonicalizes allow), save_config (atomic via _atomic_write: temp+fsync+os.replace, so a crash can't torn/truncate it — set_cwd uses it too), _config_lock (fcntl.flock serializing the CLI's read-modify-write so concurrent writers don't lose updates), config_path.
    • allow matching_matches (exact/prefix), _is_chain_unsafe / _has_unquoted_ops / _SUBST_META (the injection-hardened chain guard).
    • per-session cwd (cwd mode)is_cd, resolve_cd, set_cwd/get_cwd (atomic).
    • command execution — gated decision (is_gated, GATED (flag-safe tool set, no flag logic), _DANGER, _pipe_segments (quote-aware | split, so a pipe inside a quoted arg like jq '.a | .b' isn't mistaken for a chain), _LAUNCHERS, _why_refused, gated_list_text); interactive/TUI detection (is_interactive, _REPL, _REPL_BATCH_FLAGS, INTERACTIVE, _looks_full_screen); run_capture (the captured runner — streams via Popen, byte-capped at MAX_CAPTURE_BYTES, kills a runaway); truncation + temp hygiene (_truncate, _out_path, _sweep_temp (7-day GC of sethu's /tmp files — output logs, launch scripts, sockets, cwd/lock files; throttled to ~1/hr by the mtime of an empty /tmp/sethu-swept sentinel, opened O_NOFOLLOW, so it doesn't rescan /tmp every command), _output_path); launch_in_terminal + _launch_command_script.
    • persistent shell (shell mode)shell_run, _sock_path, _spawn_daemon (+ _acquire_spawn_lock/_release_spawn_lock, the L7 spawn guard), kill_daemons, _timeout_msg (talks to _shelld.py).
    • the core: process one submitted promptprocess() (the one entry that returns {passthrough|block|context}), plus the header/color helpers _header, _reply, _msg, _c, _color_on, _plain_on (plain/spoken mode: sethu: prefix + words, no |^=^|/glyphs — threaded as a plain arg through the render helpers), _style_cli (the hook colors/plain-swaps the management CLI's captured stdout; HELP/help_text embed NO lead so _lead supplies the colored icon), _ANSI, ICON.
    • management CLImain (wraps the read-modify-write in _config_lock), _apply_cli_mutations (the per-flag config mutations, run under the lock; _announce_launch opens a terminal AFTER the lock), normalize_argv (subcommand→flag aliasing), _Parser (branded errors), help_text, _print_config.
  • hooks/_shelld.py — the persistent-shell daemon (PTY + unix-socket server) that backs shell mode; wire protocol version _PROTO. On a command timeout it verifies the shell recovered (_probe/_recover: Ctrl-C → SIGKILL the foreground pgrp → respawn on a wedge, H3) and byte-caps output (MAX_OUTPUT, ST7).
  • hooks/session_start.py — SessionStart hook (first-run welcome).
  • hooks/run.sh — POSIX-sh launcher: exec python3, or degrade gracefully when it's missing (the tolerant no-python3 block shim).
  • hooks/hooks.json — hook registration. .claude-plugin/plugin.json (version lives here), marketplace.json.
  • tests/test_sethu.py — the whole suite + the coverage table and TestCoverageEnforcement (top of file). docs/ — design-guidelines, testing, use-cases.

Read the full file on GitHub · 116 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. 10d ago First seen · 116 lines · 2,116 tokens per session scan A 34bb7d9b72f0

Subscribe to this mod's changes

claude-sethu CLAUDE.md is an instructions file published in the GitHub repository NamrataAShettar/claude-sethu (1 stars, last pushed 1mo ago), licensed MIT. It adds 2,116 tokens to every session, about $0.0106 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.

Related

Other instructions, from other repositories

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens