Logo von Svg Add Primitive

Svg Add Primitive

Community
ChanMeng666
svg-add-primitive

Add a new reusable motion / shape / filter primitive to lib/primitives/ with safety: JSDoc + sensible defaults + at least one consuming preset + passing snapshot tests + updated docs/lib-api.md + CLAUDE.md index. Use this only when /svg-animate has flagged a missing capability or when the user explicitly asks to "add a primitive", "extend the lib", "teach the system to <verb>", or "I need a new <motion / filter / shape> for ...". This is the only sanctioned path for growing lib/primitives/; do not edit those files directly.

Übersicht

HerausgeberChanMeng666
Repositorysvg-animation-studio
Skill-Namesvg-add-primitive
Sterne
3
Forks
0
Mitgelieferte Dateien
Nur Anweisungen
LizenzMIT
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • In sich abgeschlossen

    Alles, was das Modell braucht, steht in den Anweisungen — keine zusätzlichen Dateien zum Synchronisieren.

  • Open Source

    Von ChanMeng666 auf GitHub veröffentlicht. Prüfen Sie vor der Installation die Quelldateien.

Installation

Installieren Sie den KI-Skill Svg Add Primitive in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner. Dabei liest die App SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/ChanMeng666/svg-animation-studio/tree/main/.claude/skills/svg-add-primitive
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill hinzufügen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.
2

In einem anderen Agenten installieren

Jeder Agent, der das Agent-Skills-Format unterstützt, kann diesen Skill nutzen. Kopieren Sie den Ordner in das Skill-Verzeichnis des jeweiligen Agenten.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ChanMeng666/svg-animation-studio.git /tmp/svg-animation-studio
mkdir -p .claude/skills
cp -r /tmp/svg-animation-studio/.claude/skills/svg-add-primitive .claude/skills/svg-add-primitive
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Svg Add Primitive in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt Svg Add Primitive automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist Svg Add Primitive nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Schlüsseln.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

You are extending the system's vocabulary. A new primitive is a long-term commitment — once shipped, presets will depend on it. Your job is to ship it correctly the first time, not to ship it fast.

What was passed in

$ARGUMENTS is the primitive's category-qualified name (e.g., motion.createOrbit, shapes.createStar, filters.createTurbulence). If the argument is missing or unparseable, stop and ask the calling thread to clarify with format <category>.<name>.

Why this skill exists

Without a gatekept extension path, lib/primitives/ quickly accumulates inconsistent signatures, undocumented functions, and primitives used by no one. The discipline below is what makes the library compound rather than sprawl. See D:\github_repository\svg-animation-studio\docs\extension-protocol.md for the rationale.

Step 1 — Read the existing category

Before adding to lib/primitives/<category>.js, read the whole file. Match:

  • Naming: create<Verb> for actions (createJump), create<Noun> for static elements (createMusicalNote).
  • Return shape:
    • motion.* → { css: string, className: string }
    • shapes.* → raw SVG element string
    • filters.* → <filter> element string
  • Opts pattern: single opts = {} object; destructure with defaults at the top; never positional args.
  • ID generation: motion.* uses uniqueId(prefix) and includes the className in the keyframe name to avoid collisions. shapes.* and filters.* accept id from the caller.
  • Counter reset: not your concern — the preset's compose() calls motion.resetIdCounter() at start.

Step 2 — Write the function

Add the new function to lib/primitives/<category>.js and to its module.exports. Include a 1-line JSDoc above the function explaining what motion / shape / filter it produces and what the key params control. Do not pad the JSDoc with @param lines for every option — the lib-api.md table is the contract for that.

Example skeleton (motion):

js
/** Orbital sweep: an element traces a circle around a center point. */
function createOrbit(opts = {}) {
  const {
    duration = '4s', easing = 'linear',
    radius = 20, centerX = 0, centerY = 0,
    direction = 'cw'
  } = opts;
  const cls = uniqueId('cv-orbit');
  const kf = `kf-${cls}`;
  const sign = direction === 'cw' ? 1 : -1;
  const css = `.${cls} {
  animation: ${kf} ${duration} ${cssEasing[easing]} infinite;
  transform-origin: ${centerX}px ${centerY}px;
}
@keyframes ${kf} {
  0%   { transform: rotate(0deg) translateX(${radius}px) rotate(0deg); }
  100% { transform: rotate(${sign * 360}deg) translateX(${radius}px) rotate(${-sign * 360}deg); }
}`;
  return { css, className: cls };
}

Step 3 — Use it from at least one preset

A primitive that no preset uses is unverified vocabulary. Pick an existing preset that legitimately needs the new primitive, OR — if the user is adding the primitive for a brand-new animation — make sure they're about to write that preset.

If no preset will use it within this session, stop and report:

Need primitive <name> but no consuming preset is being built. Either wait until building one needs it, or write a placeholder preset that demonstrates the primitive (recommended: name it <name>-demo).

Step 4 — Run snapshots

bash
npm test

Three outcomes:

  • All pass → great. Move to step 5.
  • A previously-passing snapshot now differs → you changed a primitive signature used elsewhere, or the export order in module.exports shifted something. Re-examine your diff. If the change is intentional, run npm run snapshot:update AND in your final report flag every affected preset so the caller does a visual recheck.
  • A test errors out (not just snapshot mismatch) → you broke an import. Fix before proceeding.

Step 5 — Document

Two files MUST be updated:

  1. docs/lib-api.md — add an H3 section under the right category with:

    • one-paragraph description
    • opts table (option / type / default)
    • the consuming preset(s)
    • source line range if reverse-engineered from a seed SVG
  2. CLAUDE.md — add a one-line entry under lib/primitives/<category>.js in the "lib API index" section. Format: - \createOrbit` — orbital sweep around a center point`

Increment the count in CLAUDE.md (e.g., "(10)" → "(11)").

Step 6 — Report

Return a one-block report. Keep it short.

EXTENDED: motion.createOrbit
Signature: createOrbit({ duration, easing, radius, centerX, centerY, direction })
Used by: <preset slug>
Tests: <pass | updated snapshots: list>
Docs: docs/lib-api.md, CLAUDE.md

What you must NOT do

  • ❌ Edit lib/primitives/*.js for any reason other than this skill.
  • ❌ Add a primitive with no consuming preset.
  • ❌ Skip the docs update — undocumented primitives become invisible to future sessions and rot quickly.
  • ❌ Use positional args. The convention is one opts object.
  • ❌ Forget module.exports — the function exists in memory but no one can use it.
  • ❌ Run npm run snapshot:update without explicit reason. Snapshots that silently change are bug seeds.

When the primitive doesn't fit any category

If motion, shapes, filters doesn't seem right — stop and propose a new category. This is rare (we've seen easing cover one edge case). Adding a fourth category is a design decision, not a routine extension. Ask the calling thread before proceeding.

Häufig gestellte Fragen

Was macht der KI-Skill Svg Add Primitive?

Add a new reusable motion / shape / filter primitive to lib/primitives/ with safety: JSDoc + sensible defaults + at least one consuming preset + passing snapshot tests + updated docs/lib-api.md + CLAUDE.md index. Use this only when /svg-animate has flagged a missing capability or when the user explicitly asks to "add a primitive", "extend the lib", "teach the system to <verb>", or "I need a new <motion / filter / shape> for ...". This is the only sanctioned path for growing lib/primitives/; do not edit those files directly.

Warum Svg Add Primitive in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Svg Add Primitive besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich Svg Add Primitive in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/ChanMeng666/svg-animation-studio/tree/main/.claude/skills/svg-add-primitive ein. TypingMind liest die Datei SKILL.md und installiert den Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Svg Add Primitive nutzen?

Jedes Modell, das Sie mit TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit Svg Add Primitive verwenden?

So viele Sie möchten. In TypingMind können Sie Svg Add Primitive mit jedem Modell verwenden, das Skills unterstützt, etwa mit GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama. Dabei nutzen Sie Ihre eigenen API-Schlüssel.

Ist der KI-Skill Svg Add Primitive kostenlos?

Ja. Der Skill wird von ChanMeng666 auf GitHub unter der Lizenz MIT veröffentlicht. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: Die Datei SKILL.md enthält den Namen und die Beschreibung des Skills. Hinzu kommen bei Bedarf Skripte, Vorlagen oder Referenzdateien für das Modell. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und kommen daher ohne Server, API-Schlüssel und Laufzeitumgebung aus. Sie funktionieren mit jedem Modell.

Alle anzeigen

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇