agentleFS
Wang-CankunWang-Cankun/cankun-skills/skills/cankun-blog-preview/SKILL.md

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.

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
  1. Distinctive:

    Treat one article slug, including its English and Chinese MDX pair, as the complete transaction.

    line 24
  2. Distinctive:

    Check whether the target already has a preview PNG or WebP.

    line 35
  3. Distinctive:

    Read the target English article fully.

    line 40
  4. Distinctive:

    Read these repository-owned sources rather than copying their contents into this skill:

    line 42
  5. Distinctive:

    When no metaphor is clearly strongest, present at most three concrete candidates and ask the user to choose before generating.

    line 52
  6. Very specific:

    Add or update only the target article's block in content/preview-image-prompts.md.

    line 54
  7. Distinctive:

    No warm ivory, cream, beige, sepia, yellow cast, aged paper, stain, parchment tint, or colored wash.

    line 60
  8. Distinctive:

    No text, letters, numbers, labels, logos, border, signature, or watermark.

    line 61
  9. Distinctive:

    Use the available image-generation skill and tool.

    line 65
  10. Distinctive:

    Use the 09 PNG as Image 1 and as a style/composition reference only.

    line 67
  11. Very specific:

    Write a concise, literal meta.previewAlt in that language.

    line 86
  12. Distinctive:

    Do not edit shared article components when they already derive the adjacent PNG link and render the alternative text as the figure …

    line 88
  13. Distinctive:

    Run only the repository entry point:

    line 92
  14. Very specific:

    Do not invoke Sharp, ImageMagick, or another encoder to create the WebP.

    line 98
  15. Distinctive:

    Verify all of the following before handoff:

    line 102
  16. Distinctive:

    Only the target article's prompt, metadata, PNG, and WebP changed, apart from an explicitly necessary shared fix.

    line 104
  17. Distinctive:

    Run the focused tests and production build when those commands exist:

    line 112
  18. Distinctive:

    Use a clean browser session for the archive and target article.

    line 119
  19. Distinctive:

    Do not commit, push, or deploy unless the user explicitly asks to publish.

    line 123
  20. Distinctive:

    Commit and push the current branch according to repository convention.

    line 126
  21. Distinctive:

    Verify the live WebP, article caption, and PNG original rather than assuming deployment succeeded.

    line 127

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

  1. Confirm the workspace is cankun-blog and contains:
    • content/files/
    • content/preview-image-prompts.md
    • public/images/
    • scripts/optimize-previews.ts
  2. 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.
  3. Inspect git status and preserve unrelated changes.
  4. 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.
  5. Remember that bun run previews scans every public/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.png

The 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.preview to the adjacent .webp URL.
  • Write a concise, literal meta.previewAlt in 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 previews

Do 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 .webp without 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 .png original.
  • 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 build

Use 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:

  1. Stage only the intended article-preview changes.
  2. Commit and push the current branch according to repository convention.
  3. 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.