init

A command that initializes Sentinel in a project by creating its configuration and runtime folders. It detects common programming languages and tools from files such as package.json, pyproject.toml, or Cargo.toml.

In plain words
What is it for?
Use it to identify a project's technology stack, configure Sentinel, and create folders for session state, statistics, logs, and task data.
Why use it?
It removes the manual setup needed to begin Sentinel enforcement and project-specific tracking.

Command

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 commands/tk-logl/sentinel/init
Clone the repo
git clone --depth 1 https://github.com/tk-logl/sentinel
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,335 The whole file, excluding the scripts and references it only reads on demand.
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.00017 $0.02335
Opus 5 $0.00009 $0.01167
Sonnet 5 $0.00003 $0.00467
Haiku 4.5 $0.00002 $0.00233

Measured yesterday against content hash 7fc9bc5b73e9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

init 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 yesterday.

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.

commands/init.md · 288 lines

How it starts

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

/sentinel:init

Set up sentinel enforcement in the current project with guided onboarding.

Step 1: Detect Project Type

Analyze the project root to auto-detect the stack:

Check for:
  pyproject.toml / setup.py / requirements.txt  → Python
  package.json / tsconfig.json                  → Node/TypeScript
  go.mod                                        → Go
  Cargo.toml                                    → Rust
  pom.xml / build.gradle                        → Java
  *.sln / *.csproj                              → C#/.NET
  Makefile + *.c/*.cpp                          → C/C++

Report what was detected:

🔍 Detected: Python project (pyproject.toml found)
   Linter: ruff (pyproject.toml [tool.ruff] present)
   Test: pytest (pyproject.toml [tool.pytest] present)
   Extensions: .py

Step 2: Create .sentinel/ Directory

.sentinel/
├── state/           # Session state archives
├── config.json      # Project-specific settings
├── stats.json       # Usage statistics (auto-reset per session)
└── .gitignore       # Ignore runtime files

Step 3: Create .sentinel/.gitignore

# Sentinel runtime state — not committed
state/
error-log.jsonl
current-task.json
agent-results/
stats.json

Step 4: Generate .sentinel/config.json

Use detected project type to customize. Ask the user to confirm:

📋 Proposed sentinel configuration:

For Python projects:

{
  "language": "auto",
  "source_extensions": ["py"],
  "skip_patterns": ["**/test_*", "**/*.test.*", "**/tests/**", "**/__pycache__/**"],
  "header_threshold_lines": 200,
  "error_repeat_limit": 3,
  "enforcement": {
    "pre_edit_gate": true,
    "deny_dummy": true,
    "surgical_change": true,
    "scope_guard": true,
    "secret_scan": true,
    "file_header_check": true,
    "env_safety": true,
    "error_logger": true,
    "post_edit_verify": true,
    "completion_check": true,
    "scope_reduction_guard": true,
    "task_scope_guard": true,
    "task_automark": true,
    "task_completion_gate": true,
    "subagent_context": true
  },
  "surgical_change_max_lines": 15,
  "taskList": {
    "enabled": true,
    "file": "auto",
    "idPattern": "[A-Z]+-[0-9]+",
    "autoMarkOnCommit": true,
    "injectOnSessionStart": true,
    "maxInjectItems": 30
  }
}

Read the full file on GitHub · 288 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. yesterday First seen · 288 lines · 17 tokens per session scan A 7fc9bc5b73e9

Subscribe to this mod's changes

init is a command published in the GitHub repository tk-logl/sentinel (4 stars, last pushed 5mo ago), licensed MIT. It adds 17 tokens to every session and 2,335 once invoked, about $0.0001 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.