Skip to content
Back to skills

1878 Patch F8ca9443

ASecurity

When modifying existing files, use the `patch` tool to make incremental changes.

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 11, 2026
code-quality

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 1878-patch_f8ca9443 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 1878 Patch F8ca9443?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 1878 Patch F8ca9443
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-1878-patch-f8ca9443/badge)](https://www.skillsdirectory.com/skills/tools-only-1878-patch-f8ca9443)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
---
match:
  keywords: [patch, edit, modify, change]
  tools: [patch, morph]
---

# Editing Files with Patch Tool

When modifying existing files, use the `patch` tool to make incremental changes.

## Best Practices

1. **Keep patches focused**: Each patch should make one logical change
2. **Preserve context**: Include enough surrounding lines for clarity
3. **Avoid placeholders**: Don't use comments like `// ... rest of code ...`
4. **Test after patching**: Verify the changes work as expected

## Example

To add a new method to a class:

```patch example.py
<<<<<<< ORIGINAL
class MyClass:
    def existing_method(self):
        pass
=======
class MyClass:
    def existing_method(self):
        pass

    def new_method(self, arg):
        return arg * 2
>>>>>>> UPDATED
```

## When to Use Patch vs Save

- Use **patch** for: Small targeted changes, adding/modifying functions
- Use **save** for: New files, complete rewrites, when patch format conflicts with content

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.