Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

procedural-style

БесплатноБез исполняемых скриптовНе проверен

Add, change or tune a procedural background style (the Style choice under Background Kind "Procedural", for personal and company banners). Covers the style…

nabondanceот nabondance★ 49 звёзд на GitHub

Об этом скилле

Procedural Style

Every style lives in src/banner/procedural/, draws with plain Canvas 2D (no getImageData/putImageData, so it runs as-is on @napi-rs/canvas) and is seeded: the same profile always gets the same background.

Map

File Holds
styles.js The list shown in both forms (id, name). No canvas imports: the client imports it
index.js DRAWERS (id → draw function) and drawProceduralBackground, which sets the frame, resets the canvas state and falls back to Classic
data.js ProceduralArt (what a style receives) and how it is built from Trailhead data: buildProceduralData (personal), buildCompanyProceduralData (team totals, most-held rank, team hash, limitScale from team size)
canvas.js Frame (W, H), cap(), makeCalm() fade, makePlacer(), paintBase, vignette, glowDot, startStyle
random.js / color.js Seeded random and simplex noise / rank palette (pal.c(hueOffset, s, l, a)), rgba, certification family colors
<style>.js One file per style, with helpers only that style uses

BANNER_SIZES (src/banner/bannerSizes.js) holds each banner type's size and fadeZones, the areas where the art fades so the logo, counters, top badge row and watermark stay readable. Company banners only pass them to Mountains (companyBanner.js): the other styles spread over the whole short canvas.

Style contract

export function drawExample(ctx, art) {
  const { rng, noise, pal } = startStyle(art, 'example'); // the name keeps styles different for one profile
  const calm = makeCalm(); // 1 = free space, lower = under banner content: multiply alphas by calm(x, y)
  // ...draw on W × H; read only `art`, never Trailhead responses
  vignette(ctx);
}
  • Use W and H, never 1584 or 396: the company banner is 1128 × 191.
  • Wrap every count driven by badges or superbadges in cap(), e.g. Math.min(art.superbadges, cap(30)): limits shrink on smaller canvases and grow with team size (art.limitScale).
  • Certification families (art.certs: product, count, color) are the colored highlights; keep them readable with 12+ families.
  • Draw in rng() order: adding or moving an rng() call changes every later shape, so expect the samples to change.
  • Set your own globalCompositeOperation/shadowBlur; vignette() resets them before darkening the edges.

Add a style

  1. Write src/banner/procedural/<id>.js with export function draw<Name>(ctx, art)
  2. Register it in DRAWERS (index.js) and PROCEDURAL_STYLES (styles.js), same id
  3. New data → add the field to ProceduralArt and both builders in data.js; a new Trailhead query also goes in src/utils/queryDependencyCalculator.js (proceduralStats)
  4. node scripts/agent/procedural-samples.mjs regenerates the form samples (public/assets/procedural/<id>.webp)

Check

  1. Render on varied profiles, not only one: low rank with few badges, a 70-certification profile, a team. With the dev server running, generate through POST /api/banner/standard and POST /api/banner/company with backgroundKind: 'procedural' and proceduralStyle: '<id>', and look at the images
  2. Keep each render well under 200 ms on the server
  3. A changed style used by a gallery example → bash scripts/agent/gallery-refresh.sh <id>
  4. bash scripts/agent/verify.sh
Полный SKILL.md на GitHub

Установить procedural-style в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл procedural-style?

Add, change or tune a procedural background style (the Style choice under Background Kind "Procedural", for personal and company banners). Covers the style contract, the shared helpers in src/banner/procedural/, element limits, fade zones, registering a style, regenerating the form samples and checking renders on real profiles. Use when the user wants a new procedural background, or to change how an existing one looks or which Trailhead data drives it.

Как установить скилл procedural-style?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл procedural-style запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить procedural-style с