Borrowing it
Nothing to install: this file belongs to Portwood-Global-Solutions/Portwood. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/Portwood-Global-Solutions/Portwood/main/.claude/skills/fix-merge-tag/SKILL.mdgit clone --depth 1 https://github.com/Portwood-Global-Solutions/PortwoodWrote 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/skills/portwood-global-solutions/portwood/fix-merge-tag)<a href="https://agentmods.dev/skills/portwood-global-solutions/portwood/fix-merge-tag"><img src="https://agentmods.dev/badge/skills/portwood-global-solutions/portwood/fix-merge-tag/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.
<a href="https://agentmods.dev/skills/portwood-global-solutions/portwood/fix-merge-tag"><img src="https://agentmods.dev/badge/skills/portwood-global-solutions/portwood/fix-merge-tag.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00054 | $0.01257 |
| Opus 5.5 | $0.00022 | $0.00503 |
| Sonnet 5.5 | $0.00011 | $0.00251 |
| Haiku 4.5 | $0.00005 | $0.00126 |
Grade A, and why
fix-merge-tag 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 2mo 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 — 104 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Fixing a merge-tag bug
The trap: there is more than one place that resolves tags, and they do not share code. A fix landed in one path leaves the others broken, and the failure is silent — the tag just prints raw or evaluates wrong for templates that happen to take a different route.
Before writing a fix, work out which path(s) the reported template takes.
The three merge-tag resolution paths
DocGenGiantQueryAssembler does not call processXml(). So:
| Path | Resolved by | Reached when |
|---|---|---|
| Row-level loop bodies | DocGenService.processXml() |
normal templates |
| Parent-level tags outside the loop | DocGenGiantQueryAssembler.resolveParentMergeTags() |
giant-query templates (>2000 child rows) |
| Grand-total aggregates | DocGenGiantQueryAssembler.resolveGiantAggregateTags() |
giant-query templates |
A section-tag fix in processXml covers only row-level loop bodies. If the change
needs to behave consistently for giant-query templates, mirror it in the assembler or
route it through processXmlForTest the same way format-suffix tags already do.
Always check whether your fix needs the same change in the giant-query parent path,
and add an e2e-07 assertion either way — including one that proves it doesn't need it.
The four {#ChartBucket} resolution paths
{#ChartBucket:relationship:field[:mod=val&...]}body{/ChartBucket} has its own set,
and all four must stay consistent:
- In-memory —
DocGenChartBucketResolver.preprocessInlineagainst pre-loaded relationship records. Used when child count <2000 and nowhere=/groupBy=. SOQL-free, fastest. - SOQL fallback —
tryFallbackSoqlAggregateAdvanced, when the relationship isn't on the data map orwhere=/groupBy=force it. Schema-auto-discovers child object and FK viaChildRelationship, issues aGROUP BYaggregate at constant cost. This is how 30K-scale templates work. - Parent-level —
resolveParentMergeTags()'s regex skips{#…}prefixes so charts pass through, thenprocessXmlForTestroutes to the inline path. - Giant-query parent —
resolveGiantChartBucketsfor charts targeting the giant relationship. Same modifiers, same shape.
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.
- 2mo ago First seen · 104 lines · 54 tokens per session scan A 7c80e36ff528
fix-merge-tag is a skill published in the GitHub repository Portwood-Global-Solutions/Portwood (132 stars, last pushed yesterday), licensed Apache-2.0. It adds 54 tokens to every session and 1,257 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-30.
fix-merge-tag compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| fix-merge-tagPortwood-Global-Solutions/Portwood | Skill | 132 | yesterday | Apache-2.0 | A | 54 | Claude Code |
| dotnet-reversezhaoxuya520/reverse-skill | Skill | 44k | 1mo ago | MIT | A | 144 | Claude Code |
| dart-run-static-analysisflutter/agent-plugins | Skill | 3.2k | 2d ago | BSD-3-Clause | A | 43 | Claude Code |
| agents-sdk-dotnet-debuggingmicrosoft/Agents | Skill | 1.1k | yesterday | MIT | A | 136 | Claude Code |
| memory-optimizationbenchflow-ai/skillsbench | Skill | 1.9k | 2d ago | Apache-2.0 | A | 60 | Claude Code, Codex |
| golang-error-handlingsamber/cc-skills-golang | Skill | 3.8k | 5d ago | MIT | A | 144 | Claude Code |
| prismer-python-debugpyPrismer-AI/PrismerCloud | Skill | 1.4k | 15d ago | MIT | A | 19 | Claude Code, Codex |