Help us improve
Share bugs, ideas, or general feedback.
From odin
Builds srgn CLI commands for syntax-aware source-code search, transformation, scoped refactors, and CI checks. Use for multi-file rewrites, tree-sitter queries, or lint-like validations.
npx claudepluginhub outlinedriven/odin-claude-plugin --plugin odinHow this skill is triggered — by the user, by Claude, or both
Slash command
/odin:srgn-cliThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use this skill to convert user intent into precise `srgn` commands with safe defaults.
Performs AST-based code search, analysis, and refactoring using ast-grep (sg). Useful for structural search and replace, custom linting, and safe code transformations.
Searches codebases using ripgrep (rg) with regex patterns, file type/extension filtering, multi-line support, and .gitignore respect. Use for text patterns, code snippets, or multi-file analysis.
Provides ast-grep CLI syntax, metavariable patterns, and examples for structural code search and rewriting in JavaScript/TypeScript, Python, Go, Rust.
Share bugs, ideas, or general feedback.
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.
--).--upper, --lower, --titlecase, --normalize, --symbols, --german).-d, -s).--dry-run for file operations.--fail-no-files when missing files should fail CI.--stdout-detection force-pipe).--dry-run first.--dry-run only after confirmation.--glob '**/*.py'.-- before replacement values.--glob accepts exactly one pattern (cannot repeat).
*, ?, [...], ** only. No {a,b} brace expansion.--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]-d and -s as high-risk operations.
Use this template when building commands:
srgn [LANGUAGE_SCOPE_FLAGS...] [GLOBAL_FLAGS...] [ACTION_FLAGS...] [SCOPE_REGEX] -- [REPLACEMENT]
Build incrementally:
--python 'imports''^old_pkg'-- 'new_pkg'--upper--glob '**/*.py' --dry-run--fail-any or --fail-nonesrgn --python 'imports' '^old_pkg' --glob '**/*.py' --dry-run -- 'new_pkg'
print calls to logging in Python call-sites only:srgn --python 'function-calls' '^print$' --glob '**/*.py' --dry-run -- 'logging.info'
use prefixes without touching strings/comments:srgn --rust 'uses' '^good_company' --glob '**/*.rs' --dry-run -- 'better_company'
srgn --csharp 'comments' -d '.*'
unsafe language keyword usage only:srgn --rust 'unsafe'
srgn --python 'doc-strings' --fail-any 'param.+type'
srgn --python 'strings' --stdout-detection force-pipe '(foo|bar)'
srgn --typescript 'imports' '^legacy-lib' --glob 'src/**/*.ts' --sorted --dry-run -- 'modern-lib'
For broader, categorized examples, load references/cli-cookbook.md.
--stdout-detection force-pipe to inspect exact matched columns.^...$) where possible.--glob pattern and shell quoting.--fail-no-files in CI to catch empty globs.--glob used multiple times.
--glob is a single-value argument; cannot repeat.--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]-j for OR behavior.--literal-string when literal matching is intended.Load reference files based on request type:
references/cli-cookbook.md
references/language-scopes.md
references/advanced-patterns.md
references/deepwiki-recursive-notes.md
Use this map to respond quickly:
--glob ... --dry-run.--python 'function-calls') + exact name regex.-j only when OR semantics are required.--fail-any.--fail-none.--stdout-detection force-pipe.--literal-string and explicit replacement via --.Before returning a final command, verify:
-- (if replacement is used).--dry-run is present for file edits unless user requested direct apply.-j vs default intersect).--fail-any, --fail-none, --fail-no-files).