Model or dataset
crawfordxx/xiaoma-durex-copywriter avatar
crawfordxx/xiaoma-durex-copywriter

xiaoma-durex-copywriter: a Claude Code Skill for two-layer Chinese ad copy and poster layout

杜蕾斯式文案与海报 Skill for Claude Code —— 双层语义方法论 + 8 个文案公式 + 从 260 张原始海报拆解的视觉系统 + AI 出图/代码排版管线

573 stars25 forksPythonNOASSERTION

At a glance

What is it?
The repository packages a methodology extracted from Durex's 2011-2017 Chinese social output into a Skill that writes short copy, then hands the text to code instead of an image model. It is a tool for Chinese-language marketers, not a general copywriting assistant.
Who is it for?
Adopt it if you write Chinese marketing copy and already run Claude Code, because the interactive flow and the split between AI imagery and code typesetting are the parts you cannot easily reproduce by prompting alone. Do not adopt it if your copy is in English, if your product category is regulated or crisis-sensitive, or if you need a batch API rather than a conversational Skill.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
Yes. The repository last received commits 41 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 16, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

The problem: copy that explains its own joke

Most Chinese social copy fails in a specific way. It states the product benefit, then states the pun, then states the pun again for anyone who missed it. The repository's claim is that Durex's 2011-2017 output worked because the writer only ever wrote the surface layer: the hot topic, the holiday, the everyday scene, readable on its own. The brand layer was left for the reader to jump to. The README calls the moment of that jump the传播动力, and states the rule bluntly: 点破即死, explaining the inner layer kills the line.

The Skill is aimed at people who already accept that framing and want it applied to a different category. The README is explicit that the transferable part is the mechanism, not the subject matter: swap the material for an AI course, a workplace account, personal finance or fitness, and the mechanism still holds. It is for Chinese-language marketers running a Claude Code or Claude.ai setup, not for someone who wants a generic slogan generator.

How the two-layer mechanism is enforced in the workflow

The Skill runs as an interactive sequence rather than returning one draft. Step 0 fills missing slots with defaults and writes them as stated assumptions instead of asking, on the argument that a concrete proposal with a visible assumption is more useful than three precise questions. Step 1 returns three to five options that must differ in formula, subject type and colour scheme, and the README forbids them being three variants of one idea. Step 2 merges the only real question into one round covering option choice and aspect ratio, both multi-select. Step 3 writes copy, short by default at twelve characters or fewer, with long-form only on request. Step 4 produces the image.

The README says this default-not-to-ask behaviour came out of evaluation runs, where an early version stopped to ask even when a single slot was missing and invented questions outside the four slots. The evals/ directory is described as holding the test cases and assertions, which means the workflow rules are treated as testable behaviour rather than prose guidance.

Installing the Skill and getting one poster out

Installation is a clone into the Claude Code skills directory. The README gives this exact command, and states the Skill is available the next time Claude Code starts.

bash
git clone https://github.com/crawfordxx/xiaoma-durex-copywriter.git \
  ~/.claude/skills/xiaoma-durex-copywriter

The trigger phrases listed in the README include 写个文案, 借势热点, 节日海报, 想句 slogan, 课程怎么推 and 像杜蕾斯那样写. Typing one of those is what starts the flow; there is no CLI entry point documented.

The image pipeline is a separate, optional install. The README offers two interchangeable routes and says either one is enough.

bash
npm i @napi-rs/canvas      # Canvas 排版
pip install playwright     # HTML 排版(二选一即可)

Canvas is described as the default, and specifically better for graphic arrays such as a full-screen icon matrix, because generating those programmatically beats placing them by hand. HTML/CSS with Playwright is for complex layouts where you want to adjust visually. A third option, Satori plus resvg, is listed for server-side batch work where you would rather not install a browser. The repository layout shows assets/compose_canvas.js and assets/compose_example.py as the two composition scripts.

Why the text is never rendered by the image model

This is the design decision that separates the project from prompt-only poster workflows. The README states that AI image models still produce wrong characters, missing strokes and broken glyph shapes when rendering Chinese, and that the visual system's whole point is precise typography. So the pipeline splits into three stages: the image model produces only still-life props or background texture with NO text required in the prompt; code handles every character, via Canvas or HTML/CSS; then output is written at one of five aspect ratios.

The stated benefits are that Chinese text cannot come out wrong, that keyword colouring and font-size multipliers stay exactly controllable, and that changing the copy means changing one line of code while the still-life image is reused without regeneration. That last point is the practical one. A prompt-only workflow regenerates the whole poster to fix a typo, and the composition drifts.

The visual rules that the code enforces come from what the README describes as a measured teardown of 260 original posters. Copy sits in the upper third or upper left, left-aligned. Body text runs about 3.5 to 4.5 percent of image width. Keywords are enlarged 1.65 to 1.75 times and coloured with the brand colour while everything else stays the same size and colour. The logo is always bottom-centre and must land on empty space, never under the subject. Whitespace is at least 50 percent. The subject decision tree gives measured proportions of roughly 30 percent product subject, 40 percent prop subject and 30 percent pure type, with real people almost never used.

The eight formulas, and the one that should stay rare

The formulas are catalogued in references/copy-formulas.md with a Durex original and a migration example for each. Homophone substitution turns 杜 du 饿了 into 不 AI 则退. Numerical double meaning turns 先来 7 次 into a claim about hours saved. Word-sense hijacking turns 深耕细作 into 深度学习,浅度使用. Scene transplant gives an object a voice. Character decomposition, antithesis, and a three-line poetic form fill out the middle.

Formula 8 is 反向克制, restraint, and the README ranks it highest: not performing the trick when the audience is waiting for it. The example given is the Zhongyuan Festival line 今晚早回家, four characters with no wordplay at all. The recommendation is to use it no more than five times a year, on the reasoning that a brand known for being flippant gains weight by suddenly being serious. That frequency cap is the kind of constraint most copywriting resources avoid, and it is the reason the formula does not become a gimmick.

Where it is the wrong tool

The repository names its own exclusions in references/other-uses.md: strongly regulated categories, crisis PR, audiences with low internet-culture fluency, and large B2B procurement. Those are cases where an inner layer the reader has to jump to is a liability rather than a payoff. The Skill also writes hard boundaries into SKILL.md, five of them, including no disaster, accident, death or illness unless the position is clearly charitable, no objectification of women, and no sexual innuendo aimed at a specific real person. The README ties the 2017 419 co-branding incident and the subsequent loss of the agency to crossing the third boundary, which is a useful reminder that these lines were drawn after a real failure rather than in advance.

Two practical limits matter more for day-to-day use. First, the whole methodology is Chinese-language. The puns, the character decomposition and the font selection are all built around Chinese. Nothing in the repository suggests an English path. Second, the Skill is conversational. It is built for Claude Code and Claude.ai, and nothing in the README describes a batch API, a headless mode or a CI integration. If you need to generate two hundred posters from a spreadsheet overnight, the composition scripts exist but the copy workflow does not appear to.

Fonts and licensing: the part that can actually cost money

The README treats Chinese font licensing as the highest-frequency legal risk in domestic marketing material. Microsoft YaHei, PingFang, the Founder series and the Hanyi series all require commercial authorisation, and the README states plainly that having a font on your computer is not the same as being allowed to use it commercially. It notes that Founder and Hanyi maintain dedicated enforcement teams and that claims for a single poster commonly run from several thousand to tens of thousands of yuan.

references/typography.md is said to contain free-for-commercial-use substitutes across eight font categories plus an authorisation red-line checklist. The two safe defaults named are Source Han Sans and Source Han Serif, under SIL OFL, which permits commercial use and modification. Smiley Sans is suggested when a heading needs weight. This is worth reading before you produce anything, because the layout code will happily set text in a font you have no right to ship.

On the repository's own licensing: the code in assets/ is offered under MIT, but the repository carries a NOASSERTION licence identifier, so the top-level terms are not machine-readable. The README states that the 24 low-resolution Durex posters in examples/durex-reference/ remain the property of Durex and Reckitt Benckiser, are included at 800px or below for study and commentary, and are not for commercial use. It also states the repository has no affiliation with Durex or Reckitt Benckiser and that takedown requests via issue will be honoured. If you plan to redistribute anything from examples/, read the README's copyright section rather than relying on the MIT label.

Editorial conclusion

Adopt it if you write Chinese marketing copy and already run Claude Code, because the interactive flow and the split between AI imagery and code typesetting are the parts you cannot easily reproduce by prompting alone. Do not adopt it if your copy is in English, if your product category is regulated or crisis-sensitive, or if you need a batch API rather than a conversational Skill. Before committing, open references/typography.md and check whether the fonts you currently use are on the commercial-licence red list, then read evals/ to see what behaviour was actually asserted.

Frequently asked questions

Does xiaoma-durex-copywriter work with Claude Code, or can I use it elsewhere?

The README describes it as a Claude Code / Claude.ai Skill and gives an install command that clones the repository into ~/.claude/skills/xiaoma-durex-copywriter, after which it is available the next time Claude Code starts. The image-composition scripts are separate and depend on @napi-rs/canvas or Playwright.

Can xiaoma-durex-copywriter produce English copy?

The repository does not document an English path. The formulas rely on Chinese homophones, character decomposition and word-sense hijacking, and the typography guidance is about Chinese font licensing, so the methodology as described is Chinese-language only.

Are the Durex posters in xiaoma-durex-copywriter free to reuse?

No. The README states that the 24 posters in examples/durex-reference/ remain the property of Durex and Reckitt Benckiser, are included at low resolution for study and commentary, and are not for commercial use. Only the code in assets/ is offered under MIT.

Official sources

  1. crawfordxx/xiaoma-durex-copywriter on GitHub
  2. Issues
  3. README
Community notes

Community notes