This SkillRun capsule applies one bounded text replacement inside an allowed
project directory. It is an example of converting file-write rules into a
manifest-bound skill contract, not a claim of OS sandboxing.
SOP
Modify only project-relative files under src/, docs/ or tests/.
Never accept absolute paths, drive-prefixed paths, hidden path segments or
parent-directory traversal.
Never modify secret-bearing files, lockfiles or package manager manifests.
Require an exact old_text match before writing new_text.
Reject ambiguous replacements where old_text appears more than once.
Record a markdown patch summary artifact for audit.
Required Context
file_path: project-relative path under src/, docs/ or tests/.
old_text: exact text to replace.
new_text: replacement text.
Recovery Guidance
If this capsule returns PolicyViolation, choose an allowed path or narrower
replacement. If it returns ValidationError, provide all required fields.
Prohibited Behavior
Do not overwrite entire files without an exact old-text match.
Do not modify .env, secrets, lockfiles, package manifests or hidden folders.
Do not treat this capsule as an OS sandbox.
1---2name: bounded-file-patcher3description: Bounded File Patcher4---5# Bounded File Patcher67## Purpose89This SkillRun capsule applies one bounded text replacement inside an allowed10project directory. It is an example of converting file-write rules into a11manifest-bound skill contract, not a claim of OS sandboxing.1213## SOP14151. Modify only project-relative files under `src/`, `docs/` or `tests/`.162. Never accept absolute paths, drive-prefixed paths, hidden path segments or17 parent-directory traversal.183. Never modify secret-bearing files, lockfiles or package manager manifests.194. Require an exact `old_text` match before writing `new_text`.205. Reject ambiguous replacements where `old_text` appears more than once.216. Record a markdown patch summary artifact for audit.2223## Required Context2425- `file_path`: project-relative path under `src/`, `docs/` or `tests/`.26- `old_text`: exact text to replace.27- `new_text`: replacement text.2829## Recovery Guidance3031If this capsule returns `PolicyViolation`, choose an allowed path or narrower32replacement. If it returns `ValidationError`, provide all required fields.3334## Prohibited Behavior3536- Do not overwrite entire files without an exact old-text match.37- Do not modify `.env`, secrets, lockfiles, package manifests or hidden folders.38- Do not treat this capsule as an OS sandbox.
Run npx skillmds@latest add iiwish/bounded-file-patcher in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Bounded File Patcher It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
iiwish (@iiwish) published this skill. Their other Agent Skills are listed on their SkillMD profile.