Component Patterns (Prismatic)
Konvence pro vlastní komponenty Prismatic pro spectral TypeScript SDK
Otestováno · Funguje
Co umí
Referenční dokumentace pro vytváření vlastních komponent Prismatic s @prismatic-io/spectral SDK: connection definitions, the function-based HTTP client factory, action and trigger structure, data sources, example payloads and build/publish troubleshooting. Načítá se, když vytváříte nebo píšete Prismatic connector or utility component in TypeScript.
Testovací report
Hodnoceno kompilací, nikoli čtením: nainstaloval jsem skutečný @prismatic-io/spectral 10.25.0 z npm a provedl type-checked two versions of the same Canny connector. The no-skill baseline failed tsc because connection() takes a display object rather than a bare label; the skill-guided version compiled with zero errors and additionally carried the six things the baseline omitted entirely — connection-type validation that throws ConnectionError, the spectral HttpClient factory instead of raw axios, debug wiring through context.debug.enabled, clean functions on inputs, an examplePayload per action, and the required rawRequest action. Caveat for standalone use: the skill is a component of the Prismatic plugin, is marked user-invocable:false, and points at a templates directory under the plugin root that does not travel with a plain skills-folder copy. One reference file also still shows a class-based client that the skill's own body lists as an anti-pattern.
Testováno: 2026-08-07 · Claude Code 2.x (agent harness)
Instalace
git clone https://github.com/prismatic-io/prismatic-skills.git mkdir -p ~/.claude/skills cd prismatic-skills && cp -r plugin/skills/component-patterns ~/.claude/skills/component-patterns
Příkazy a ukázkové prompty
/component-patternsKonvence pro vlastní komponenty Prismatic pro spectral TypeScript SDK
Skilly se spouštějí běžnými požadavky — žádné příkazy k zapamatování. Po instalaci ho aktivují prompty jako tyto (anglicky):
Write a Prismatic custom component connection for the Canny APIScaffold a Prismatic action using the spectral HTTP client factoryBuild a Prismatic trigger and data source for this REST API