layla-sdk: Skill for Claude Code

.agents/layla-sdk/SKILL.md

layla-sdk is a skill for Claude Code, Codex from l3utterfly/layla-sdk. It costs 87 tokens per session (12,165 once invoked), scanned A, original, Apache-2.0.

A guide to using the @layla-network/sdk package in third-party Layla mini-apps and WebView apps. It explains how these small apps communicate with the Layla host and use chat, character, and inference features exposed by the package.

In plain words
What is it for?
Use it to build Layla mini-apps, call the host from a WebView, handle chat streams and events, select inference engines, package app metadata, and test unavailable-bridge errors.
Why use it?
It helps developers use the SDK in the correct runtime and understand its APIs, packaging rules, errors, and background-task behavior.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is l3utterfly/layla-sdk's own configuration. It tells Claude Code and Codex how to work on layla-sdk itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything layla-sdk configures →

Reuse

Borrowing it

Nothing to install: this file belongs to l3utterfly/layla-sdk. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/l3utterfly/layla-sdk/main/.agents/layla-sdk/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/l3utterfly/layla-sdk

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for layla-sdk

README.md
[![agentmods](https://agentmods.dev/badge/skills/l3utterfly/layla-sdk/layla-sdk/github.svg)](https://agentmods.dev/skills/l3utterfly/layla-sdk/layla-sdk)
Your own site
<a href="https://agentmods.dev/skills/l3utterfly/layla-sdk/layla-sdk"><img src="https://agentmods.dev/badge/skills/l3utterfly/layla-sdk/layla-sdk/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for layla-sdk

Your own site · 80×15
<a href="https://agentmods.dev/skills/l3utterfly/layla-sdk/layla-sdk"><img src="https://agentmods.dev/badge/skills/l3utterfly/layla-sdk/layla-sdk.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 87 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 12,165 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 5 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Rogue Agent · line 120
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Rogue Agent · line 505
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Rogue Agent · line 525
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Rogue Agent · line 531
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Rogue Agent · line 540
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00087 $0.12165
Opus 5.5 $0.00035 $0.04866
Sonnet 5.5 $0.00017 $0.02433
Haiku 4.5 $0.00009 $0.01217

Measured 1mo ago against content hash b376759e559a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

layla-sdk scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/layla-sdk/SKILL.md · 1,311 lines

How it starts

The opening of the file, as written. The whole thing — 1,311 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Layla SDK

Use @layla-network/sdk when building a third-party Layla mini-app that runs inside the Layla WebView and needs to call the on-device Layla host.

The packaged skill is self-contained. Use the bundled references first:

  • Read references/sdk-api.md for SDK imports, method signatures, examples, exported types, mock usage, abort behavior, and error handling.
  • Read references/types.d.ts when you need a field name or the exact shape of a type. It is the generated TypeScript declaration file for the packaged SDK version and is authoritative — never guess an object shape or infer one from an example when this file is available.
  • Read references/mini-apps-overview.md for mini-app packaging, metadata, index.html versus index.url, WebView runtime expectations, and troubleshooting.

If the bundled reference appears stale and internet access is available, check the public package source or release docs for the installed package version:

  • https://github.com/l3utterfly/layla-sdk
  • Prefer tagged release source over the default branch when the user's project has a specific installed version.

Runtime Rules

Run SDK calls inside the Layla WebView. The host injects the React Native WebView bridge. If that bridge is unavailable, SDK requests reject with LaylaBridgeUnavailableError.

The one non-WebView environment is task.js: an optional background task script at the mini-app root that the host runs in a QuickJS runtime with the SDK already injected as a global layla instance. See "Background Tasks (task.js)" below.

Do not use this SDK as an ordinary browser HTTP client. There is no API key, base URL, or fetch endpoint to configure. The SDK sends bridge messages to the Layla host.

Layla SDK is designed to work with local LLMs running on device, so response times can be slow. When building mini-apps, prioritize streaming APIs and show appropriate loading, thinking, and progress states instead of leaving the UI idle while a request runs.

For local browser development outside Layla, use installLaylaMock(...) before the first SDK call when the app needs SDK responses during development.

Read the full file on GitHub · 1,311 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · +54 lines · +6 tokens per session b376759e559a
  2. 1mo ago Changed · +48 lines · +4 tokens per session fb6a529816aa
  3. 1mo ago Changed · +76 lines · +6 tokens per session 202232e7906e
  4. 1mo ago Changed · +1 lines 0d192f0ccc92
  5. 1mo ago Changed · +96 lines 7a7c64d6e246
  6. 1mo ago Changed · +29 lines · -134 tokens per session fad01b3e14e6
  7. 2mo ago Changed · +63 lines · +20 tokens per session 53c58ce18937
  8. 2mo ago First seen · 944 lines · 185 tokens per session scan A b413b9cbeb58

Subscribe to this mod's changes

layla-sdk is a skill published in the GitHub repository l3utterfly/layla-sdk (34 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 87 tokens to every session and 12,165 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

layla-sdk compared with skills from other repositories

layla-sdk next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
layla-sdkl3utterfly/layla-sdkSkill341mo agoApache-2.0A87Claude Code, Codex
mem0-oss-to-platformmem0ai/mem0Skill68k2d agoApache-2.0A217Claude Code, Codex
azure-mgmt-botservice-dotnetmicrosoft/skillsSkill3.2kyesterdayMITA78Claude Code
fastapi-router-pymicrosoft/skillsSkill3.2kyesterdayMITA46Claude Code
dev-runtimelangwatch/langwatchSkill5.0kyesterdayApache-2.0A172Claude Code
api-designericrisco/rsc-harnessSkill5032d agoMITA105Claude Code, Codex
migrate-segw-to-raparc-mcp/arc-1Skill252yesterdayMITA106Claude Code