srgn-cli

Translate user intents into safe srgn CLI commands for code search and transformation.

Updated Feb 7, 2026
One-click install
npx skills add https://github.com/metaphorics/my-skills --skill srgn-cli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: srgn-cli
Source: https://github.com/metaphorics/my-skills/tree/main/skills/srgn-cli
Command: npx skills add https://github.com/metaphorics/my-skills --skill srgn-cli

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers translate high‑level user intents into precise, safe srgn CLI commands for code search and transformation, with language scoping, multi-file rewrites, and CI‑style checks.

Core Features & Use Cases

  • Safe, language-scoped command construction: Converts requests into srgn commands with language scopes (Python, Rust, TypeScript, etc.), regex filters, and safe defaults.
  • Multi-file workflows and CI guardrails: Supports --glob, --dry-run, and --fail-any/--fail-none to validate changes before applying them.
  • Reference-driven guidance: Includes command-construction templates, safety protocols, and access to reference materials like CLI cookbooks and language scopes.

Quick Start

Request a safe srgn command that scopes Python imports across the codebase and shows a dry-run preview.

Frequently Asked Questions about srgn-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate safe srgn CLI commands for multi-file code refactoring?

To generate safe srgn CLI commands for multi-file refactoring, this Skill translates high-level intents into precise queries using --glob for file matching and --dry-run to preview changes before applying them.

Can I scope code search and transformations to specific programming languages with srgn?

Yes, you can scope code search and transformations to specific languages like Python, Rust, or TypeScript by applying language-scoped queries and tree-sitter filters to ensure deterministic and auditable changes.

How do I validate code changes and enforce safety before applying a scoped migration?

To validate code changes before applying a scoped migration, you can use srgn safety protocols like --dry-run for previews and CI-style checks with --fail-any or --fail-none to enforce deterministic transformations.

What is the best way to automate CI guardrails for codebase rewrites using tree-sitter?

The best way to automate CI guardrails for codebase rewrites using tree-sitter is to construct srgn commands with --fail-any and --fail-none flags, ensuring transformations halt or pass based on scoped query matches.

Does srgn work with quoted globs and regex filters for complex code search patterns?

Yes, srgn works with quoted globs and regex filters to safely construct complex code search patterns, ensuring multi-file workflows target precise file matches without unintended modifications.

Why should I use language-scoped queries instead of plain text replacement for code migrations?

You should use language-scoped queries instead of plain text replacement for code migrations because tree-sitter integration provides structural understanding, ensuring transformations remain safe, deterministic, and auditable across files.