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.
npx agentmods add commands/demondamon/agenticx/port-commitsgit clone --depth 1 https://github.com/DemonDamon/AgenticXWrote 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.
[](https://agentmods.dev/commands/demondamon/agenticx/port-commits)<a href="https://agentmods.dev/commands/demondamon/agenticx/port-commits"><img src="https://agentmods.dev/badge/commands/demondamon/agenticx/port-commits.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.02706 |
| Opus 5 | $0.00000 | $0.01353 |
| Sonnet 5 | $0.00000 | $0.00541 |
| Haiku 4.5 | $0.00000 | $0.00271 |
Grade A, and why
port-commits 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.
How it starts
The opening of the file, as written. The whole thing — 200 lines — stays where its author put it; the contents beside it link to each section on GitHub.
port-commits
把已落地、可追溯的一组 commit,用 cherry-pick(最稳妥) 同步到目标分支(常见:main → hc-0730)。
与 /port-from-branch 的区别:
| 指令 | 场景 | 默认动作 |
|---|---|---|
/port-from-branch |
参考协作者分支,在 main 上核实后更瘦重做 | 禁止整包盲合 |
/port-commits |
源分支上的改动已经定稿,要原样/按序搬到目标分支 | 只 cherry-pick 选定 commits,默认不 merge 整支 |
参数(从 $input 解析)
写法宽松:空格分隔的 token + 可选 --key=value。缺关键参数时先问用户再动手,不要猜错目标分支。
必选
--to=<目标分支>:要接收改动的分支,如hc-0730- 也可写成自然语言:
合并到 hc-0730/同步到分支A
- 也可写成自然语言:
选定要搬的 commits(四选一,可组合)
按优先级解析;最终必须解析出有序 commit 列表(旧 → 新):
-
显式 SHA(最稳)
- 例:
/port-commits a1b2c3d e4f5g6h --to=hc-0730 - 支持短 SHA(≥7)与完整 SHA;解析后用
git rev-parse校验存在。
- 例:
-
Plan-Id 检索(推荐给本仓库带 trailer 的提交)
--plan-id=<id>- 例:
/port-commits --plan-id=2026-07-27-enterprise-portal-web-search-wiring --to=hc-0730 - 在
--from(默认origin/main)历史上:
git log <from> --grep='Plan-Id: <id>' --reverse --format='%H' - 可同时给多个:
--plan-id=A --plan-id=B(先 A 再 B,各自内部按时间旧→新)。
-
源分支 + 最近 N 次
--from=<源分支>(默认origin/main)--last=<N>或自然语言「最近两次 / 最近 2 个提交 / last 2」- 例:
/port-commits --from=main --last=2 --to=hc-0730 - 「最近 N 次」=
git log <from> -N --reverse --format='%H'(不是相对目标分支的 diff,而是源分支 tip 往回数 N 个)。 - 若用户说「main 上比 hc-0730 多出来的最近两次」,改用:
git log origin/hc-0730..origin/main -2 --reverse(见下方「相对范围」)。
-
相对范围
--range=<A>..<B>或--range=<A>...<B>- 例:
/port-commits --range=origin/hc-0730..origin/main --to=hc-0730 - 若再带
--last=N:在该范围内取最新 N 个,再--reverse成旧→新。
可选开关
| 开关 | 含义 | 默认 |
|---|---|---|
--from=<ref> |
检索 Plan-Id / last N 时的源 tip | origin/main |
--dry-run |
只列将要拣的 commits + 文件面,不改分支 | 默认开启(未写 --apply 即 dry-run) |
--apply |
真正 checkout 目标分支并 cherry-pick | 关 |
--push |
apply 成功后 git push -u origin <to> |
关(需用户明确,或与 --apply 同写才推) |
--allow-empty-skip |
cherry-pick 空提交(已包含)时跳过并继续 | 开 |
--strategy=merge |
不推荐;仅当用户显式要求整支 merge 时才用,并先警告风险 | cherry-pick |
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.
- 6d ago First seen · 200 lines · 0 tokens per session scan A 0764839473d4
port-commits is a command published in the GitHub repository DemonDamon/AgenticX (227 stars, last pushed today), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 2,706 tokens. 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.
Other commands, from other repositories
commit
Create a git commit with a well-structured message.
align
Context-aware alignment. When in plan mode, it reviews the active plan. Otherwise, it reviews all branch changes against Ion quality gates and principles, implements the fixes and commits them after operator approval.
squash
Rebuild a feature branch into clean conventional commits while preserving its exact final tracked tree.
smart-commit
Generate and create a commit with a conventional commit message based on staged changes.
ship
Quick pre-ship checklist to run before pushing or merging a change.
multi-repo-swarm
Coordinate AI swarms across multiple repositories, enabling organization-wide automation and intelligent cross-project collaboration.