miller-editing
Use before changing existing indexed files with Miller edit, especially symbol rewrites, text replacements, renames, or refactors.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use before changing existing indexed files with Miller edit, especially symbol rewrites, text replacements, renames, or refactors.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Use when an agent needs extractor-recognized code-shape facts such as routes, htmx attributes, Alpine directives, SQL DDL/DML, or data-document structure.
Use when starting a Miller task, choosing a Miller tool, or choosing a Miller search mode.
Use when tracing Miller bridge paths in supported providers: dotnet-web URL literals and fetch/axios client requests to ASP.NET signals, client requests to Next.js route handlers or Nuxt server routes, Next.js/Nuxt route references to file routes, Vue/React references to route definitions, or backend-http client requests to Express/FastAPI/Flask/Django/Spring/Go/gin/echo/Rails/NestJS/Laravel/Phoenix/axum/actix/Symfony/Ktor route facts.
Use when orienting on an unfamiliar code area with Miller, explaining a module, finding entry points, or gathering context before a change.
Use when assessing blast radius with Miller, choosing tests for a change, answering who uses a symbol, or planning a refactor.
Use when resuming Miller-backed work from a handoff packet or validating a packet before continuing in another harness, model, or session.
| name | miller-editing |
| description | Use before changing existing indexed files with Miller edit, especially symbol rewrites, text replacements, renames, or refactors. |
| allowed-tools | mcp__miller__edit, mcp__miller__inspect, mcp__miller__impact, mcp__miller__search, mcp__miller__workspace |
Use Miller's index-aware edit tool for existing indexed files. It previews a diff by default and blocks stale
indexed spans. Only replace_text can explicitly allow a stale index because it proves its match against current
disk text.
Creating a brand-new file is outside this skill; use the normal file creation path.
search(query="<symbol or file>")
inspect(target="<symbol-or-file>")
For symbols, start with inspect(target="<symbol>", depth="overview") to choose the edit target and understand
nearby refs/calls without dumping the full body. Use inspect(target="<symbol>", depth="full") before rewriting a
body or auditing complete relation lists.
For broad multi-hunk edits or when you need to handcraft a large replacement, use the normal patch/edit path. For
small file-level text edits where you know the old value and a nearby selector, use replace_text directly and let
Miller prove the match in preview:
edit(operation="replace_text", target="<file>", old_text="<known-old>", new_text="<new>", match_mode="auto", query="<nearby text>")
impact(target="<symbol-or-file>")
edit(operation="replace_text", target="<file>", old_text="<old>", new_text="<new>")
edit(operation="replace_text", target="<file>", old_text="<old>", new_text="<new>", match_mode="auto", line=42)
edit(operation="replace_text", target="<file>", old_text="<old>", new_text="<new>", match_mode="auto", anchor="<nearby text>")
edit(operation="replace_symbol_body", target="<symbol>", new_text="<body>")
edit(operation="rename_symbol", target="<symbol>", new_text="<new-name>")
The preview should show match mode, match source, line range, occurrence, disk verification, and a concise diff.
If it is the intended edit, re-run the same call with apply=true.
edit(operation="...", target="...", new_text="...", apply=true)
workspace(operation="refresh")
Use allow_stale=true only for replace_text after independently checking current disk state. Symbol-body,
signature, insert, doc, and rename operations require fresh indexed spans even when the user accepts the risk.
replace_text still requires a known old_text, but match_mode="auto" can accept exact, normalized, or bounded
fuzzy matches after verifying the span against current disk text. If preview is ambiguous or text is not found:
line=<line> when you know the target line.anchor="<nearby text>" when the old text appears in multiple places.query="<nearby text>" to use indexed content as a candidate finder.match_mode="exact" when whitespace-tolerant or fuzzy matching would be unsafe.occurrence="all" only when every whole-file match should change; do not combine it with line, anchor,
or query.replace_symbol_body or replace_symbol_signature for code symbols.rename_symbol for symbol renames.replace_text for docs, config, and arbitrary text.impact.