intuitive-port-worktree

intuitive-port-worktree is a skill for Claude Code from MiaoDX/intuitive-flow. It costs 79 tokens per session (2,190 once invoked), scanned A, original, MIT.

A workflow for moving committed or uncommitted code changes from one Git worktree or checkout into another repository folder.

In plain words
What is it for?
Use it to cherry-pick commits, apply patches, transplant changes between branches, or manually adapt changes when files have diverged.
Why use it?
It prevents changes from being applied to the wrong branch and checks whether the source and destination are compatible before porting them.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: mentions AGENTS.md.

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.

agentmods
npx agentmods add skills/miaodx/intuitive-flow/intuitive-port-worktree
Any agent
npx skills add MiaoDX/intuitive-flow --skill intuitive-port-worktree
Clone the repo
git clone --depth 1 https://github.com/MiaoDX/intuitive-flow

Made for: Claude Code.

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 intuitive-port-worktree

README.md
[![agentmods](https://agentmods.dev/badge/skills/miaodx/intuitive-flow/intuitive-port-worktree.svg)](https://agentmods.dev/skills/miaodx/intuitive-flow/intuitive-port-worktree)
Your own site
<a href="https://agentmods.dev/skills/miaodx/intuitive-flow/intuitive-port-worktree"><img src="https://agentmods.dev/badge/skills/miaodx/intuitive-flow/intuitive-port-worktree.svg" alt="Measured on agentmods" height="20"></a>
Per session 79 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,190 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00079 $0.02190
Opus 5 $0.00039 $0.01095
Sonnet 5 $0.00016 $0.00438
Haiku 4.5 $0.00008 $0.00219

Measured 6d ago against content hash 5cbd7e7c1107, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

intuitive-port-worktree 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 6d 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.

skills/intuitive-port-worktree/SKILL.md · 237 lines

How it starts

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

Intuitive Port Worktree

Use this skill to move a change set from a source worktree into the target default repo checkout while preserving the target checkout's current branch.

The operation name depends on the method:

  • cherry-pick: replay one or more source commits directly.
  • apply a patch: apply a diff generated from the source.
  • manual patch port or manual cherry-pick: map the same intent into a target branch whose files or APIs have diverged.
  • port changes or transplant changes: generic phrasing for this workflow.

Operating Rule

Do not switch the target repo to the source branch unless the user explicitly asks. The target repo's current branch is the destination.

If source and target paths are explicit, execute autonomously. Ask only when the source payload or target repo is ambiguous enough that the wrong choice would overwrite unrelated work.

Discovery

Collect this before editing:

  • status, root path, branch, recent commits, and target worktree list;
  • whether source and target share rev-parse --path-format=absolute --git-common-dir.

If they do not share a git common dir, the workflow can still use patches, but commit refs from the source may not resolve in the target.

Payload Selection

Prefer the smallest faithful payload:

  1. If the user names commit hashes, use those commits.
  2. If the source branch has local commits not in target, inspect the range from the merge base to source HEAD.
  3. If the source worktree is dirty, include staged and unstaged diffs only after confirming they are intentional from git status and git diff --stat.
  4. If both commits and dirty changes exist, port commits first, then dirty diffs.

Inspect commit ranges and dirty diffs with git log --oneline --reverse and git diff --stat before selecting the payload.

Safety Gate

Before modifying the target:

  • Read the target status. Do not overwrite unrelated target changes.
  • If target is dirty, check whether changed paths overlap the port. If they do, stop and ask; otherwise keep the edits separate.
  • Create a lightweight backup-before-port-<timestamp> branch in the target.

Read the full file on GitHub · 237 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. 6d ago First seen · 237 lines · 79 tokens per session scan A 5cbd7e7c1107

Subscribe to this mod's changes

intuitive-port-worktree is a skill published in the GitHub repository MiaoDX/intuitive-flow (48 stars, last pushed 2d ago), licensed MIT. It adds 79 tokens to every session and 2,190 once invoked, about $0.0004 per session on Opus 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-30.