Docx conditionals
Skill cxcscmu/SkillLearnBench/skills/b1-one-shot-claude-opus-4-6/offer-letter-generator/docx-conditionals
[COLM'26] SkillLearnBench is the first benchmark for evaluating continual learning methods that automatically generate agent skills.
npx -y skills add cxcscmu/SkillLearnBench --skill docx-conditionalsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
What its author says it does
Copied from the file, not written here
Handle conditional sections in Word templates with IF/END_IF markers, removing or keeping content based on data values.
SKILL.md
0.8 KB, as published. Nobody here has run it
Conditional Sections in Word Templates
Pattern
Templates use {{IF_TAG}}content{{END_IF_TAG}} to mark conditional content.
Logic
- Check the data field (e.g.,
RELOCATION_PACKAGE) for "Yes"/"No" - If "Yes": strip the
{{IF_RELOCATION}}and{{END_IF_RELOCATION}}markers, keep inner content - If "No": remove the entire block including markers and content
- Handle the case where conditional markers and content may span a single paragraph or multiple paragraphs
Implementation Note
Process conditionals BEFORE placeholder replacement, since the conditional content may itself contain placeholders that should only be replaced if the section is kept.