srgn-cli

srgn-cli is a skill for 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 Codex

Written for Codex: agents/openai.yaml present.

Good fit 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.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/outlinedriven/odin-gemini-cli-extension/srgn-cli
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.

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: 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/github.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/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 srgn-cli

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. A grade says what 26 rules found in the file — not that it is safe.
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.5 $0.00029 $0.00710
Sonnet 5.5 $0.00014 $0.00355
Haiku 4.5 $0.00007 $0.00178

Measured 3mo ago against content hash 1147c5bdca9a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 3mo 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. 3mo 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 (4 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 72 tokens to every session and 1,776 once invoked, about $0.0003 per session on Opus 5.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

srgn-cli compared with skills from other repositories

srgn-cli next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
srgn-cliOutlineDriven/odin-gemini-cli-extensionSkill45mo agoApache-2.0A72Codex
designOutlineDriven/odin-codex-pluginSkill145mo agoApache-2.0A151Claude Code, Codex
askmeOutlineDriven/odin-codex-pluginSkill145mo agoApache-2.0A106Claude Code, Codex
grill-ai-masteryOutlineDriven/odin-codex-pluginSkill145mo agoApache-2.0A104Claude Code
grill-meOutlineDriven/odin-codex-pluginSkill145mo agoApache-2.0A83Claude Code
git-branchlessOutlineDriven/odin-codex-pluginSkill145mo agoApache-2.0A131Claude Code, Codex
proof-drivenOutlineDriven/odin-codex-pluginSkill145mo agoApache-2.0A33Claude Code, Codex