One-click install
npx skills add https://github.com/zeenie-ai/MachinaOS --skill file-modify-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: file-modify-skill
Source: https://github.com/zeenie-ai/MachinaOS/tree/main/server/skills/coding_agent/file-modify-skill
Command: npx skills add https://github.com/zeenie-ai/MachinaOS --skill file-modify-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill removes the need to manually open, copy, and edit files by letting an AI create new files or make precise surgical changes through controlled string replacement.

Core Features & Use Cases

  • Write new files: Create or wholesale-replace a file’s contents by providing the full content.
  • Edit existing files: Perform safe, targeted find-and-replace using old_string and new_string (optionally replacing all matches).
  • Deterministic responses: Returns a structured operation result suitable for a filesystem backend workflow.

Use case: Update a configuration or source file by changing a single line or small block, without rewriting the entire file or risking unrelated modifications.

Quick Start

Use the file-modify-skill to edit the file /path/to/file.py by replacing the unique text old_string with new_string.

Frequently Asked Questions about file-modify-skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I perform precise string replacement in a configuration file?

You can perform precise string replacement by supplying the target file path, exact old string, and new string to execute safe, targeted edits without rewriting the entire file.

Can I replace all occurrences of a specific text block in a source file at once?

Yes, you can replace all occurrences of a specific text block in a source file by enabling the replace_all option alongside your old_string and new_string parameters for deterministic codebase updates.

What is the best way to automate surgical edits for codebase maintenance?

Automating surgical edits for codebase maintenance is best handled through controlled write or edit operations that apply exact string replacements to update files with minimal manual intervention.

Does this approach support creating new files or only updating existing ones?

This approach supports both creating new files and updating existing ones, allowing you to write full content for new files or perform targeted string replacements on existing filesystems.

Why use exact string replacement instead of rewriting a whole file for updates?

Exact string replacement is used to make safe, targeted modifications to a single line or small block, avoiding the risk of unrelated changes that comes with rewriting the entire file.