skills/apply-patch/SKILL.md
Apply a Git-style diff hunk to a file. Feed a diff hunk (plus new line, minus remove). Use when the user wants to apply a patch or diff.
npx skillsauth add bishwashere/cowcode Apply patchInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Git-style patch applicator. You feed it a diff hunk - lines with + (add) or - (remove), optionally context lines (space-prefixed). The skill applies the hunk to the file.
Call run_skill with skill: "apply-patch". Set command or arguments.action to apply (or apply-patch).
Example hunk:
const x = 1;
- const old = true;
+ const updated = false;
Use when the user says things like:
The skill finds where the hunk applies (by matching context), then applies add/remove. Fails if the context does not match the file.
apply_patch_apply
description: Apply a Git-style diff hunk to a file. path and hunk required.
parameters:
path: string
hunk: string
tools
Policy-gated command execution for package managers, project generators, build/test scripts, dev servers, and one-off CLIs. Disabled by default; add "exec" to skills.enabled to expose it. Prefer go-read/go-write for stable filesystem primitives.
data-ai
Plain HTTP fetch (GET/POST/etc.) for JSON or text endpoints, including localhost / LAN / Pasture's own dashboard. Use this instead of browse for non-rendered URLs.
testing
Bridge conversation to dashboard Projects and Missions — list configured projects, register new ones with setup details, health-check, propose tasks, create missions after user approval, log progress, and update task status. Use when the user wants to work on, track, or manage a project.
documentation
GitHub integration. Read repos, list/read issues and PRs, create branches, post comments, create PRs. Requires GitHub token in ~/.pasture/secrets.json or GITHUB_TOKEN env var.