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 | $0.00027 | $0.00629 |
| Sonnet 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 12d 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.
- 12d 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 (122 stars, last pushed yesterday), licensed Apache-2.0. It adds 54 tokens to every session and 1,257 once invoked, about $0.0003 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.
Other skills, from other repositories
dotnet-reverse
A guide for analyzing compiled .NET and C# programs, including managed Windows executables and libraries. Reverse engineering means studying compiled software to understand how it works, and decompiling turns it back into readable approximate source code.
dart-run-static-analysis
Execute dart analyze to identify warnings and errors, and use dart fix --apply to automatically resolve mechanical lint issues. Use during development to ensure code quality and before committing changes.
hotpath_init
Configure hotpath profiling in a Rust project. Adds the hotpath dependency with feature-gated setup, instruments main with hotpath::main, functions with measure/measureall, and wraps channels, mutexes, rwlocks, streams, futures, reqwest clients, axum routers and byte-level I/O with hotpath macros. Use when the user…
agents-sdk-dotnet-debugging
Use when troubleshooting an agent built with the Microsoft Agents SDK (Microsoft.Agents.Hosting.AspNetCore and related packages) in C# / .NET. Trigger on any of these symptoms: build or C# compile errors, crashes on startup, 401 or auth errors on incoming requests, the bot not responding to messages, appsettings.json…
golang-error-handling
Idiomatic Golang error handling — creation, wrapping with %w, errors.Is/As, errors.Join, custom error types, sentinel errors, panic/recover, the single handling rule, structured logging with slog, HTTP request logging middleware, and samber/oops for production errors. Built to make logs usable at scale with log…
mintlify-api
Interact with the Mintlify REST API to manage deployments, trigger builds, and query documentation site metadata programmatically.