Portwood: Skill for Claude Code

.claude/skills/fix-merge-tag/SKILL.md

fix-merge-tag is a skill for Claude Code from Portwood-Global-Solutions/Portwood. It costs 54 tokens per session (1,257 once invoked), scanned A, original, Apache-2.0.

A guide for fixing Portwood merge tags, which are placeholders in templates that are replaced with data or calculated values.

In plain words
What is it for?
Use it when changing parsing for loops, sections, conditions, totals, or chart groupings, and when checking that a fix works for both normal and large-query templates.
Why use it?
Portwood has separate code paths for ordinary rows, large queries, and totals, so fixing one path can leave other templates broken without an obvious error.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is Portwood-Global-Solutions/Portwood's own configuration. It tells Claude Code how to work on Portwood itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything Portwood configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/Portwood-Global-Solutions/Portwood/main/.claude/skills/fix-merge-tag/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/Portwood-Global-Solutions/Portwood

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 fix-merge-tag

README.md
[![agentmods](https://agentmods.dev/badge/skills/portwood-global-solutions/portwood/fix-merge-tag/github.svg)](https://agentmods.dev/skills/portwood-global-solutions/portwood/fix-merge-tag)
Your own site
<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.

agentmods 80×15 button for fix-merge-tag

Your own site · 80×15
<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>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,257 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00054 $0.01257
Opus 5.5 $0.00022 $0.00503
Sonnet 5.5 $0.00011 $0.00251
Haiku 4.5 $0.00005 $0.00126

Measured 2mo ago against content hash 7c80e36ff528, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

.claude/skills/fix-merge-tag/SKILL.md · 104 lines

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:

  1. In-memory — DocGenChartBucketResolver.preprocessInline against pre-loaded relationship records. Used when child count <2000 and no where=/groupBy=. SOQL-free, fastest.
  2. SOQL fallback — tryFallbackSoqlAggregateAdvanced, when the relationship isn't on the data map or where=/groupBy= force it. Schema-auto-discovers child object and FK via ChildRelationship, issues a GROUP BY aggregate at constant cost. This is how 30K-scale templates work.
  3. Parent-level — resolveParentMergeTags()'s regex skips {#…} prefixes so charts pass through, then processXmlForTest routes to the inline path.
  4. Giant-query parent — resolveGiantChartBuckets for charts targeting the giant relationship. Same modifiers, same shape.

Read the full file on GitHub · 104 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. 2mo ago First seen · 104 lines · 54 tokens per session scan A 7c80e36ff528

Subscribe to this mod's changes

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.

Related

fix-merge-tag compared with skills from other repositories

fix-merge-tag next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
fix-merge-tagPortwood-Global-Solutions/PortwoodSkill132yesterdayApache-2.0A54Claude Code
dotnet-reversezhaoxuya520/reverse-skillSkill44k1mo agoMITA144Claude Code
dart-run-static-analysisflutter/agent-pluginsSkill3.2k2d agoBSD-3-ClauseA43Claude Code
agents-sdk-dotnet-debuggingmicrosoft/AgentsSkill1.1kyesterdayMITA136Claude Code
memory-optimizationbenchflow-ai/skillsbenchSkill1.9k2d agoApache-2.0A60Claude Code, Codex
golang-error-handlingsamber/cc-skills-golangSkill3.8k5d agoMITA144Claude Code
prismer-python-debugpyPrismer-AI/PrismerCloudSkill1.4k15d agoMITA19Claude Code, Codex