git-filtered-merge

Filtered squash merge: take only matching paths (e.g., doc/) from a source branch and apply them to a target branch via squash merge, PR creation. Use when: (1) User says 'filtered merge', 'sync doc to develop', 'cherry-pick directory', (2) User wants to sync a subset of changes between branches, (3) User needs to apply only specific directory or file changes from one branch to another.

6 stars

Best use case

git-filtered-merge is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Filtered squash merge: take only matching paths (e.g., doc/) from a source branch and apply them to a target branch via squash merge, PR creation. Use when: (1) User says 'filtered merge', 'sync doc to develop', 'cherry-pick directory', (2) User wants to sync a subset of changes between branches, (3) User needs to apply only specific directory or file changes from one branch to another.

Teams using git-filtered-merge should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/git-filtered-merge/SKILL.md --create-dirs "https://raw.githubusercontent.com/Takazudo/claude-resources/main/skills/git-filtered-merge/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/git-filtered-merge/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How git-filtered-merge Compares

Feature / Agentgit-filtered-mergeStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Filtered squash merge: take only matching paths (e.g., doc/) from a source branch and apply them to a target branch via squash merge, PR creation. Use when: (1) User says 'filtered merge', 'sync doc to develop', 'cherry-pick directory', (2) User wants to sync a subset of changes between branches, (3) User needs to apply only specific directory or file changes from one branch to another.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Git Filtered Merge

Squash merge a source branch into a new branch off the target, keep only paths matching a filter, then commit, push, and create a PR.

## Parameters

Collect via AskUserQuestion (single prompt with all questions):

1. **Base branch** (required): branch to update (e.g., `develop`)
2. **Source branch** (required): branch to take changes from (e.g., `base/fanbassador-post`)
3. **Filter paths** (required): space-separated paths to keep (e.g., `doc/`)
4. **Branch name** (optional): if not given, auto-generate from filter + base (e.g., `sync-doc-to-develop`)

If the skill was invoked with an argument, use it as the branch name and skip asking for it.

## Workflow

```
1. git fetch origin
2. Show filtered diff: git diff origin/<base>...<source> -- <filter-paths> --stat
   - If no changes, abort with message
   - Show to user for confirmation before proceeding
3. git checkout -b <branch-name> origin/<base>
4. git merge --squash <source>
5. git reset HEAD
6. git add <filter-paths>
7. git checkout -- . && git clean -fd
8. git diff --cached --stat  (verify only filtered changes staged)
9. Commit with message: "docs: <source> ブランチの変更を <base> に同期"
   - Adjust prefix (docs/feat/fix) based on content
10. git push -u origin <branch-name>
11. gh pr create --base <base> with project CLAUDE.md conventions
12. Return PR URL
```

## Important

- If the project has CLAUDE.md PR conventions (Japanese titles, headers), follow them
- If no changes match the filter, abort early and inform the user
- Never force push

Related Skills

dev-gh-actions-doc-auto-merge

6
from Takazudo/claude-resources

Create a GitHub Actions workflow that auto-merges a production branch into a documentation branch. Use when: (1) Setting up auto-sync from production to doc branch, (2) User mentions 'doc auto merge', 'auto sync docs', 'document branch sync', (3) User wants docs to stay up-to-date with production automatically.

zudoesa-articlify

6
from Takazudo/claude-resources

Convert conversation context into an esa article via the zudoesa-writer subagent. ONLY invoke when the user explicitly asks — NEVER proactively propose. Triggers: 'write esa article', 'esa記事', 'esaに書いて', 'articlify for esa', or /zudoesa-articlify. Gathers context, creates a writing brief, delegates to the writer subagent.

zudoesa-apply-voice

6
from Takazudo/claude-resources

Apply Takazudo's esa writing voice and vocabulary rules to text. Use when: (1) User wants to write/rewrite text in Takazudo's esa style, (2) User says 'apply voice', 'esa voice', 'esa文体で', 'esa風に書いて', '文体を適用', (3) User provides text to transform to esa style. Reads writing-style.md and vocabulary-rule.md from takazudo-esa-writing repo and applies the rules.

zudocg-articlify

6
from Takazudo/claude-resources

Convert conversation context into a CodeGrid article via the zudocg-writer subagent. ONLY invoke when the user explicitly asks — NEVER proactively propose. Triggers: 'write codegrid article', 'CodeGrid記事', 'codegridに書いて', 'articlify for codegrid', or /zudocg-articlify. Gathers context, creates a writing brief, delegates to the writer subagent.

zudocg-apply-voice

6
from Takazudo/claude-resources

Apply Takazudo's CodeGrid writing voice and vocabulary rules to text. Use when: (1) User wants to write/rewrite text in Takazudo's CodeGrid style, (2) User says 'apply voice', 'codegrid voice', 'codegrid文体で', 'codegrid風に書いて', '文体を適用', (3) User provides text to transform to CodeGrid style. Reads writing-style.md and vocabulary-rule.md from takazudo-codegrid-writing repo and applies the rules.

zpaper-articlify

6
from Takazudo/claude-resources

Convert conversation context into a zpaper blog article via the zpaper-writer subagent. ONLY invoke when the user explicitly asks — NEVER proactively propose. Triggers: 'write zpaper article', 'zpaper記事', 'zpaperに書いて', 'articlify for zpaper', or /zpaper-articlify. Gathers context, creates a writing brief, delegates to the writer subagent.

zpaper-apply-voice

6
from Takazudo/claude-resources

Apply Takazudo's zpaper blog writing voice and vocabulary rules to text. Use when: (1) User wants to write/rewrite text in Takazudo's zpaper style, (2) User says 'apply voice', 'zpaper voice', 'zpaper文体で', 'zpaper風に書いて', 'ブログ文体を適用', (3) User provides text to transform to zpaper style. Reads writing-style.md and vocabulary-rule.md from the zpaper repo and applies the rules.

xlsx

6
from Takazudo/claude-resources

Spreadsheet creation, editing, and analysis. Use when working with .xlsx, .xlsm, .csv, .tsv files for: (1) Creating spreadsheets with formulas and formatting, (2) Reading or analyzing data, (3) Modifying existing spreadsheets while preserving formulas, (4) Data analysis and visualization, (5) Recalculating formulas.

x

6
from Takazudo/claude-resources

Facade for development workflows. Routes on two axes: plan-first vs implement-now (escalates to /big-plan -a when the request needs research / decomposition / has unclear scope — the appended -a makes the plan chain into implementation in-session), then single vs multi on the ready-to-build fast paths (/x-as-pr single-topic, /x-wt-teams multi-topic parallel). Use when: (1) User says '/x' followed by dev instructions, (2) User wants to start development without choosing the workflow skill, (3) User says 'dev', 'implement', or 'build' with a task. Default option: -v (verify-ui). Review-loop (-l) is opt-in — without -l the downstream skill runs a single /deep-review pass. Forwards -a (autonomy/auto-chain) and -m (merge at the end + cleanup + CI watch) through every route; auto-fix of raised findings (-f) and issue-raising (-ri) are downstream defaults, with -nf/--no-fix and -nori/--no-raise-issues as the forwarded opt-outs. -a and -m are orthogonal — full hands-off end-to-end is -a -m.

x-wt-teams

6
from Takazudo/claude-resources

Parallel multi-topic development using git worktrees, base branches, and Claude Code agent teams. Use when: (1) User wants to work on multiple related features in parallel, (2) User mentions 'worktree', 'base branch', 'parallel development', 'split into topics', or 'multi-topic'. FULLY AUTONOMOUS — creates worktrees, spawns teams, coordinates everything. Also supports Super-Epic child mode for [Epic] issues from /big-plan with '**Super-epic:** #N' markers (targets the super-epic base branch instead of main).

x-as-pr

6
from Takazudo/claude-resources

Start a development workflow as a draft PR. Creates a NEW branch from the current branch, empty start commit, draft PR targeting the current branch, then implements. ALWAYS creates a new branch by default — produces a nested PR-on-PR when the current branch already has one. Use when: (1) User says 'dev as pr', (2) User wants a PR-first workflow before coding, (3) User passes -s/--stay to reuse the current branch instead of nesting, (4) User passes a GitHub issue URL to implement, (5) User passes --make-issue/--issue to create an issue first. Logs progress via issue comments when an issue is linked.

watch-ci

6
from Takazudo/claude-resources

Watch GitHub PR CI checks in the background and notify on completion. Use when: (1) User wants to monitor CI/CD status, (2) User says 'watch CI', 'check CI', 'monitor checks', or 'wait for CI', (3) User wants to know when checks pass or fail. Runs a background gh polling shell loop (NOT a subagent — near-zero token cost), sends macOS notification on completion. Also handles merged PRs by watching the target branch CI.