$npx -y skills add PolicyEngine/policyengine-claude --skill policyengine-contentGenerate branded social assets from a PolicyEngine blog post or announcement — 1200x630 social images and platform-optimized post copy for LinkedIn/X, localized for UK/US audiences. Triggers: "make a social image", "social card for this post", "generate content", "LinkedIn post f
| 1 | # PolicyEngine content generation |
| 2 | |
| 3 | Turn a published post or announcement into shareable social assets: a 1200x630 image and |
| 4 | platform copy. This skill supplies the template and the token/brand rules; the workflow itself |
| 5 | runs through a command and agent. |
| 6 | |
| 7 | ## Workflow entry |
| 8 | |
| 9 | - **`/generate-content`** (command) is the entry point. It takes a `source` (post URL or file), |
| 10 | `audiences` (default `uk,us`), and `outputs` (default `all`). |
| 11 | - It dispatches the **`content-orchestrator`** agent, which parses the source, generates |
| 12 | localized variants, fills this skill's template, and renders each image by screenshotting the |
| 13 | filled HTML in **headless Chrome** (`--headless --screenshot --window-size=1200,630`). |
| 14 | - The **`neutrality-reviewer`** agent then checks the generated copy for advocacy, speculation, |
| 15 | or one-sided framing before anything is published. |
| 16 | |
| 17 | Do not hand-render assets when the command exists — invoke `/generate-content` and let the agents |
| 18 | own the mechanics. Follow the **policyengine-writing** skill for the copy's tone and neutrality. |
| 19 | |
| 20 | ## The template (live) |
| 21 | |
| 22 | `templates/social-image.html` in this skill dir is the live template the orchestrator fills and |
| 23 | screenshots. Keep it. It renders standalone in headless Chrome, so it carries literal hex values |
| 24 | (dark background `#1a2332`, teal accents) rather than importing a stylesheet — headless Chrome |
| 25 | does not resolve the app's CSS. Its `{{placeholders}}`: |
| 26 | |
| 27 | ``` |
| 28 | headline_prefix, headline_highlight, subtext, badge, flags, |
| 29 | quote, attribution_name, attribution_title, headshot_url, logo_url |
| 30 | ``` |
| 31 | |
| 32 | Notes that matter for Chrome-headless rendering: position the logo with `top:` not `bottom:`; |
| 33 | inline external images as data URIs (or download them locally first) so they load; always |
| 34 | preview the rendered PNG before using it. |
| 35 | |
| 36 | ## Design tokens |
| 37 | |
| 38 | The source of truth for color is **`@policyengine/ui-kit`** (`theme.css`), not any older package. |
| 39 | In app/chart/SVG contexts, import the theme and reference CSS variables — never hardcode hex: |
| 40 | |
| 41 | ```css |
| 42 | @import "tailwindcss"; |
| 43 | @import "@policyengine/ui-kit/theme.css"; |
| 44 | /* then: var(--primary), var(--chart-1), var(--border), var(--color-gray-400) */ |
| 45 | ``` |
| 46 | |
| 47 | | Role | ui-kit variable | Hex | |
| 48 | |------|-----------------|-----| |
| 49 | | Primary teal | `--primary` (a.k.a. `--color-teal-600`) | #2C7A7B | |
| 50 | | Bright teal (highlight) | `--color-teal-500` | #319795 | |
| 51 | | Light teal | `--color-teal-200` | #81E6D9 | |
| 52 | | Muted text | `--color-gray-400` | #9CA3AF | |
| 53 | | Surface / card | `--background`, `--card` | theme-dependent | |
| 54 | |
| 55 | The standalone template is the one place literal hexes are correct; keep its palette in step with |
| 56 | these ui-kit values. Do **not** use the deprecated `@policyengine/design-system` package or its |
| 57 | `--pe-color-*` variable prefix. <!-- stale-ok --> The `@policyengine/design-system` `--pe-color-*` tokens are retired; migrate any lingering reference to the ui-kit variables above. |
| 58 | |
| 59 | Broader chart and social-image visual standards live with the **policyengine-design** skill. |
| 60 | |
| 61 | ## Typography and logo |
| 62 | |
| 63 | - Font: Inter — headlines 800 weight, `-0.02em` tracking; labels 700, uppercase, `0.1em` tracking. |
| 64 | - Logo: use the PolicyEngine logo from ui-kit or a checked-in local asset; never hotlink a raw |
| 65 | GitHub URL. White logo on dark backgrounds, teal on light; minimum height ~28px. |
| 66 | |
| 67 | ## Audience localization |
| 68 | |
| 69 | | Aspect | UK | US | |
| 70 | |--------|----|----| |
| 71 | | Spelling | modelling, centre, organisation | modeling, center, organization | |
| 72 | | PM reference | 10 Downing Street | UK Prime Minister's office | |
| 73 | | Framing | direct announcement | "same tech that powers PolicyEngine US" | |
| 74 | | Flags | UK | US + UK | |
| 75 | | NSF/POSE mention | omit | include if relevant | |
| 76 | |
| 77 | ## Related skills |
| 78 | |
| 79 | - **policyengine-writing** — tone and neutrality for the post copy. |
| 80 | - **policyengine-design** — chart and social-image visual standards, ui-kit usage. |
| 81 | - **policyengine-research-lookup** — find the source post to promote. |