One-click install
npx skills add https://github.com/PrimeIntellect-ai/research-environments --skill edit-primeintellect-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: edit
Source: https://github.com/PrimeIntellect-ai/research-environments/tree/main/environments/rlm_swe/rlm_swe/skills/edit
Command: npx skills add https://github.com/PrimeIntellect-ai/research-environments --skill edit-primeintellect-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It eliminates risky, manual find-and-replace edits by ensuring the target text occurs exactly once before changing it.

Core Features & Use Cases

  • Single-occurrence replacement: Prevents accidental edits when the old string is missing or appears multiple times.
  • File-based updates: Edits a specified file path and persists the change back to disk.
  • Practical use case: Update one specific constant, placeholder, or identifier in a config or source file without modifying unintended duplicates.

Quick Start

Ask the AI to run edit on the file path 'app/config.yml', replacing old_str 'ENVIRONMENT=prod' with new_str 'ENVIRONMENT=staging' while failing if the old string is not exactly one match.

Frequently Asked Questions about edit

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

FAQPage Schema
How do I safely replace a unique string in a configuration file?

To safely replace a unique string in a configuration file, you provide a target file path, the exact old string, and the new string. The tool validates that the target string appears exactly once before writing the modified content back to disk.

What happens if the target string appears multiple times during a file edit?

If the target string appears multiple times, the edit operation fails. The safety validation mechanism requires the target old string to appear exactly once to prevent accidental edits to unintended duplicates across source files.

Why does my string replacement fail when updating a constant in my codebase?

Your string replacement fails because the safety validation requires the exact old string to appear exactly once. If the target string is missing or duplicated in the source file, the operation will not write the modified content to disk.

Can I update a single placeholder in a source file without affecting duplicates?

Yes, you can update a single placeholder by providing the exact old string and new string. The uniqueness validation ensures the placeholder occurs exactly once, preventing modifications to any duplicate occurrences in the file.

What inputs do I need to patch one specific line across source files?

To patch one specific line across source files, you need a file path plus the old_str and new_str inputs. The tool performs uniqueness validation on the old_str before applying the replacement and persisting the change back to disk.