sop-init

sop-init is a command for coding agents from Gnayj/claude-code-sop. It costs 60 tokens per session (6,634 once invoked), scanned B, original, MIT.

A setup command that adds the ccsop delivery workflow to a repository, including documentation, task templates, review settings, and a record of what it installed.

In plain words
What is it for?
Use it when starting ccsop in a repository or when you need to create its initial project structure with optional project, language, provider, or overwrite settings.
Why use it?
It removes the manual work of creating the same project workflow files and can skip files that already exist.

Command

Part of the ccsop plugin — 5 skills, 5 commands, 3 agents shipped together

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/gnayj/claude-code-sop/sop-init
Clone the repo
git clone --depth 1 https://github.com/Gnayj/claude-code-sop

Or install ccsop, the plugin that ships this one along with the rest of its 5 skills, 5 commands, 3 agents.

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 sop-init

README.md
[![agentmods](https://agentmods.dev/badge/commands/gnayj/claude-code-sop/sop-init.svg)](https://agentmods.dev/commands/gnayj/claude-code-sop/sop-init)
Your own site
<a href="https://agentmods.dev/commands/gnayj/claude-code-sop/sop-init"><img src="https://agentmods.dev/badge/commands/gnayj/claude-code-sop/sop-init.svg" alt="Measured on agentmods" height="20"></a>
Per session 60 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 6,634 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 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.00060 $0.06634
Opus 5 $0.00030 $0.03317
Sonnet 5 $0.00012 $0.01327
Haiku 4.5 $0.00006 $0.00663

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

Security

Grade B, and why

sop-init scanned grade B 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 3d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

stdio server in Codex CLI's MCP config (`~/.codex/config.toml [mcp_servers]`, same `--config`
commands/sop-init.md · 336 lines

How it starts

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

/sop-init — first-time scaffold wizard

You are scaffolding the ccsop delivery workflow into the user's repository. The plugin root is ${CLAUDE_PLUGIN_ROOT}; the target repo is ${CLAUDE_PROJECT_DIR} (cwd). Work only in the target repo.

Argument $ARGUMENTS may contain flags: --project-name <name>, --lang <en|zh|de|...>, --provider <codex|claude|manual>, --force. If absent, resolve/ask as specified in Step 2.

Host task-tool guard (whole command): the numbered steps below are the complete execution plan. Do not call any host task/todo-tracking tool, including but not limited to TaskCreate, TaskUpdate, TaskList, TaskGet, and TodoWrite, and do not discover such a tool just to mirror this plan. These tools are not required for scaffolding and may be absent from the live discovered-tool set. This does not restrict a live-schema user-question tool, including the structured-question tool used for genuine Step 2 decisions; that tool must still satisfy its live schema and the one-decision-per-call rule below.

Step 0 — Orphaned-root guard

If ${CLAUDE_PLUGIN_ROOT}/.orphaned_at exists, abort: the plugin root is an orphaned cache snapshot (plugin updated mid-session). Materializing from it scaffolds a stale version. Tell the user to restart the session / reload plugins, then re-run. Never auto-resolve to a sibling dir.

Step 1 — Detect environment

  • Read ${CLAUDE_PLUGIN_ROOT}/templates/control-surface/codex-skill-host-contract.md before any Codex host/materialization decision. Its minimum CLI, canonical/legacy roots, five-entry set, preserve-only gate behavior, and rollback flag are the machine-derived authority; do not reconstruct those facts from this prose.
  • Is this a git repo? If not, tell the user to git init first and stop (or proceed if they confirm).
  • Does docs/ already exist with ccsop scaffolding (.ccsop/manifest.json present)? If yes, this is not first-time — tell the user to use /sop-update instead, and stop unless --force.
  • Provider dependency probe (report, don't auto-install):
    • codex: node present + a resolvable Codex CLI binary (the package fallback already present in the bridge dir, or codex on PATH) + a Codex credential/login. A first init has no project config path yet; on --force in an adopted repo, also accept an explicit [codex] path. The full runtime resolution chain is [codex] path → package fallback → PATH (Step 6 and /sop-update Step 5). The shipped review bridge is a self-contained bundle: do not require @openai/codex-sdk to be installable and do not run npm install during this probe. Step 6 handles the optional package fallback only when no binary resolves.
    • claude: either a claude executable on PATH with an active login, or ANTHROPIC_API_KEY set. The CLI backend uses the login subscription and needs no API key; the API backend uses API credits and requires the key.
    • manual: none.
  • Codex scaffold host gate (only when the selected flow/config actually uses Codex, or when a legacy .codex/skills/project-sop/SKILL.md exists): parse codex --version with standard semver prerelease ordering. Canonical skill materialization requires the host-contract minimum (codex-cli >= 0.145.0-alpha.2 in contract v1). alpha.1, missing, or unparseable versions preserve any legacy bytes and the current pointer, create no canonical duplicate, and report a scoped conflict. If a prior verified migration already left canonical-only state, preserve that state and point the user to /sop-update --rollback-codex-skills; never synthesize legacy bytes. A Claude-only consumer with no legacy skill skips this probe with a note.

Read the full file on GitHub · 336 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. 3d ago First seen · 336 lines · 60 tokens per session scan B fa09e866f76d

Subscribe to this mod's changes

sop-init is a command published in the GitHub repository Gnayj/claude-code-sop (2 stars, last pushed 22d ago), licensed MIT. It adds 60 tokens to every session and 6,634 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.