Agent skill

Gsd Reapply Patches

by SpillwaveSolutions in SpillwaveSolutions/agent-brain

Reapply local modifications after a GSD update. An agent skill from SpillwaveSolutions/agent-brain.

MITAuto-check passedKnowledge Management

Install Gsd Reapply Patches

skills CLI
$ npx skills add SpillwaveSolutions/agent-brain --skill gsd-reapply-patches -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install SpillwaveSolutions/agent-brain gsd-reapply-patches --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/SpillwaveSolutions/agent-brain.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.codex/skills/gsd-reapply-patches .claude/skills/gsd-reapply-patches && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
gsd-reapply-patches
GitHub stars
119
Used in
1 other repo
Token cost
~1.4k tokens
SKILL.md length
466 words
Files
1
Skills in repo
55
Repo updated
First seen
Licence
MIT

At a glance

Reapply local modifications after a GSD update. An agent skill from SpillwaveSolutions/agent-brain.

  • Works in 6 steps: Detect backed-up patches → Show patch summary → Merge each file → …
  • Knowledge Management work in your project
  • SKILL.md covers A. Skill Invocation, B. AskUserQuestion →…, C. Task() → spawn_agent Mapping and Step 1: Detect backed-up patches, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Gsd Reapply Patches is an agent skill from SpillwaveSolutions/agent-brain. Reapply local modifications after a GSD update

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Knowledge Management. The repository describes itself as: Local-first RAG memory for AI agents: hybrid + GraphRAG search, MCP server with OAuth 2.1, plugin for Claude Code / OpenCode / Codex. The licence is MIT.

When your agent uses it

  • Knowledge Management work in your project

Example prompts

  • “/gsd-reapply-patches”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Detect backed-up patches
  2. Show patch summary
  3. Merge each file
  4. Update manifest
  5. Cleanup option
  6. Report

What it can do on your machine

Read from SKILL.md and the folder at commit 8339623. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are bash).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Gsd Reapply Patches loads about 1.4k tokens when it runs. Until then it costs about 17 tokens; SKILL.md has 466 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~17
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from SpillwaveSolutions/agent-brain at commit 8339623, republished under its MIT licence (© SpillwaveSolutions). 466 words, ~1,382 tokens.

Download SKILL.mdSave it as .claude/skills/gsd-reapply-patches/SKILL.md (or your agent's skills folder).
name
gsd-reapply-patches
description
Reapply local modifications after a GSD update
metadata.short-description
Reapply local modifications after a GSD update

<codex_skill_adapter>

A. Skill Invocation

  • This skill is invoked by mentioning $gsd-reapply-patches.
  • Treat all user text after $gsd-reapply-patches as {{GSD_ARGS}}.
  • If no arguments are present, treat {{GSD_ARGS}} as empty.

B. AskUserQuestion → request_user_input Mapping

GSD workflows use AskUserQuestion (Claude Code syntax). Translate to Codex request_user_input:

Parameter mapping:

  • header → header
  • question → question
  • Options formatted as "Label" — description → {label: "Label", description: "description"}
  • Generate id from header: lowercase, replace spaces with underscores

Batched calls:

  • AskUserQuestion([q1, q2]) → single request_user_input with multiple entries in questions[]

Multi-select workaround:

  • Codex has no multiSelect. Use sequential single-selects, or present a numbered freeform list asking the user to enter comma-separated numbers.

Execute mode fallback:

  • When request_user_input is rejected (Execute mode), present a plain-text numbered list and pick a reasonable default.

C. Task() → spawn_agent Mapping

GSD workflows use Task(...) (Claude Code syntax). Translate to Codex collaboration tools:

Direct mapping:

  • Task(subagent_type="X", prompt="Y") → spawn_agent(agent_type="X", message="Y")
  • Task(model="...") → omit (Codex uses per-role config, not inline model selection)
  • fork_context: false by default — GSD agents load their own context via <files_to_read> blocks

Parallel fan-out:

  • Spawn multiple agents → collect agent IDs → wait(ids) for all to complete

Result parsing:

  • Look for structured markers in agent output: CHECKPOINT, PLAN COMPLETE, SUMMARY, etc.
  • close_agent(id) after collecting results from each agent </codex_skill_adapter>
<purpose>
After a GSD update wipes and reinstalls files, this command merges user's previously saved local modifications back into the new version. Uses intelligent comparison to handle cases where the upstream file also changed.
</purpose>
<process>

Step 1: Detect backed-up patches

Check for local patches directory:

bash
# Global install — detect runtime config directory
if [ -d "$HOME/.config/opencode/gsd-local-patches" ]; then
  PATCHES_DIR="$HOME/.config/opencode/gsd-local-patches"
elif [ -d "$HOME/.opencode/gsd-local-patches" ]; then
  PATCHES_DIR="$HOME/.opencode/gsd-local-patches"
elif [ -d "$HOME/.gemini/gsd-local-patches" ]; then
  PATCHES_DIR="$HOME/.gemini/gsd-local-patches"
else
  PATCHES_DIR="/Users/richardhightower/clients/spillwave/src/agent-brain/.codex/gsd-local-patches"
fi
# Local install fallback — check all runtime directories
if [ ! -d "$PATCHES_DIR" ]; then
  for dir in .config/opencode .opencode .gemini .claude; do
    if [ -d "./$dir/gsd-local-patches" ]; then
      PATCHES_DIR="./$dir/gsd-local-patches"
      break
    fi
  done
fi

Read backup-meta.json from the patches directory.

If no patches found:

No local patches found. Nothing to reapply.

Local patches are automatically saved when you run $gsd-update
after modifying any GSD workflow, command, or agent files.

Exit.

Step 2: Show patch summary

## Local Patches to Reapply

**Backed up from:** v{from_version}
**Current version:** {read VERSION file}
**Files modified:** {count}

| # | File | Status |
|---|------|--------|
| 1 | {file_path} | Pending |
| 2 | {file_path} | Pending |
Show full SKILL.md (205 more words)Show less

Step 3: Merge each file

For each file in backup-meta.json:

  1. Read the backed-up version (user's modified copy from gsd-local-patches/)

  2. Read the newly installed version (current file after update)

  3. Compare and merge:

    • If the new file is identical to the backed-up file: skip (modification was incorporated upstream)
    • If the new file differs: identify the user's modifications and apply them to the new version

    Merge strategy:

    • Read both versions fully
    • Identify sections the user added or modified (look for additions, not just differences from path replacement)
    • Apply user's additions/modifications to the new version
    • If a section the user modified was also changed upstream: flag as conflict, show both versions, ask user which to keep
  4. Write merged result to the installed location

  5. Report status:

    • Merged — user modifications applied cleanly
    • Skipped — modification already in upstream
    • Conflict — user chose resolution

Step 4: Update manifest

After reapplying, regenerate the file manifest so future updates correctly detect these as user modifications:

bash
# The manifest will be regenerated on next $gsd-update
# For now, just note which files were modified

Step 5: Cleanup option

Ask user:

  • "Keep patch backups for reference?" → preserve gsd-local-patches/
  • "Clean up patch backups?" → remove gsd-local-patches/ directory

Step 6: Report

## Patches Reapplied

| # | File | Status |
|---|------|--------|
| 1 | {file_path} | ✓ Merged |
| 2 | {file_path} | ○ Skipped (already upstream) |
| 3 | {file_path} | ⚠ Conflict resolved |

{count} file(s) updated. Your local modifications are active again.
</process>

<success_criteria>

  • All backed-up patches processed
  • User modifications merged into new version
  • Conflicts resolved with user input
  • Status reported for each file </success_criteria>

© SpillwaveSolutions, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .codex/skills/gsd-reapply-patches of SpillwaveSolutions/agent-brain.

Open the folder on GitHubat commit 8339623

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in SpillwaveSolutions/agent-brain, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Gsd Reapply Patches next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Gsd Reapply Patches compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Gsd Reapply Patches this skillSpillwaveSolutions/agent-brain1191 repos~1.4kAutomated safety check: PassMIT
Logseq Review Workflow Evallogseq/logseq45k—~1kAutomated safety check: PassAGPL-3.0
Baoyu URL To Markdownsdyckjq-lab/llm-wiki-skill2.5k2 repos~3.2kAutomated safety check: PassNone
Obsidian CLIAtmosphere/atmosphere3.8k13 repos~795Automated safety check: PassApache-2.0
Esm Cjs Risk Scanlogseq/logseq45k—~3.3kAutomated safety check: PassAGPL-3.0
Knowledge Searchdataelement/bisheng12k—~1.1kAutomated safety check: PassApache-2.0

Similar skills

  • Compare two revisions of the Logseq logseq-review-workflow skill by running the same review prompt against isolated before and after skill snapshots, collecting both outputs, and producing a…

    45k GitHub stars~1k tokensUpdated today
    Knowledge ManagementAuto-check passed
  • Baoyu URL To Markdown

    sdyckjq-lab/llm-wiki-skill

    Fetch any URL and convert to markdown using Chrome CDP. An agent skill from sdyckjq-lab/llm-wiki-skill.

    2.5k GitHub starsUsed in 2 repos~3.2k tokens
    Knowledge ManagementAuto-check passed
  • Obsidian CLI

    Atmosphere/atmosphere

    Interact with Obsidian vaults using the Obsidian CLI to read, create, search, and manage notes, tasks, properties, and more.

    3.8k GitHub starsUsed in 13 repos~795 tokens
    Knowledge ManagementAuto-check passed
  • Esm Cjs Risk Scan

    logseq/logseq

    Scan Logseq ClojureScript Node/Electron targets for npm module loading risks, especially ESM-only packages that may fail when loaded through js/require or shadow-cljs require-based shims.

    45k GitHub stars~3.3k tokensUpdated today
    Knowledge ManagementAuto-check passed
  • Knowledge Search

    dataelement/bisheng

    Search the user's knowledge bases and knowledge spaces (企业知识库检索).

    12k GitHub stars~1.1k tokensUpdated yesterday
    Knowledge ManagementAuto-check passed
  • Capture Conversation

    outline/outline

    Save the current conversation, a decision, or a set of notes as a document in an Outline collection; use when the user wants to keep what was discussed in their knowledge base.

    41k GitHub stars~474 tokensUpdated today
    Knowledge ManagementAuto-check passed

More from SpillwaveSolutions/agent-brain

All 55 skills in this repo
  • Gsd Complete Milestone

    SpillwaveSolutions/agent-brain

    Archive completed milestone and prepare for next version. An agent skill from SpillwaveSolutions/agent-brain.

    119 GitHub starsUsed in 4 repos~1.6k tokens
    Auto-check passed
  • Mastering Python Skill

    SpillwaveSolutions/agent-brain

    Modern Python coaching covering language foundations through advanced production patterns.

    119 GitHub stars~1.4k tokensUpdated 21 days ago
    Auto-check: notes
  • Gsd Debug

    SpillwaveSolutions/agent-brain

    Systematic debugging with persistent state across context resets

    119 GitHub starsUsed in 4 repos~1.5k tokens
    Auto-check passed
  • Gsd Review Backlog

    SpillwaveSolutions/agent-brain

    Review and promote backlog items to active milestone. An agent skill from SpillwaveSolutions/agent-brain.

    119 GitHub starsUsed in 3 repos~961 tokens
    Auto-check passed
  • Configuring Agent Brain

    SpillwaveSolutions/agent-brain

    Installation and configuration skill for Agent Brain document search system.

    119 GitHub stars~7k tokensUpdated 21 days ago
    Auto-check: notes
  • Gsd Thread

    SpillwaveSolutions/agent-brain

    Manage persistent context threads for cross-session work. An agent skill from SpillwaveSolutions/agent-brain.

    119 GitHub starsUsed in 3 repos~1.2k tokens
    Auto-check passed

Questions about Gsd Reapply Patches

What does Gsd Reapply Patches do?

Reapply local modifications after a GSD update. An agent skill from SpillwaveSolutions/agent-brain. Gsd Reapply Patches is an agent skill from SpillwaveSolutions/agent-brain.

When should I use Gsd Reapply Patches?

Gsd Reapply Patches fits situations like: knowledge Management work in your project.

How do I install Gsd Reapply Patches in Claude Code?

Run `npx skills add SpillwaveSolutions/agent-brain --skill gsd-reapply-patches -a claude-code`. Or copy the skill folder (.codex/skills/gsd-reapply-patches in SpillwaveSolutions/agent-brain) into .claude/skills/gsd-reapply-patches in your project. Claude Code loads it when a task matches its description.

How do I install Gsd Reapply Patches in Codex?

Run `npx skills add SpillwaveSolutions/agent-brain --skill gsd-reapply-patches -a codex`. Or copy the skill folder (.codex/skills/gsd-reapply-patches in SpillwaveSolutions/agent-brain) into .agents/skills/gsd-reapply-patches in your project. Codex loads it when a task matches its description.

Can I use Gsd Reapply Patches in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add SpillwaveSolutions/agent-brain --skill gsd-reapply-patches -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/gsd-reapply-patches, .gemini/skills/gsd-reapply-patches, .github/skills/gsd-reapply-patches and .opencode/skills/gsd-reapply-patches in your project.

What does Gsd Reapply Patches need to run?

SKILL.md names no scripts, command-line tools or credentials: Gsd Reapply Patches is instructions for the agent only.

Does Gsd Reapply Patches access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Gsd Reapply Patches safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Gsd Reapply Patches use?

Gsd Reapply Patches is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Gsd Reapply Patches use?

About 1.4k tokens (SKILL.md is roughly 5.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Gsd Reapply Patches?

Skills that share tags, products or a category with Gsd Reapply Patches: Logseq Review Workflow Eval (logseq/logseq, 45k stars), Baoyu URL To Markdown (sdyckjq-lab/llm-wiki-skill, 2.5k stars), Obsidian CLI (Atmosphere/atmosphere, 3.8k stars) and Esm Cjs Risk Scan (logseq/logseq, 45k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Gsd Reapply Patches?

SpillwaveSolutions (a GitHub organization) maintains it in SpillwaveSolutions/agent-brain, which has 119 GitHub stars. The repository holds 55 skills in this directory. The repository was last updated on September 19, 2026.

Source: SpillwaveSolutions/agent-brain on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.