用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill incremental-writes命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
| Use when this capability is needed.
> Use when this capability is needed.
Review architecture and API design for the vfs-s3 project. Use when the user mentions @architect, asks to review an issue's design, discuss module boundaries, API shape, or architectural decisions for vfs-s3. Also trigger when the user wants to create an ADR (Architecture Decision Record) or evaluate a technical approach for the project. Intended for dispatch from Codex automation or Claude routines; GitHub trigger phrase: @vfs-s3-bot please prepare design doc Use when this capability is needed.
基于 SOC 职业分类
正在显示 SKILL.md
| name | incremental-writes |
| description | > Use when this capability is needed. |
Always decompose file work into multiple focused tool calls rather than one large write. Keep each call to a single logical change.
Apply these rules on every task that involves writing or editing files — not only when a file is already known to be large:
StrReplace; only fall back to Write when the entire file must be replaced and no targeted edit is possibleWhen in doubt about whether a new file will be large, default to skeleton-first.
StrReplace over Write for existing files. Only use Write on
an existing file when the entire file must be replaced and no targeted edit
is possible (e.g. StrReplace cannot find a unique match).Write or StrReplace call.
If the content is longer, break it into sections and apply them sequentially.StrReplace should represent one
coherent change: a function, a config block, an import group, etc.StrReplace with a old_string that uniquely identifies that region.Never reconstruct the entire file from scratch just to change a few lines.
Example decomposition for a 3-function edit:
Call 1: StrReplace — update function A
Call 2: StrReplace — update function B
Call 3: StrReplace — add import at top
Use the skeleton-first pattern:
StrReplace to replace each placeholder with
its full implementation, one section at a time.StrReplace calls.Call 1: Write — skeleton (imports, class shell, empty methods)
Call 2: StrReplace — implement method A
Call 3: StrReplace — implement method B
Call 4: StrReplace — implement method C
Call 5: StrReplace — fill in config block
Choose a split boundary that matches the file's natural structure:
| File type | Split by |
|---|---|
| Class / module | One method or property group per call |
| Config file | One top-level key block per call |
| React component | Component shell → JSX → hooks → helpers |
| Test file | One describe block per call |
| Long script | Imports → constants → functions → main block |
| Markdown / docs | One major section (## heading) per call |
When sections have dependencies (e.g., a helper used by two methods), write the dependency first.
User says: "Add input validation to the createUser function and update
its error messages."
Actions:
createUser and its current error strings.StrReplace — replace the function body with the validated version.StrReplace — update error message constants if they live elsewhere.Result: Two focused edits; the rest of the file is untouched.
User says: "Create a PaymentService class with methods for charging,
refunding, and webhooks."
Actions:
Write — skeleton with class declaration, constructor stub, and three
empty method stubs (~40 lines).StrReplace — implement charge() method (~60 lines).StrReplace — implement refund() method (~50 lines).StrReplace — implement handleWebhook() method (~70 lines).StrReplace — add private helper methods and final imports (~40 lines).Result: File is built in five coherent steps; each step is reviewable and recoverable if something goes wrong.
User says: "Rewrite the parseConfig function — it needs to handle nested
keys now."
Actions:
parseConfig function body.StrReplace — replace the entire function with the new implementation.
If the new implementation is > 150 lines, split it: replace with a
shorter version first, then StrReplace the placeholder sections.Result: Only parseConfig changes; nothing else in the file is at risk.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.