Home / All Skills / Design & Motion / social-carousel
Design & Motion · nexu-io/html-anything

social-carousel

3 square card carousel, connected headlines, brand mark + numbering

L3 Networked · Declare domain & key scopeV1 Commit-PinnedNetwork AccessDual-pass Audit
Author nexu-ioGitHub nexu-io/html-anything ↗Stars 8827License Apache-2.0(仓库根 LICENSE = Apache License 2.0;GitHub API spdx_id=Apache-2.0)Commit 553ed98c28
Control levels describe skill capabilities and suggested control measures; they do not represent quality or safety certifications, nor do they dictate usability. Usage decisions rest entirely with users and administrators. Different agent hosts apply varying constraints; do not assume hosts provide automatic protection. Third-party skill copyrights belong to their original authors. Use at your own risk.

1How It Works & Mechanism

This template is purely data within a "folder-as-template" architecture: SKILL.md uses YAML frontmatter for selector indexing, and the body provides layout directives for the agent. The repository contains no custom code for individual templates; adding a template simply means adding a folder.

next/src/lib/templates/loader.ts
SKILL.md — frontmatter (id, scenario, tags, …) + prompt body
loader.ts states the directory conventions in its file header comments. Frontmatter is parsed via in-process regex (no YAML dependencies), and the body is extracted verbatim as the prompt body without exposing it to the frontend ("Body is excluded so we can return the entire registry in one cheap fetch without shipping prompt text to the browser.").

At runtime, the host sandwiches this template body between shared design directives and user content to compose a single prompt—the template's "intelligence" resides entirely within this natural language text, with no executable code.

next/src/lib/templates/shared.ts
return `${SHARED_DESIGN_DIRECTIVES} ${opts.body.trim()}
The output of assemblePrompt is "shared design directives + template body + [input format] + [user content]". The shared section (SHARED_DESIGN_DIRECTIVES in the same file) enforces strict constraints such as single-file HTML, Tailwind/font CDN usage, content-driven quantity, and prohibiting filesystem tools across all templates; it is not bundled into this specific template.

After loading the template, the host's /api/convert passes the assembled prompt to a locally authenticated coding-agent CLI and captures stdout as streamed HTML. The template itself performs no network requests, credential reads, or disk writes.

next/src/app/api/convert/route.ts
prompt = assemblePrompt({ body: skill.body, content, format });
The same route then invokes invokeAgent({ … }) to spawn a CLI (claude / codex / cursor-agent, etc., detected via host PATH). Its companion shared directives explicitly state: "**Prohibit using Write / Edit / MultiEdit / Bash / Create / any filesystem tools**".

The accompanying example.html serves as a "pre-rendered example" delivered directly by the preview API into iframes within selectors and galleries—it provides a visual preview for the template card without participating in content generation.

next/src/app/api/templates/[id]/preview/route.ts
Returns the skill's `example.html` verbatim so it can be loaded into an
Previews are cached by skill id (Cache-Control: public, max-age=300). The frontend adds sandbox="allow-scripts allow-same-origin" to the iframe in the preview panel (a host-side implementation outside the template's control).

Frontmatter fields are mapped item-by-item into selector metadata (featured controls global sorting, recommended places items in the top "★ Recommended" group, and example_* generates example card copy), determining their placement across category/scenario filters.

next/src/lib/templates/loader.ts
if (typeof fm.featured === "number") meta.featured = fm.featured;
fmToMeta directly maps category/scenario/aspectHint/tags into SkillMeta. The example block is generated when example_id or example.{md,html} exists (id/name/format/tagline/desc + optional source). These fields only influence display and sorting, not generation behavior.

All generative capabilities of this template are fulfilled entirely by its own body: social-carousel/SKILL.md solely outlines layout, color palette, typography, and content discipline, containing no instructions for the agent to execute tools, fetch APIs, or read external data.

next/src/lib/templates/skills/social-carousel/SKILL.md
【模板: 三联社交轮播 / Social Carousel】
The skill directory contains only 2–3 files (SKILL.md + example.html [+ example.md]), with no scripts, references, or data files. example.html is merely a manually authored sample artifact of this template (see internal_assets).

The template fixes the task into three 1080×1080 square cards, requiring a headline that connects continuously across the sequence.

next/src/lib/templates/skills/social-carousel/SKILL.md
【意图】3 张 1080×1080 方形卡片, headline 跨张串联。

Each of the three cards serves a distinct role: Card 1 handles the opening + brand mark + numbering; Card 2 provides the middle section + visual emphasis; Card 3 delivers the conclusion + CTA + loop icon.

next/src/lib/templates/skills/social-carousel/SKILL.md
- Card 1: display headline (开头) + 品牌 mark + 1/3

The headline connection is a hard constraint: concatenating the three headlines must form a complete sentence, dictating how the content is segmented.

next/src/lib/templates/skills/social-carousel/SKILL.md
- 三个 headline 拼起来是完整一句话

The color scheme requires "a unified color palette with progressive transitions between cards," ensuring the three cards read as a cohesive set when viewed together.

next/src/lib/templates/skills/social-carousel/SKILL.md
- 颜色统一一套调色板, 卡片之间渐进切换

The sample artifact validates this structure using three article.card elements (c1/c2/c3) alongside numbering 01/02/03.

next/src/lib/templates/skills/social-carousel/example.html
<span class="badge">SERIES · 01 → 03</span>

2Core Capabilities

013× 1080×1080 square card set (versatile for IG / LinkedIn / Threads)
02Continuous cross-card copy (headline segmented into opening / middle / conclusion)
03Brand mark and 1/3, 2/3, 3/3 numbering system
04Visual focal point in the middle card + CTA and loop icon on the final card
05Single color palette with progressive transitions across cards
06Sample artifact: three rendered article.card elements (c1/c2/c3) + sequence numbering 01→03

3External Dependencies

KindDependency / Endpoint
networkGoogle Fonts(仅出现在产物示例 example.html)
cli本地 coding-agent CLI(宿主提供,模板自身不调用)

4Recommended Governance & Evidence

Suggested Controls for Safe Operation
For Agent Runtime
Declare allowed domains and key scope
For Administrators
Least privilege keys, retain request logs
Evidence & Triggers (File Paths & Excerpts)
  • 网络端点: Declared external network access: fonts.googleapis.com (via <link> in example.html, loaded by the browser during preview)
Audit Notes: Evaluation target = this skill directory (SKILL.md + example.html [+ example.md]): contains no bundled scripts, reads no credentials, executes no disk-write commands, and demands no external endpoints at runtime. The body specifies only layout, palette, font family names, and content discipline; font family names do not constitute requests. External links present within the directory exist purely as "sample artifacts," evidenced as follows: fonts.googleapis.com (line 9 <link> in example.html, Instrument Serif + IBM Plex Mono); contains no Tailwind CDN and no JS. Per Batch 4 standards (endpoints appearing solely in sample artifacts/attribution citations → green), this does not impact security tiering. Host-side operations (loader.ts reading disk, assemblePrompt composing prompts, agents/invoke.ts invoking local CLIs, preview iframe using sandbox="allow-scripts allow-same-origin") are documented under verdict.risks and do not govern the rating.

5Second-Pass Verification

  • [ok] skill 目录的脚本 / 网络 / 凭证 / 写盘面 — 目录仅 SKILL.md / example.html 2 个文件,无 scripts/references/数据目录;token 扫描(curl / wget / fetch / exec / spawn / process.env / API_KEY / token / secret / write / save / delete)在该目录的 SKILL.md 中零命中;无自带可执行脚本。
  • [ok] 运行时链路复核 — 重读 loader.ts / shared.ts / app/api/convert/route.ts / app/api/templates/[id]/preview/route.ts:模板正文只作为 prompt body 被 assemblePrompt 拼装,宿主 spawn 本地 CLI 并捕获 stdout;模板不参与任何执行。
  • [ok] commit 与元数据 — 工作副本 git HEAD = 553ed98c283f9c0f489902d035416a972d6a9699(=任务表 pin 的 full 40 位);GitHub API nexu-io/html-anything:stars 8827、license spdx Apache-2.0、pushed_at 2026-09-15T03:36:24Z(与本地 HEAD 提交时间 2026-09-15 11:36:24 +0800 一致)。
  • [discrepancy] README 与源码的 frontmatter schema 漂移(仓库级) — README 第 213 / 217 / 468 行称模板 frontmatter 必须含 mode · scenario · surface · preview · design_system;但在 next/src/lib/templates/skills/ 下 '^mode:'、'^surface:'、'^design_system:' 全部零命中,实际字段是 category / scenario / aspect_hint / featured / recommended + example_*(loader.ts 的 SkillFrontmatter)。文档滞后于代码,不影响本模板运行,但照 README 新写模板会踩空。
  • [ok] frontmatter 元数据映射 — loader.ts fmToMeta 逐字段映射 zhName / enName / emoji / description / category / scenario / aspectHint / tags + featured / recommended + example 卡;本模板取自 SKILL.md 的实际取值与之相符。
  • [ok] example.html 与 SKILL.md 的一致性 — 正文的三张卡 + 编号 + 调色板渐进都能在示例找到对应:三处 <article class="card cN">、.index 01/02/03、badge「SERIES · 01 → 03」;编号写法由「1/3」变为「01 · …」,属同义实现。
  • [ok] 端点扫描(目录内) — social-carousel 目录仅 1 个外部端点:fonts.googleapis.com(example.html 第 9 行);<script> 零命中,动画/布局纯 CSS。
  • [ok] 「1080×1080」是否真的落到画布 — 示例在 .card 上用 aspect-ratio: 1 / 1 固定成正方形(配合 max-width),并非只写在标题里。

6Verdict & Scenarios

  • Hardcodes the three-panel structure (opening/middle/conclusion + numbering + brand mark) to deliver a cohesive set on the first generation
  • Headline concatenation rules enforce strict content segmentation, prompting the model to refine narrative flow before designing the layout
  • Progressive palette requirements prevent visual clash when all three cards are viewed side by side
  • Sample artifact uses aspect-ratio: 1 / 1 to lock a true square format, ready for direct screenshotting as image cards
  • Best for: Ideal for social media creators (IG / LinkedIn / Threads) breaking a long viewpoint into three square image cards, or for compact brand micro-series requiring instant visual cohesion.
    Not for: Not suitable for dense single-image information (strictly enforces a 3-card structure), brands requiring exact layout numerical grids (body specifies elements rather than grids), or video/dynamic animation requirements—outputs are static HTML cards.
    Install Agent-Ready
    ① Verified Mirror 2026-09-15
    Option A · Direct DownloadDownload social-carousel.tar.gz
    sha256: 285eb81de0f98ec8…
    Option B · Copy Guide for Agent
    install.json
    Agents automatically download and verify mirrors from this JSON guide.
    ② Upstream GitHub
    GitHub Repo ↗
    Pinned to commit 553ed98c28.