cankun-blog-preview
Skill2 starsChanged 32 days agoMITView on GitHub
Generate and integrate exactly one article preview image for cankun-blog by inferring one visual metaphor from a target MDX post, maintaining the Franklin Booth-inspired neutral-white series, updating the prompt manifest, creating the 2000×800 PNG original, running the repository optimizer for the 1400×560 WebP, wiring bilingual alt text and the full-resolution link, validating, and optionally publishing. Use when the user asks to add, make, generate, refresh, replace, or remake a preview, hero, or cover image for one existing or newly added cankun-blog article.
In this repository13 other files it gives its agents.
- ambitionSkill
- art-photo-quiet-lightSkill
- art-poster-mondoSkill
- common-groundSkill
- conferSkill
- crewSkill
- fleetSkill
- known-unknownsSkill
- meeting-audio-reportSkill
- repo-wayfinderSkill
- skill-releaseSkill
- tasteSkill
- travel-dossierSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
21 rules. About 0 are common, 18 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈18
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
Treat one article slug, including its English and Chinese MDX pair, as the complete transaction.
- Distinctive: line 35
Check whether the target already has a preview PNG or WebP.
- Distinctive: line 40
Read the target English article fully.
- Distinctive: line 42
Read these repository-owned sources rather than copying their contents into this skill:
- Distinctive: line 52
When no metaphor is clearly strongest, present at most three concrete candidates and ask the user to choose before generating.
- Very specific: line 54
Add or update only the target article's block in content/preview-image-prompts.md.
- Distinctive: line 60
No warm ivory, cream, beige, sepia, yellow cast, aged paper, stain, parchment tint, or colored wash.
- Distinctive: line 61
No text, letters, numbers, labels, logos, border, signature, or watermark.
- Distinctive: line 65
Use the available image-generation skill and tool.
- Distinctive: line 67
Use the 09 PNG as Image 1 and as a style/composition reference only.
- Very specific: line 86
Write a concise, literal meta.previewAlt in that language.
- Distinctive: line 88
Do not edit shared article components when they already derive the adjacent PNG link and render the alternative text as the figure …
- Distinctive: line 92
Run only the repository entry point:
- Very specific: line 98
Do not invoke Sharp, ImageMagick, or another encoder to create the WebP.
- Distinctive: line 102
Verify all of the following before handoff:
- Distinctive: line 104
Only the target article's prompt, metadata, PNG, and WebP changed, apart from an explicitly necessary shared fix.
- Distinctive: line 112
Run the focused tests and production build when those commands exist:
- Distinctive: line 119
Use a clean browser session for the archive and target article.
- Distinctive: line 123
Do not commit, push, or deploy unless the user explicitly asks to publish.
- Distinctive: line 126
Commit and push the current branch according to repository convention.
- Distinctive: line 127
Verify the live WebP, article caption, and PNG original rather than assuming deployment succeeded.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Generate one Cankun blog preview
Treat one article slug, including its English and Chinese MDX pair, as the complete transaction. Never turn a single-article request into an archive-wide regeneration.
Preflight
- Confirm the workspace is
cankun-blogand contains:content/files/content/preview-image-prompts.mdpublic/images/scripts/optimize-previews.ts
- Resolve exactly one target slug. If the user did not name it, select it only when exactly one English MDX article lacks preview metadata; otherwise ask which article.
- Inspect
git statusand preserve unrelated changes. - Check whether the target already has a preview PNG or WebP. Overwrite it only when the user explicitly asked to refresh, replace, remake, or restyle it; otherwise report the existing asset and stop.
- Remember that
bun run previewsscans everypublic/images/**/*-preview.png. Check for unrelated stale sources before running it; stop and report a scope conflict if the command would regenerate another article's WebP.
Read the sources of truth
Read the target English article fully. Read its Chinese pair when present so the alternative text can be localized accurately.
Read these repository-owned sources rather than copying their contents into this skill:
content/preview-image-prompts.md— current series contract and per-article prompts.public/images/shape-of-not-knowing/known-unknowns-preview.png— visual style anchor.scripts/optimize-previews.ts— the only publication resize and WebP compression implementation.
Define one visual metaphor
Infer the image from the article's argument, not its title alone. Reduce it to one subject, one action or tension, and one spacious setting. Avoid collages and stacks of symbols.
When no metaphor is clearly strongest, present at most three concrete candidates and ask the user to choose before generating.
Add or update only the target article's block in content/preview-image-prompts.md. Preserve the existing prompt structure. Require all of the following:
- An original pen-and-ink illustration inspired by Franklin Booth's engraving-like technique.
- Charcoal-black linework and neutral-gray hatching.
- A clean neutral pure-white (
#ffffff) paper field continuous to every edge. - An exact 5:2 panoramic composition with essential subjects in the central horizontal band.
- No warm ivory, cream, beige, sepia, yellow cast, aged paper, stain, parchment tint, or colored wash.
- No text, letters, numbers, labels, logos, border, signature, or watermark.
Generate exactly one image
Use the available image-generation skill and tool.
- Use the 09 PNG as Image 1 and as a style/composition reference only.
- For an explicit remake, use the current target PNG as Image 2 for subject continuity.
- State that the requested result is a new rendering, not a recolor.
- Generate only the target article's preview.
- Inspect the result before installing it.
Save the full-resolution original under the target article's existing naming convention:
public/images/<article-image-directory>/<name>-preview.pngThe installed PNG must be exactly 2000×800. If the image tool returns a nearby unsupported canvas size, perform one high-quality crop/scale to normalize the PNG. This normalization is only for the full-resolution source; do not create or resize the publication WebP manually.
Integrate the article
In both MDX language variants when present:
- Set
meta.previewto the adjacent.webpURL. - Write a concise, literal
meta.previewAltin that language.
Do not edit shared article components when they already derive the adjacent PNG link and render the alternative text as the figure description. Change shared code only when the existing contract cannot support the target article.
Generate the publication asset
Run only the repository entry point:
bun run previewsDo not invoke Sharp, ImageMagick, or another encoder to create the WebP. Verify that the target output is adjacent to the PNG, 1400×560, WebP, and newer than its source. Run bun run previews again and require the target to be reported up to date.
Validate
Verify all of the following before handoff:
- Only the target article's prompt, metadata, PNG, and WebP changed, apart from an explicitly necessary shared fix.
- The PNG is 2000×800 and the WebP is 1400×560.
- The archive loads the target
.webpwithout a broken image. - The image's white field visually merges into the page background.
- The article shows the localized short description and a link to the
.pngoriginal. - The original link opens a 2000×800 image.
- Social metadata uses the 1400×560 WebP dimensions.
Run the focused tests and production build when those commands exist:
bun test scripts/optimize-previews.test.ts app/preview-image.test.ts
bun run buildUse a clean browser session for the archive and target article. Check console errors and broken images.
Publish only on request
Do not commit, push, or deploy unless the user explicitly asks to publish. When publishing is requested:
- Stage only the intended article-preview changes.
- Commit and push the current branch according to repository convention.
- Verify the live WebP, article caption, and PNG original rather than assuming deployment succeeded.
Report the target slug, installed paths, dimensions and sizes, optimizer first/second-run result, validation result, and live URL when published.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

