Shell Tool · engineering · Sentinel

Refactor Across Files

Multi-file string operations with quote and escape safety — uses bun -e, not sed.

Updated today
View as MarkdownsentinelsonnetstandardMax 10 turns

Overview

Follows the string-editing/SKILL.md guidance: when editing literal strings that contain quotes, backslashes, or special characters across many files, sed corrupts the output. This capability uses bun -e (or shell_write per file) so the strings land verbatim. Best for renames, import-path migrations, API-key swaps, mass copy edits.

When to use this

  • user wants to rename a symbol across 10+ files
  • user says 'replace every X with Y in /work' / 'change all imports from a to b'
  • user is doing a mass edit involving quotes or template strings

When NOT to use this

  • user wants ONE file edited surgically → use shell_write or minimal-patch
  • user wants to fix a single bug → use minimal-patch instead

Example prompts

rename foo to bar across the whole codebase
swap every @company/old-pkg import for @company/new-pkg
change all API endpoints from /v1/ to /v2/

Inputs and output

Inputs

FieldDescription
targetthe symbol/string to find
replacementwhat to swap it with
scopeglob pattern (default **/*)

Output

Diff summary per file + total file count.

Runtime profile

What the engine commits when this skill runs.

PropertyValueMeaning
Model tiersonnetThe balanced default model class. Trades quality against cost for the vast majority of skill runs.
Cost classstandardThe balanced default model. Right for most skills.
Turn budget10Hard cap on tool-calling iterations before the engine forces a final answer.
ExecutionsynchronousRuns inside the live turn; result lands in the same response.

Under the hood

Tools the engine exposes to this skill and integrations it needs.

ResourceKind
shell_exectool
shell_writetool
shell_readtool

Tags: engineering, refactor

Execution template

Shell tools dispatch via a command template. The model substitutes user inputs into the placeholders before firing the underlying tool.

shell_execbash
1follow string-editing/SKILL.md; bun -e or per-file shell_write to swap {{target}} -> {{replacement}} across {{scope}}

Invoking this from an agent

Three paths reach this skill. From the chat UI, a user can type the persona slash command followed by a natural request and the discovery step resolves to this skill automatically. From the MCP server, fetch the skill detail with get_skill({id: "refactor-across-files"}) and then invoke it through the agent runtime once the authenticated tier ships. From your own code, hit /docs/skills/refactor-across-files/llm.txt for the token-efficient markdown body and feed it to your model directly.

Note
Every skill page has a canonical permalink and a markdown alternate that LLM crawlers consume via Accept: text/markdown. The full machine-readable catalog lives at /.well-known/agent-skills/index.json.