patch-stack-action

patch-stack-action is a skill for Claude Code, Codex from DJRHails/dotfiles. It costs 46 tokens per session (2,599 once invoked), scanned A, original, MIT.

Instructions for managing a fork that keeps upstream code separate from your own series of patches. A patch stack is an ordered set of focused changes maintained on top of a clean upstream branch.

In plain words
What is it for?
It explains how to create and edit patch branches, sync them with upstream, and rebuild the integration branch from the base plus approved patches.
Why use it?
It makes upstream synchronisation predictable and reduces the risk of mixing local changes into the upstream mirror.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions CLAUDE.md; mentions Claude Code; mentions AGENTS.md.

Good fit It explains how to create and edit patch branches, sync them with upstream, and rebuild the integration branch from the base plus approved patches.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/djrhails/dotfiles/patch-stack-action
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add DJRHails/dotfiles --skill patch-stack-action
Clone the repo
git clone --depth 1 https://github.com/DJRHails/dotfiles

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for patch-stack-action

README.md
[![agentmods](https://agentmods.dev/badge/skills/djrhails/dotfiles/patch-stack-action/github.svg)](https://agentmods.dev/skills/djrhails/dotfiles/patch-stack-action)
Your own site
<a href="https://agentmods.dev/skills/djrhails/dotfiles/patch-stack-action"><img src="https://agentmods.dev/badge/skills/djrhails/dotfiles/patch-stack-action/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for patch-stack-action

Your own site · 80×15
<a href="https://agentmods.dev/skills/djrhails/dotfiles/patch-stack-action"><img src="https://agentmods.dev/badge/skills/djrhails/dotfiles/patch-stack-action.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,599 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00046 $0.02599
Opus 5.5 $0.00018 $0.01040
Sonnet 5.5 $0.00009 $0.00520
Haiku 4.5 $0.00005 $0.00260

Measured 1mo ago against content hash 720500ea26c6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

patch-stack-action scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

modules/agents/skills/patch-stack-action/SKILL.md · 303 lines

How it starts

The opening of the file, as written. The whole thing — 303 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Patch Stack

Manage patch-stack forks powered by DJRHails/patch-stack-action.

When to use

  • The repo references DJRHails/patch-stack-action in a workflow
  • Commits on main are prefixed with patch-stack:
  • The repo has patch/* branches
  • The user wants to set up a new patch-stack fork

Concepts

A patch-stack fork maintains a clean separation between upstream code and your changes:

Branch What it is
base (or configured name) Read-only mirror of upstream main. Updated automatically by the nightly sync. Never commit to this directly.
patch/* One branch per logical change. Each is rebased onto base automatically. This is where you do your work.
main The integration branch. Built automatically: base + all patches squash-merged (prefixed patch-stack:). Never commit to this directly except fork: prefixed commits for fork-specific infra.

Key rule: main is rebuilt from scratch on every sync. Only fork: prefixed commits and patch-stack: squash-merges survive. All real work happens on patch/* branches.

Day-to-day patch editing workflow

Creating a new patch

Every patch needs three things: a patch/* branch from base, a push, and a local PR targeting base.

# 1. Always branch from base, not main
git checkout -b patch/my-feature origin/base

# 2. Make your changes, commit
git add <files>
git commit -m "feat(scope): description"

# 3. Push
git push origin patch/my-feature

# 4. ALWAYS create a PR targeting base (not main)
gh pr create --head patch/my-feature --base base

The PR against base is required. The sync action uses it to track patch state, generate squash commit messages on main, and link to upstream PRs. Without it the patch is invisible to the workflow.

Editing an existing patch

# Check out the patch branch
git checkout patch/my-feature

# Or use a worktree to avoid leaving main
git worktree add .data/worktrees/my-feature patch/my-feature

Read the full file on GitHub · 303 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 303 lines · 46 tokens per session scan A 720500ea26c6

Subscribe to this mod's changes

patch-stack-action is a skill published in the GitHub repository DJRHails/dotfiles (2 stars, last pushed yesterday), licensed MIT. It adds 46 tokens to every session and 2,599 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories