Stats
Actions
Tags
From solon-cli
Semantic code replacement using ast-grep patterns with safe preview mode
How this skill is triggered — by the user, by Claude, or both
Slash command
/solon-cli:ast-replaceThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use `sl ast replace` for structural code transformations.
Use sl ast replace for structural code transformations.
# Preview changes (default — does NOT apply)
sl ast replace "<pattern>" "<replacement>" --lang <lang>
# Apply changes to all matches
sl ast replace "<pattern>" "<replacement>" --lang <lang> --update-all
Captured variables ($NAME, $$$ARGS) are reused in the replacement.
Rename a function call:
sl ast replace "console.log($$$ARGS)" "logger.info($$$ARGS)" --lang typescript
Add error handling:
sl ast replace "foo.unwrap()" "foo.expect(\"foo should be set\")" --lang rust
Modernize syntax:
sl ast replace "var $NAME = $VAL" "const $NAME = $VAL" --lang javascript --update-all
--update-all) to verify before applyingsl edit for surgical edits.gitignore by defaultsg binary (auto-downloaded on first use)--path src/ to scope replacements to a directorynpx claudepluginhub huynhhoangphuc/solon --plugin solon-cliGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.