srgn-cli

srgn-cli is a skill for Claude Code, Codex from OutlineDriven/odin-gemini-cli-extension. It costs 72 tokens per session (1,776 once invoked), scanned A, a copy of srgn-cli, Apache-2.0.

A guide for using srgn, a command-line tool that searches and changes source code according to its programming-language structure. It covers searches, checks, and controlled edits across files.

In plain words
What is it for?
Use it to write srgn commands for syntax-aware searches, stream or in-place transformations, multi-file refactors, custom tree-sitter queries, and CI checks.
Why use it?
It reduces the risk of broad text replacements changing comments, imports, functions, or other code outside the intended scope. It also helps check what matched before applying edits.

Skill for Claude CodeCodex

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 skills/outlinedriven/odin-gemini-cli-extension/srgn-cli
Any agent
npx skills add OutlineDriven/odin-gemini-cli-extension --skill srgn-cli
Clone the repo
git clone --depth 1 https://github.com/OutlineDriven/odin-gemini-cli-extension

Made for: Claude Code, Codex.

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 srgn-cli

README.md
[![agentmods](https://agentmods.dev/badge/skills/outlinedriven/odin-gemini-cli-extension/srgn-cli.svg)](https://agentmods.dev/skills/outlinedriven/odin-gemini-cli-extension/srgn-cli)
Your own site
<a href="https://agentmods.dev/skills/outlinedriven/odin-gemini-cli-extension/srgn-cli"><img src="https://agentmods.dev/badge/skills/outlinedriven/odin-gemini-cli-extension/srgn-cli.svg" alt="Measured on agentmods" height="20"></a>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,776 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 94% copy Near-identical to another mod 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.00072 $0.01776
Opus 5 $0.00036 $0.00888
Sonnet 5 $0.00014 $0.00355
Haiku 4.5 $0.00007 $0.00178

Measured 5d ago against content hash 1147c5bdca9a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

srgn-cli 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 5d 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.

Origin

This is a copy

94% identical to srgn-cli — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/skills/srgn-cli/SKILL.md · 189 lines

How it starts

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

srgn CLI

Overview

Use this skill to convert user intent into precise srgn commands with safe defaults. Focus on CLI workflows for search, transformation, scoped migrations, and lint-like checks.

Workflow Decision Tree

  1. Classify the request.
    • Search only: no content changes expected.
    • Transform in stream: stdin/stdout pipeline usage.
    • Transform files: in-place updates over globs.
  2. Identify scope strategy.
    • Regex scope only.
    • Language scope only.
    • Combined language + regex scope.
    • Custom tree-sitter query scope.
  3. Identify action strategy.
    • Replacement (positional replacement argument after --).
    • Composable actions (--upper, --lower, --titlecase, --normalize, --symbols, --german).
    • Standalone actions (-d, -s).
  4. Apply safety controls.
    • Prefer --dry-run for file operations.
    • Keep globs quoted.
    • Add --fail-no-files when missing files should fail CI.
  5. Choose output mode.
    • Human-readable (default tty).
    • Machine-readable (--stdout-detection force-pipe).
  6. Validate behavior.
    • Confirm expected match count.
    • Confirm no out-of-scope edits.
    • Re-run with stricter scope if needed.

Safety Protocol

  1. Default to non-destructive behavior first.
    • Prefer stdin-based or search-mode examples before in-place rewrites.
  2. For file edits, require preview path.
    • Use --dry-run first.
    • Then run the same command without --dry-run only after confirmation.
  3. Protect shell parsing boundaries.
    • Quote regex.
    • Quote globs: --glob '**/*.py'.
    • Use -- before replacement values.
  4. --glob accepts exactly one pattern (cannot repeat).
    • Glob syntax: *, ?, [...], ** only. No {a,b} brace expansion.
    • For multiple files: broader glob + --dry-run, or per-file via fd (CWD only—no [path] arg): fd -e <ext> --strip-cwd-prefix -x srgn --glob '{}' --stdin-detection force-unreadable [OPTIONS] [PATTERN]
  5. Use the narrowest scope that solves the task.
    • Prefer language scope + anchored regex over broad regex-only replacement.
  6. Treat -d and -s as high-risk operations.
    • Always provide explicit scope for them.

Read the full file on GitHub · 189 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 5d ago First seen · 189 lines · 72 tokens per session scan A 1147c5bdca9a

Subscribe to this mod's changes

srgn-cli is a skill published in the GitHub repository OutlineDriven/odin-gemini-cli-extension (5 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 72 tokens to every session and 1,776 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. It is 94% identical to srgn-cli, differing in 2 lines, and is treated as a copy.

Related

Other skills, from other repositories

design

Set visual and interaction direction for any UI surface (web, React, TUI, CLI, desktop, Qt, design-system tokens) before any UI code. Direction-first: generates 3-4 distinct directions via verbalized sampling, picks one via per-axis single-select, then derives palette, typography, spacing, motion budget. Loads when…

OutlineDriven/odin-codex-plugin · 151 tokens

askme

Verbalized Sampling (VS) protocol for intent exploration before planning, mode-aware. Default exhaustive runs full VS; collaborative runs tip-sharing dialogue; adversarial walks the design tree one fork at a time. Auto-detects from phrasing ("help me refine" → collaborative, "poke holes" → adversarial); override via…

OutlineDriven/odin-codex-plugin · 106 tokens

grill-ai-mastery

Hybrid interview that probes AI-engineering mastery by tip-vocabulary depth — entity referencing, loop closure, observability, harness improvement — not by token usage or LOC. Start collaborative (two-way tip exchange), escalate to adversarial probing when depth is lacking. Trigger when the user says "interview me on…

OutlineDriven/odin-codex-plugin · 104 tokens

grill-me

Adversarial relentless interview against any plan or design until shared understanding is reached. Walk the decision tree, resolve dependencies one answer at a time, recommend a default per question. Trigger when the user says "grill me", "stress-test this", "interview me about this design", or otherwise asks for…

OutlineDriven/odin-codex-plugin · 83 tokens

git-branchless

Enforce idiomatic git-branchless during planning and executing tasks — detached-HEAD-first work, in-memory rebase via git move, event-log recovery via git undo, deferred branch creation, speculative-merge git sync for base updates. Use when planning or executing multi-commit work, history rewrites, stack edits…

OutlineDriven/odin-codex-plugin · 131 tokens

proof-driven

Proof-driven development. Use when implementing with formal verification using property-based testing, theorem proving, or proof tactics; zero unproven property policy enforced.

OutlineDriven/odin-codex-plugin · 33 tokens