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 skills add cxcscmu/SkillLearnBench --skill docx-placeholder-replacementgit clone --depth 1 https://github.com/cxcscmu/SkillLearnBenchWrote 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/cxcscmu/skilllearnbench/docx-placeholder-replacement)<a href="https://agentmods.dev/skills/cxcscmu/skilllearnbench/docx-placeholder-replacement"><img src="https://agentmods.dev/badge/skills/cxcscmu/skilllearnbench/docx-placeholder-replacement/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/cxcscmu/skilllearnbench/docx-placeholder-replacement"><img src="https://agentmods.dev/badge/skills/cxcscmu/skilllearnbench/docx-placeholder-replacement.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.00034 | $0.00566 |
| Opus 5.5 | $0.00014 | $0.00226 |
| Sonnet 5.5 | $0.00007 | $0.00113 |
| Haiku 4.5 | $0.00003 | $0.00057 |
Grade A, and why
docx-placeholder-replacement 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 — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Robust Placeholder Replacement in Word Documents
The Split-Run Problem
Word's XML engine often breaks a single word like {{CANDIDATE_NAME}} across multiple runs:
run[0]: '{{CANDI'
run[1]: 'DATE_NAME}}'
A naive run.text.replace() will miss these. Always reconstruct from para.text.
Safe Replacement Algorithm
import re
def replace_in_paragraph(para, data):
"""Replace all {{KEY}} placeholders in paragraph, handling split runs."""
full_text = para.text
pattern = re.compile(r'\{\{([A-Z0-9_]+)\}\}')
if not pattern.search(full_text):
return # Nothing to do
# Build replacement
def replacer(m):
key = m.group(1)
return str(data[key]) if key in data else m.group(0)
new_text = pattern.sub(replacer, full_text)
if new_text != full_text and para.runs:
# Put all text in first run, clear the rest
para.runs[0].text = new_text
for run in para.runs[1:]:
run.text = ''
Apply to Entire Document
def replace_all_placeholders(doc, data):
"""Replace placeholders everywhere: body, tables, headers, footers."""
# Body paragraphs
for para in doc.paragraphs:
replace_in_paragraph(para, data)
# Tables (with nested table recursion)
def process_table(table):
for row in table.rows:
for cell in row.cells:
for para in cell.paragraphs:
replace_in_paragraph(para, data)
for nested in cell.tables:
process_table(nested)
for table in doc.tables:
process_table(table)
# Headers and footers
for section in doc.sections:
for para in section.header.paragraphs:
replace_in_paragraph(para, data)
for para in section.footer.paragraphs:
replace_in_paragraph(para, data)
Notes
- Only the first run's formatting is preserved after merging. If parts of the placeholder text have different formatting (e.g., bold
{{NAME}}), that formatting is lost — which is usually acceptable for template filling. - Unknown placeholders (keys not in
data) are left as-is by default. Adjust thereplacerfunction to raise errors or substitute empty strings if needed.
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 · 80 lines · 34 tokens per session scan A 4496ef016949
docx-placeholder-replacement is a skill published in the GitHub repository cxcscmu/SkillLearnBench (93 stars, last pushed 1mo ago), licensed MIT. It adds 34 tokens to every session and 566 once invoked, about $0.0001 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-09-03.
docx-placeholder-replacement compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| docx-placeholder-replacementcxcscmu/SkillLearnBench | Skill | 93 | 1mo ago | MIT | A | 34 | Claude Code, Codex |
| image-ocrbenchflow-ai/skillsbench | Skill | 1.9k | 6d ago | Apache-2.0 | A | 16 | Claude Code, Codex |
| pdfbenchflow-ai/skillsbench | Skill | 1.9k | 6d ago | Apache-2.0 | A | 29 | Claude Code, Codex |
| pdf-editingbenchflow-ai/skillsbench | Skill | 1.9k | 6d ago | Apache-2.0 | A | 17 | Claude Code, Codex |
| docxbenchflow-ai/skillsbench | Skill | 1.9k | 6d ago | Apache-2.0 | A | 22 | Claude Code, Codex |
| exoplanet-workflowsbenchflow-ai/skillsbench | Skill | 1.9k | 6d ago | Apache-2.0 | A | 45 | Claude Code, Codex |
| xlsx-parsingbenchflow-ai/skillsbench | Skill | 1.9k | 6d ago | Apache-2.0 | A | 83 | Claude Code, Codex |