Agent skill

SDK Embedding

by live-codes in live-codes/livecodes

Create and configure embedded playgrounds using createPlayground(), EmbedOptions, container setup, loading modes (eager/lazy/click), and appUrl for self-hosted instances.

MITAuto-check passedAI & LLM Engineering

Install SDK Embedding

skills CLI
$ npx skills add live-codes/livecodes --skill sdk-embedding -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install live-codes/livecodes sdk-embedding --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/live-codes/livecodes.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/livecodes/sdk-embedding .claude/skills/sdk-embedding && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
sdk-embedding
GitHub stars
1.5k
Token cost
~1.5k tokens
SKILL.md length
266 words
Files
1
Skills in repo
15
Repo updated
First seen
Licence
MIT

At a glance

Create and configure embedded playgrounds using createPlayground(), EmbedOptions, container setup, loading modes (eager/lazy/click), and appUrl for self-hosted instances.

  • Tasks that involve Embeddings
  • SKILL.md covers Setup, Core Patterns and Common Mistakes
  • Reaches cdn.jsdelivr.net and gist.github.com
  • Tasks that involve Third-party API integration

What it does

SDK Embedding is an agent skill from live-codes/livecodes. Create and configure embedded playgrounds using createPlayground(), EmbedOptions, container setup, loading modes (eager/lazy/click), and appUrl for self-hosted instances. Load this skill when embedding LiveCodes in web pages, configuring playground containers, or setting up SDK integration.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering, covering Embeddings and Third-party API integration. The repository describes itself as: A Code Playground That Just Works! The licence is MIT.

When your agent uses it

  • Tasks that involve Embeddings
  • Tasks that involve Third-party API integration

Example prompts

  • “/sdk-embedding”

What it can do on your machine

Read from SKILL.md and the folder at commit 5754e89. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are javascript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • cdn.jsdelivr.net
    • gist.github.com
    • livecodes.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

SDK Embedding loads about 1.5k tokens when it runs. Until then it costs about 76 tokens; SKILL.md has 266 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~76
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from live-codes/livecodes at commit 5754e89, republished under its MIT licence (© live-codes). 266 words, ~1,488 tokens.

Download SKILL.mdSave it as .claude/skills/sdk-embedding/SKILL.md (or your agent's skills folder).
name
sdk-embedding
description
Create and configure embedded playgrounds using createPlayground(), EmbedOptions, container setup, loading modes (eager/lazy/click), and appUrl for self-hosted instances. Load this skill when embedding LiveCodes in web pages, configuring playground containers, or setting up SDK integration.
metadata.type
core
metadata.library
livecodes
metadata.library_version
0.13.0
sources
live-codes/livecodes:docs/docs/sdk/js-ts.mdx, live-codes/livecodes:src/sdk/index.ts, live-codes/livecodes:src/sdk/models.ts

LiveCodes — Create Embedded Playground

LiveCodes is a client-side code playground that runs in the browser. Use createPlayground to embed interactive code editors in any web page.

Setup

javascript
import { createPlayground } from 'livecodes';

// Minimal embed with template
createPlayground('#container', {
  template: 'react',
});

// Embed with custom code
createPlayground('#container', {
  config: {
    markup: { language: 'html', content: '<h1>Hello World</h1>' },
    style: { language: 'css', content: 'h1 { color: blue; }' },
    script: { language: 'javascript', content: 'console.log("Hello");' },
  },
});

// CDN usage (no bundler)
import { createPlayground } from 'https://cdn.jsdelivr.net/npm/livecodes';
createPlayground('#container', { template: 'vue' });

Core Patterns

Load playground lazily

Playgrounds load when they approach the viewport by default. Use loading: 'eager' for immediate load or loading: 'click' for click-to-load.

javascript
createPlayground('#container', {
  template: 'react',
  loading: 'click', // Shows "Click to load" screen
});
Configure via query params

For simple cases, use URL-style params instead of full config objects.

javascript
createPlayground('#container', {
  params: {
    html: '<h1>Hello</h1>',
    css: 'h1 { color: blue; }',
    js: 'console.log("Hello")',
    console: 'open',
  },
});
Use self-hosted instance

Point to your own LiveCodes deployment.

javascript
createPlayground('#container', {
  appUrl: 'https://playground.mywebsite.com',
  template: 'react',
});
Multiple sources priority

When providing multiple config sources, they override in order: template < import < config < params.

javascript
createPlayground('#container', {
  template: 'react', // Lowest priority
  import: 'https://gist.github.com/...', // Overrides template
  config: {
    /* ... */
  }, // Overrides import
  params: { js: '...' }, // Highest priority
});
Generate shareable URL

Create a link to the standalone app without embedding.

javascript
import { getPlaygroundUrl } from 'livecodes';

const url = getPlaygroundUrl({
  config: {
    markup: { language: 'markdown', content: '# Hello World' },
  },
});
// url = "https://livecodes.io/#config/..."
Compress config for sharing

Compress a stringified config object for use in URL hashes or compact storage.

javascript
import { compress } from 'livecodes';

const config = {
  markup: { language: 'html', content: '<h1>Hello World</h1>' },
};
const compressed = compress(JSON.stringify(config));
Decompress config

Decompress a string that was compressed with compress. Returns null if decompression fails.

javascript
import { decompress } from 'livecodes';

const decompressed = decompress(compressedString);
if (decompressed) {
  const config = JSON.parse(decompressed);
}

Common Mistakes

HIGH Container element not found throws error

Wrong:

javascript
createPlayground('#nonexistent-container', { template: 'react' });
// Throws: "Cannot find element: \"#nonexistent-container\""

Correct:

javascript
// Ensure container exists before calling
const container = document.querySelector('#container');
if (container) {
  createPlayground('#container', { template: 'react' });
}

// Or use headless mode (container optional)
createPlayground({
  view: 'headless',
  config: {
    /* ... */
  },
});

createPlayground throws if the container selector matches no elements. In headless mode (headless: true), the container parameter is optional.

Source: src/sdk/index.ts — throws "Cannot find element" for invalid container

HIGH Calling SDK methods after destroy() throws error

Wrong:

javascript
const playground = await createPlayground('#container', options);
await playground.destroy();
await playground.run(); // Throws: "Cannot call API methods after calling `destroy()`."

Correct:

javascript
const playground = await createPlayground('#container', options);
await playground.run();
// Use SDK methods while playground exists...
await playground.destroy(); // Last call — no more methods after this

Once destroy() is called, all subsequent SDK method calls throw with the message "Cannot call API methods after calling destroy()."

Source: src/sdk/index.ts — alreadyDestroyedMessage constant

MEDIUM Invalid appUrl throws error

Wrong:

javascript
createPlayground('#container', {
  appUrl: 'my-playground', // Not a valid URL
});
// Throws: "my-playground is not a valid URL."

Correct:

javascript
createPlayground('#container', {
  appUrl: 'https://playground.example.com',
  template: 'react',
});

The appUrl must be a parseable URL string. Use the full URL including protocol.

Source: src/sdk/index.ts — URL parsing in getPlaygroundUrl

MEDIUM SDK method timeout after 60 seconds

SDK calls timeout after 60 seconds if the playground doesn't respond.

javascript
// This can timeout if playground has infinite loop or slow WASM load
await playground.run(); // Times out after 60s

Handle with try/catch for long-running operations:

javascript
try {
  await playground.run();
} catch (error) {
  if (error.message.includes('timed out')) {
    console.error('Playground timed out');
  }
}

Source: src/sdk/index.ts — API_TIMEOUT = 60_000 (60 seconds)

© live-codes, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/livecodes/sdk-embedding of live-codes/livecodes.

Open the folder on GitHubat commit 5754e89

Compare with similar skills

SDK Embedding next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

SDK Embedding compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
SDK Embedding this skilllive-codes/livecodes1.5k—~1.5kAutomated safety check: PassMIT
Blog GoogleAgriciDaniel/claude-blog2.3k1 repos~3.3kAutomated safety check: NotesMIT
Chroma Vector DatabaseOrchestra-Research/AI-Research-SKILLs13k8 repos~2.3kAutomated safety check: PassMIT
CLIP Image-Text MatchingOrchestra-Research/AI-Research-SKILLs13k8 repos~1.7kAutomated safety check: PassMIT
SageMaker Serving Image Selectionhuggingface/skills11k1 repos~4.6kAutomated safety check: PassApache-2.0
Codebase Managementgiancarloerra/SocratiCode3.3k1 repos~1.8kAutomated safety check: PassAGPL-3.0

Similar skills

  • Blog Google

    AgriciDaniel/claude-blog

    Google API integration for blog performance: PageSpeed Insights, CrUX Core Web Vitals with 25-week history, Search Console performance, URL Inspection, Indexing API, GA4 organic traffic, NLP entity…

    2.3k GitHub starsUsed in 1 repo~3.3k tokens
    Marketing & SEOAuto-check: notes
  • Chroma Vector Database

    Orchestra-Research/AI-Research-SKILLs

    Shows how to store documents and embeddings in Chroma, query them by similarity with metadata filters, and persist them to disk for RAG and semantic search projects.

    13k GitHub starsUsed in 8 repos~2.3k tokens
    AI & LLM EngineeringAuto-check passed
  • CLIP Image-Text Matching

    Orchestra-Research/AI-Research-SKILLs

    Explains OpenAI's CLIP model for zero-shot image classification, image-text similarity, semantic image search and content moderation, with install steps and code patterns.

    13k GitHub starsUsed in 8 repos~1.7k tokens
    AI & LLM EngineeringAuto-check passed
  • Official

    Chooses the right serving container and current image URI for deploying a Hugging Face model to a SageMaker endpoint, preferring Hugging Face images over generic ones.

    11k GitHub starsUsed in 1 repo~4.6k tokens
    AI & LLM EngineeringAuto-check passed
  • Codebase Management

    giancarloerra/SocratiCode

    Set up, index, and manage SocratiCode codebase indexing. An agent skill from giancarloerra/SocratiCode.

    3.3k GitHub starsUsed in 1 repo~1.8k tokens
    AI & LLM EngineeringAuto-check passed
  • Official

    Routes a sentence-transformers training task to the right model type and required reference docs and example scripts, covering bi-encoders, rerankers, sparse and multi-vector models.

    11k GitHub starsUsed in 1 repo~2.6k tokens
    AI & LLM EngineeringAuto-check passed

More from live-codes/livecodes

All 15 skills in this repo
  • Language Support

    live-codes/livecodes

    Work with 90+ supported languages, compilers, CSS processors, and WASM-compiled languages for markup, style, and script editors.

    1.5k GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Configuration

    live-codes/livecodes

    Configure playground behavior through Config object, query parameters, EmbedOptions, editor settings, processors, external resources, and custom settings.

    1.5k GitHub stars~4.5k tokensUpdated today
    Auto-check passed
  • Display Modes

    live-codes/livecodes

    Configure how the playground is displayed: full, focus, simple, lite, editor, codeblock, and result modes.

    1.5k GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Framework Wrappers

    live-codes/livecodes

    Use SDK with React, Vue, Svelte, Solid, Preact, and Web Components.

    1.5k GitHub stars~2.8k tokensUpdated today
    Auto-check passed
  • Getting Started

    live-codes/livecodes

    Quick start for standalone app at livecodes.io, embedding playgrounds with CDN or npm, and self-hosting basics.

    1.5k GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Gh Action

    live-codes/livecodes

    Use the "Preview in LiveCodes" GitHub Action to generate preview playground links for pull request code changes.

    1.5k GitHub stars~1.8k tokensUpdated today
    Auto-check passed

Questions about SDK Embedding

What does SDK Embedding do?

Create and configure embedded playgrounds using createPlayground(), EmbedOptions, container setup, loading modes (eager/lazy/click), and appUrl for self-hosted instances. SDK Embedding is an agent skill from live-codes/livecodes. Create and configure embedded playgrounds using createPlayground(), EmbedOptions, container setup, loading modes (eager/lazy/click), and appUrl for self-hosted instances.

When should I use SDK Embedding?

SDK Embedding fits situations like: tasks that involve Embeddings; tasks that involve Third-party API integration.

How do I install SDK Embedding in Claude Code?

Run `npx skills add live-codes/livecodes --skill sdk-embedding -a claude-code`. Or copy the skill folder (.agents/skills/livecodes/sdk-embedding in live-codes/livecodes) into .claude/skills/sdk-embedding in your project. Claude Code loads it when a task matches its description.

How do I install SDK Embedding in Codex?

Run `npx skills add live-codes/livecodes --skill sdk-embedding -a codex`. Or copy the skill folder (.agents/skills/livecodes/sdk-embedding in live-codes/livecodes) into .agents/skills/sdk-embedding in your project. Codex loads it when a task matches its description.

Can I use SDK Embedding in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add live-codes/livecodes --skill sdk-embedding -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/sdk-embedding, .gemini/skills/sdk-embedding, .github/skills/sdk-embedding and .opencode/skills/sdk-embedding in your project.

What does SDK Embedding need to run?

SKILL.md names no scripts, command-line tools or credentials: SDK Embedding is instructions for the agent only.

Does SDK Embedding access the network?

SKILL.md names 3 domains. In commands or code: cdn.jsdelivr.net, gist.github.com and livecodes.io; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.

Is SDK Embedding safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does SDK Embedding use?

SDK Embedding is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does SDK Embedding use?

About 1.5k tokens (SKILL.md is roughly 6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to SDK Embedding?

Skills that share tags, products or a category with SDK Embedding: Blog Google (AgriciDaniel/claude-blog, 2.3k stars), Chroma Vector Database (Orchestra-Research/AI-Research-SKILLs, 13k stars), CLIP Image-Text Matching (Orchestra-Research/AI-Research-SKILLs, 13k stars) and SageMaker Serving Image Selection (huggingface/skills, 11k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains SDK Embedding?

live-codes (a GitHub organization) maintains it in live-codes/livecodes, which has 1,512 GitHub stars. The repository holds 15 skills in this directory. The repository was last updated on October 6, 2026.

Source: live-codes/livecodes on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.