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 $0.00027 $0.00629
Sonnet 5 $0.00011 $0.00251
Haiku 4.5 $0.00005 $0.00126

Measured 12d ago against content hash 7c80e36ff528, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, 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 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.

.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-memoryDocGenChartBucketResolver.preprocessInline against pre-loaded relationship records. Used when child count <2000 and no where=/groupBy=. SOQL-free, fastest.
  2. SOQL fallbacktryFallbackSoqlAggregateAdvanced, 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-levelresolveParentMergeTags()'s regex skips {#…} prefixes so charts pass through, then processXmlForTest routes to the inline path.
  4. Giant-query parentresolveGiantChartBuckets 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. 12d 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 (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.

Related

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.

zhaoxuya520/reverse-skill · 144 tokens

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.

flutter/agent-plugins · 43 tokens

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…

pawurb/hotpath-rs · 88 tokens

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…

microsoft/Agents · 136 tokens

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…

samber/cc-skills-golang · 144 tokens

mintlify-api

Interact with the Mintlify REST API to manage deployments, trigger builds, and query documentation site metadata programmatically.

mintlify/docs · 26 tokens