Skill Detail

Search and rewrite code with structural GritQL patterns before broad migrations

Use GritQL when an agent needs reviewable structural search and rewrite passes across a large codebase before a migration, policy cleanup, or API change, instead of relying on regex or hand edits.

Code Quality & ReviewMulti-Framework
Code Quality & Review Multi-Framework Security Reviewed
⭐ 4.5k GitHub stars
INSTALL WITH ANY AGENT
npx skills add agentskillexchange/skills --skill search-and-rewrite-code-with-structural-gritql-patterns-before-broad-migrations Copy
Works best when you want a reusable capability, not another fragile one-off prompt.
At a glance
Tools required
Grit CLI, a local repository to search or rewrite, and a review loop for inspecting the diffs produced by structural patterns.
Install & setup
Install the Grit CLI using the method documented by the project, write or reuse the GritQL patterns that describe the search or rewrite you want, run the apply or check workflow against the target repository, and review the resulting changes before merging.
Author
biomejs
Publisher
Community
Last updated
Apr 19, 2026
Quick brief

Tool: GritQL. This skill is for agents that need a structural query-and-rewrite workflow: express the old and new code patterns declaratively, run them over a repository, and inspect the resulting diff before shipping a large migration.

How it works

What this skill actually does

When to use it: invoke this when the change is too broad for manual edits but too syntax-sensitive for grep or naive find-and-replace. It fits dependency migrations, API swaps, lint remediation, and repeated code cleanup where the operator wants a named pattern, reproducible application, and reviewable output.

Scope boundary: this is not a generic code-search language listing and not just another broad CLI card. Its boundary is the structural migration workflow itself: pattern definition, batch application, and reviewable rewrites across real source code. If the task does not require structural rewrites, a simpler tool is enough.