morph-apply

Apply targeted file edits using code markers via Morph Apply API.

3.9k|296|Updated Dec 23, 2025
One-click install
npx skills add https://github.com/parcadei/Continuous-Claude --skill morph-apply
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: morph-apply
Source: https://github.com/parcadei/Continuous-Claude/tree/main/.claude/skills/morph-apply
Command: npx skills add https://github.com/parcadei/Continuous-Claude --skill morph-apply

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires morph, and includes scripts (resource) components.

What problem does it solve?

Fast, AI-powered file editing without reading the entire file first, ideal for large files or batch edits.

Core Features & Use Cases

  • Single edits without full read: Place edits using code markers without loading the whole file.
  • Batch edits: Apply multiple changes in one operation.
  • Real-world example: Add logging to a large service file without scanning it first.

Quick Start

uv run python -m runtime.harness scripts/morph_apply.py --file "src/auth.py" --instruction "Add error handling" --code_edit "# ... existing code ... try: ... except Exception as e: ..."

Frequently Asked Questions about morph-apply

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

FAQPage Schema
How do I edit large files without reading the entire file first?

File edits can skip full-file reads by using code markers to target specific insertion points. Morph Apply API performs rapid edits on large files by accepting --file, --instruction, and --code_edit parameters, applying changes only where markers indicate, ideal for batch operations or adding features to sizable codebases.

Can I apply multiple code changes in a single operation?

Batch edits are supported through the Morph Apply API, which accepts multiple --code_edit instructions in one call. This reduces overhead when applying several related changes across files, such as adding logging or error handling to multiple locations.

What setup do I need before using Morph Apply?

Morph Apply requires a Morph server configured in MCP with MORPH_API_KEY set in your environment. The dependency on the Morph library means you need that installed and accessible before running Morph Apply operations.

How does Morph Apply differ from reading and editing entire files?

Traditional file editing loads complete content into memory; Morph Apply uses AI-powered code markers to target exact locations, reducing latency and memory usage. This approach suits large codebases where scanning full files would be expensive or unnecessary.

When should I use code markers instead of line numbers?

Code markers preserve intent across file changes by referencing context rather than fixed line positions. Use markers when line numbers may shift due to concurrent edits or when the semantic meaning of the change matters more than its absolute location.

Does Morph Apply work with any file type?

Morph Apply operates on text files and relies on code markers within your --code_edit parameter to identify insertion points. Success depends on providing valid markers that match existing code context in the target file.