outlinedriven/odin-codex-plugin/srgn-cli
Claude Code and agent skill by outlinedriven/odin-codex-plugin
- community
Checking that the SKILL.md file is still in the repository.
Build safe, syntax-aware srgn CLI commands for source-code search and transformation. Use for srgn commands, scoped refactors (comments/docstrings/imports/functions), multi-file rewrites with --glob, tree-sitter queries, or CI checks with --fail-any/--fail-none.
Install
npx vskill@latest install outlinedriven/odin-codex-plugin/srgn-cliSKILL.md
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
- Classify the request.
- Search only: no content changes expected.
- Transform in stream: stdin/stdout pipeline usage.
- Transform files: in-place updates over globs.
- Identify scope strategy.
- Regex scope only.
- Language scope only.
- Combined language + regex scope.
- Custom tree-sitter query scope.
- Identify action strategy.
- Replacement (positional replacement argument after
--). - Composable actions (
--upper,--lower,--titlecase,--normalize,--symbols,--german). - Standalone actions (
-d,-s).
- Apply safety controls.
- Prefer
--dry-runfor file operations. - Keep globs quoted.
- Add
--fail-no-fileswhen missing files should fail CI.
- Choose output mode.
- Human-readable (default tty).
- Machine-readable (
--stdout-detection force-pipe).
- Validate behavior.
- Confirm expected match count.
- Confirm no out-of-scope edits.
- Re-run with stricter scope if needed.
Safety Protocol
- Default to non-destructive behavior first.
- Prefer stdin-based or search-mode examples before in-place rewrites.
- For file edits, require preview path.
- Use
--dry-runfirst. - Then run the same command without
--dry-runonly after confirmation.
- Protect shell parsing boundaries.
- Quote regex.
- Quote globs:
--glob '**/*.py'. - Use
--before replacement values.
--globaccepts exactly one pattern (cannot repeat).
- Glob syntax:
*,?,[...],**only. No{a,b}brace expansion. - For multiple files: broader glob +
--dry-run, or per-file viafd(CWD only—no [path] arg):
fd -e <ext> --strip-cwd-prefix -x srgn --glob '{}' --stdin-detection force-unreadable [OPTIONS] [PATTERN]
- Use the narrowest scope that solves the task.
- Prefer language scope + anchored regex over broad regex-only replacement.
- Treat
-dand-sas high-risk operations.
- Always provide explicit scope for them.
Command Construction Template
Use this template when building commands:
Build incrementally:
- Scope first.
- Example:
--python 'imports'
- Regex filter second.
- Example:
'^old_pkg'
- Action third.
- Replacement:
-- 'new_pkg' - Or composable flag:
--upper
- File mode flags fourth (if needed).
--glob '**/*.py' --dry-run
- CI behavior last.
--fail-anyor--fail-none
High-Value Task Recipes
- Rename module imports in Python only:
- Convert
printcalls to logging in Python call-sites only:
- Rename Rust
useprefixes without touching strings/comments:
- Remove C# comments only:
- Search for Rust
unsafelanguage keyword usage only:
- Fail CI if undesirable pattern appears in Python docstrings:
- Force machine-readable output for downstream parsers:
- Preview multi-file changes with deterministic ordering:
For broader, categorized examples, load references/cli-cookbook.md.
Failure and Debug Playbook
- No matches when matches are expected.
- Verify language scope and prepared query name.
- Remove regex temporarily to test scope alone.
- Add
--stdout-detection force-pipeto inspect exact matched columns.
- Too many matches.
- Anchor regex (
^...$) where possible. - Narrow from generic language scope to a specific prepared query.
- Wrong files targeted.
- Confirm
--globpattern and shell quoting. - Add
--fail-no-filesin CI to catch empty globs.
--globused multiple times.
--globis a single-value argument; cannot repeat.- Broader glob +
--dry-run, or per-file (CWD only—no [path] arg):fd -e <ext> --strip-cwd-prefix -x srgn --glob '{}' --stdin-detection force-unreadable [OPTIONS] [PATTERN]
- Unclear behavior across multiple language scopes.
- Default is intersection (left-to-right narrowing).
- Use
-jfor OR behavior.
- Special characters misinterpreted as regex.
- Use
--literal-stringwhen literal matching is intended.
Reference Loading Guide
Load reference files based on request type:
references/cli-cookbook.md
- Load for routine command construction and practical recipes.
references/language-scopes.md
- Load for prepared query selection by language.
references/advanced-patterns.md
- Load for custom queries, capture substitutions, join semantics, and CI failure modes.
references/deepwiki-recursive-notes.md
- Load for complete DeepWiki-derived background and architecture context.
Intent-to-Command Map
Use this map to respond quickly:
- "Rename imports safely"
- Use language import scope + anchored regex +
--glob ... --dry-run.
- "Update function calls only"
- Use language call-site scope (for example
--python 'function-calls') + exact name regex.
- "Only comments/docstrings"
- Use prepared comment/docstring scopes, add
-jonly when OR semantics are required.
- "CI should fail if pattern appears"
- Use scoped search +
--fail-any.
- "CI should fail if required pattern is missing"
- Use scoped search +
--fail-none.
- "I need parseable output"
- Use
--stdout-detection force-pipe.
- "Regex escaping is painful"
- Use
--literal-stringand explicit replacement via--.
Execution Checklist
Before returning a final command, verify:
- Scope is minimal and syntax-aware where possible.
- Replacement argument is after
--(if replacement is used). - Globs are quoted.
--dry-runis present for file edits unless user requested direct apply.- Join semantics are explicit when multiple language scopes are used (
-jvs default intersect). - Failure flags align with user intent (
--fail-any,--fail-none,--fail-no-files). - Output mode is explicit if user needs machine parsing.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/srgn-cli/SKILL.md
Popularity
- Repository stars
- 9
- Repository forks
- 2
- 7-day trend score
- 12
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 24 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/outlinedriven/odin-codex-plugin/srgn-cli)