frg-replace

frg-replace is a skill for Claude Code, Codex from qhkm/fastripgrep. It costs 8 tokens per session (245 once invoked), scanned A, original, MIT.

A command-line tool for finding and replacing text across many files, with a preview of the proposed changes. It works with plain text, regular expressions, fixed strings, and multiline patterns.

In plain words
What is it for?
Use it to rename code, update repeated text, apply pattern-based edits, or replace content in selected file types.
Why use it?
It lets you review a codebase-wide replacement before applying it, reducing accidental edits.

Skill for Claude CodeCodex

Part of the frg plugin — 2 skills shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/qhkm/fastripgrep/frg-replace
Any agent
npx skills add qhkm/fastripgrep --skill frg-replace
Clone the repo
git clone --depth 1 https://github.com/qhkm/fastripgrep

Made for: Claude Code, Codex.

Or install frg, the plugin that ships this one along with the rest of its 2 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for frg-replace

README.md
[![agentmods](https://agentmods.dev/badge/skills/qhkm/fastripgrep/frg-replace.svg)](https://agentmods.dev/skills/qhkm/fastripgrep/frg-replace)
Your own site
<a href="https://agentmods.dev/skills/qhkm/fastripgrep/frg-replace"><img src="https://agentmods.dev/badge/skills/qhkm/fastripgrep/frg-replace.svg" alt="Measured on agentmods" height="20"></a>
Per session 8 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 245 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00008 $0.00245
Opus 5 $0.00004 $0.00122
Sonnet 5 $0.00002 $0.00049
Haiku 4.5 $0.00001 $0.00024

Measured 4d ago against content hash 4c1b47438931, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

frg-replace scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/frg-replace/SKILL.md · 25 lines

What it actually says

Use frg replace for codebase-wide search and replace. Shows a diff preview by default, applies changes with --write. Works on unindexed trees — no frg index required.

Commands

frg replace "old" "new" .             # preview (dry-run)
frg replace "old" "new" . --write     # apply changes
frg replace -i "old" "new" .          # case-insensitive
frg replace -F "old.val" "new.val" .  # fixed string
frg replace "fn (\w+)" "fn ${1}_v2" . # capture groups
frg replace --type ts "old" "new" .   # filter by file type
frg replace '(?s)start\n.*?\nend' 'replaced' . # multiline

Important

  • Always preview first (default) before using --write
  • Supports regex capture groups ($1, $2)
  • Supports multiline patterns with (?s) flag
  • Works without an index — walks files directly
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 25 lines · 8 tokens per session scan A 4c1b47438931

Subscribe to this mod's changes

frg-replace is a skill published in the GitHub repository qhkm/fastripgrep (15 stars, last pushed 5mo ago), licensed MIT. It adds 8 tokens to every session and 245 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

ripgrep

Use when the user needs text or regex content search with ripgrep: composing rg commands, choosing flags, glob/type filtering, multiline or PCRE2 searches, pipeline output, grep-to-rg migration, or diagnosing why rg missed a file (gitignore, hidden, binary defaults). Not for syntax-aware structural queries (ast-grep)…

bahayonghang/my-ai-cli-toolkit · 81 tokens

regex-mastery

Use this skill when writing regular expressions, debugging pattern matching,optimizing regex performance, or implementing text validation. Triggers on regex, regular expressions, pattern matching, lookahead, lookbehind, named groups, capture groups, backreferences, and any task requiring text pattern matching.

alibaba/anolisa · 60 tokens

a0-contribute-plugin

Guide for publishing an Agent Zero plugin to the community Plugin Index (a0-plugins repo). Covers GitHub repo setup, index.yaml creation, CI validation rules, and PR submission. Use when the user wants to share, publish, submit, or contribute a plugin to the Plugin Hub so other Agent Zero users can find and install it.

agent0ai/agent-zero · 74 tokens

ygrep

IMPORTANT: Try ygrep FIRST for all code and file searches before using Grep, Glob, or Task explore. ygrep uses a pre-built full-text index and returns results in milliseconds. Fall back to built-in tools only if ygrep returns no results.

yetidevworks/ygrep · 55 tokens

renux

Drive the renux CLI to bulk-rename files. Covers regex patterns, placeholder tags ({counter}, {now}, {size}, EXIF/video metadata), text filters, and file exclusion. Trigger on any bulk/batch rename or filename cleanup request, even without "renux" named, e.g. "add today's date to these screenshots," "strip the IMG…

andrianllmm/renux · 94 tokens

add-tag

Scaffold a new renux tag placeholder or filter (e.g. "{counter}" or "{name|upper}"), keeping the registry, README, and tests in sync. Use when asked to add a new placeholder or filter to renux.

andrianllmm/renux · 52 tokens