Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计通过

layercakelayercake 搜索

Agent Skill

layercake 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

214

周安装

9

GitHub Stars

4

下载量

75
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:layercake(layercake 搜索)
来源仓库:https://github.com/linehaul-ai/linehaulai-claude-marketplace
仓库路径:skills/layercake
安装命令:
npx skills add https://github.com/linehaul-ai/linehaulai-claude-marketplace --skill layercake
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/linehaul-ai/linehaulai-claude-marketplace --skill layercake

简介

layercake 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中快速定位候选结果。

  • 适用于需要根据关键词或任务场景进行信息定位的场景,如资料整理或研究支持。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装,需结合原始 README 核验具体用法。
  • 安装前建议确认权限范围和维护状态,注意可能触发联网或文件读写操作。
  • 使用时需核实来源仓库内容,避免依赖未经验证的外部资源。

SKILL.md

Layer Cake Skill

Layer Cake is a foundational visualization framework for Svelte that handles the mathematics of coordinate systems and scales while remaining completely agnostic about visual presentation.

Core Philosophy

Layer Cake follows a "bring your own components" approach. The framework establishes context through reactive Svelte stores, making D3 scales (linear, time, ordinal, log, threshold) and calculated dimensions available to child components via Svelte's context API. Developers build visualization components that consume these stores rather than managing transforms themselves.

Primary Components

LayerCake: The root wrapper establishing context, calculating scales from data extents, managing responsive dimensions, and providing stores for x/y/r scales to children.

Svg, Canvas, Html: Layout containers for different rendering contexts. All coexist in the same coordinate system, allowing hybrid rendering (SVG axes + Canvas marks + HTML tooltips).

Custom Components: Build components that consume stores (xScale$, yScale$, etc.) from context and render visual elements.

Core Concepts

Scales and Dimensions

LayerCake automatically creates D3 scales from data extents. Configure domain/range through props:

  • x, y, r, z: Data accessors for scale dimensions
  • xDomain, yDomain, rDomain: Explicit domain overrides (defaults to data extent)
  • padding: Inner padding applied to container dimensions before scale calculation
  • xScale, yScale, rScale: Custom D3 scale instances (replaces default linear scales)

Data Transformation

Use utility functions before passing to LayerCake:

  • stack() - D3 stack layout for stacked bar/area charts (returns [[[x0, x1],...],...] per series)
  • bin() - D3 bin layout for histograms (returns bins with x0/x1 bounds and data array)
  • groupLonger() - Wide→long pivot (creates groups with nested values array)
  • flatten() - One-level array flattening with accessor support
  • calcExtents() - Calculate min/max across multiple fields, skipping nulls

Rendering Contexts

SVG: Accessibility, interactivity, animations. Suitable for <500 marks. Provides <svg> element with proper dimensions.

Canvas: High-performance 2D rendering for 5000+ points. Access raw canvas context via bind:context. Handles device pixel ratio scaling via scaleCanvas().

HTML: DOM elements (tooltips, labels) positioned in chart space. Use pointerEvents={false} to prevent blocking interactions.

Implementation Patterns

Basic Time Series

<LayerCake x="date" y="temperature" data={weatherData} xScale={scaleTime()}>
  <Svg>
    <AxisX />
    <AxisY />
    <Line stroke="#667eea" />
  </Svg>
</LayerCake>

Stacked Area Chart

Pre-process with stack(), then render stacked series accessing baseline+top values from context.

High-Volume Scatter

Canvas layer for 10,000+ points with SVG axes overlay. Points rendered via canvas context loop over data, accessing scales from context.

Multi-Scale Responsive

Responsive padding adjusts viewable area. Scales reactively recalculate as container resizes. Use reactive statements ($:) to update transforms.

Key Functions Reference

calcExtents(data, fields): Returns {fieldName: [min, max]} for all specified fields, skipping nulls/NaN.

stack(data, keys, options): Transforms wide data to stacked format. Returns array of series, each with [[baseline, value],...] tuples. Each tuple has .data reference to original object.

bin(data, accessor, options): Histogram binning. Returns array of bins, each with x0, x1, and containing data items.

groupLonger(data, keys, options): Pivots wide columns into long format. Returns {group, values: [...]} objects.

flatten(data, accessor?): Flattens one level with optional accessor for nested arrays.

scaleCanvas(ctx, width, height): Handles device pixel ratio scaling. Call once at canvas setup. Returns actual pixel dimensions.

Advanced Techniques

Custom Scales: Pass any D3 scale instance (scaleLog, scalePower, scaleThreshold). Layer Cake calculates ranges but respects custom scale types.

Multiple Datasets: Create separate LayerCake instances or use r dimension for third numeric axis.

Click/Hover Handling: Inverse-scale mouse position via xScale.invert() to find data coordinates.

Legends: Build custom legend components accessing scale domain/range from context.

Accessibility: SVG layout automatically includes ARIA attributes. Add labels and descriptions via component props.

Performance Notes

  • Scale calculations (O(n)) only occur on data/domain changes
  • Responsive dimension updates don't recalculate scales if extents unchanged
  • Canvas rendering ~60fps for 10,000 points on modern devices
  • Avoid for high-volume marks; use Canvas instead
  • Memoize data transforms outside render function lifecycle

Svelte Integration

All reactivity via Svelte stores and reactive statements. When data changes, all subscribed components automatically update. Transitions/animations handled by child components using Svelte animate: and transition: directives.

Works with SvelteKit for SSR and client-side hydration. Context API integrates seamlessly with nested component hierarchies.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

29.91%
按下载量换算22

Gemini CLI

24.75%
按下载量换算19

Antigravity

19.09%
按下载量换算14

windsurf

12.57%
按下载量换算9

Codex

8.24%
按下载量换算6

OpenCode

3.49%
按下载量换算3

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills