capacitor-ios

capacitor-ios is a skill for Claude Code, Codex from kyh/vibedgames. It costs 46 tokens per session (1,051 once invoked), scanned A, original, MIT.

Instructions for packaging a Three.js and Vite web app inside an iOS application using Capacitor. They cover 3D model loading, animation data, touch and mouse controls, asset paths, builds, and Swift Package Manager.

In plain words
What is it for?
Use them to build the Vite app, configure its iOS wrapper, add or synchronise the iOS project, run it on a device or simulator, load GLTF assets, and map OrbitControls for mouse and touch input.
Why use it?
They help keep the web app, Capacitor configuration, and iOS project in agreement. This reduces common failures caused by mismatched output folders, asset locations, animation names, or package-manager settings.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Part of the game-engines plugin — 3 skills shipped together

Good fit Use them to build the Vite app, configure its iOS wrapper, add or synchronise the iOS project, run it on a device or simulator, load GLTF assets, and map OrbitControls for mouse and touch input.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kyh/vibedgames/capacitor-ios
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add kyh/vibedgames --skill capacitor-ios
Clone the repo
git clone --depth 1 https://github.com/kyh/vibedgames

Made for: Claude Code, Codex.

Or install game-engines, the plugin that ships this one along with the rest of its 3 skills.

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 capacitor-ios

README.md
[![agentmods](https://agentmods.dev/badge/skills/kyh/vibedgames/capacitor-ios.svg)](https://agentmods.dev/skills/kyh/vibedgames/capacitor-ios)
Your own site
<a href="https://agentmods.dev/skills/kyh/vibedgames/capacitor-ios"><img src="https://agentmods.dev/badge/skills/kyh/vibedgames/capacitor-ios.svg" alt="Measured on agentmods" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,051 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: 3 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 MCP Rug Pull · line 22
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 23
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 61
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
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.00046 $0.01051
Opus 5 $0.00023 $0.00526
Sonnet 5 $0.00009 $0.00210
Haiku 4.5 $0.00005 $0.00105

Measured 8d ago against content hash af268b7b69ac, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

capacitor-ios 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 8d 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.

plugins/game-engines/skills/capacitor-ios/SKILL.md · 80 lines

How it starts

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

Three.js Capacitor iOS

Ship a Three.js + Vite app in an iOS native shell via Capacitor. Two runtimes — web renderer (Three.js + Vite) and native wrapper (Capacitor iOS) — must agree on an explicit, testable contract: web output dir, animation names, build output, iOS package manager. Most breakage is an implicit contract.

Before implementing, confirm:

  • Web output dir (dist or www) matches Capacitor webDir.
  • Animation names come from data (assets_index.json), not hardcoded strings.
  • iOS uses SPM (default on Capacitor 8+) unless a plugin forces CocoaPods.
  • Mouse and touch controls are mapped intentionally, not left to defaults.

Quick Start Workflow

  1. Build with Vite (npm run build).
  2. Keep static assets under public/ and load via absolute URLs (/assets/...).
  3. Configure Capacitor with webDir: "dist".
  4. Add iOS with SPM: npx cap add ios --packagemanager SPM.
  5. Day-to-day loop: npm run buildnpx cap sync iosnpx cap run ios (or npx cap open ios).

Command details: references/capacitor-ios-spm-workflow.md.

Implementation Guidelines

1) Project Shape

  • index.html + src/* for app code
  • public/assets/... for GLBs and JSON contracts
  • capacitor.config.ts with webDir: "dist"

Runtime fetches must work in both browser and WKWebView: use fetch('/assets/assets_index.json'), not filesystem or environment-specific base URLs.

2) Animation Contract via assets_index.json

One source of truth: skeleton URL, animation source URL, and animations[] entries with a stable app id (idle, walk, run), sourceClipName (exact AnimationClip.name), and loop mode/defaults.

Runtime: load index JSON → load skeleton GLB + animation GLB → resolve each UI button to a clip by sourceClipName → build AnimationAction map keyed by app id → play default action. See references/threejs-animation-index-pattern.md.

3) Controls: Desktop and Touch

Use OrbitControls with explicit mouseButtons and touches:

Read the full file on GitHub · 80 lines

Files

What ships with it

3 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. 8d ago First seen · 80 lines · 46 tokens per session scan A af268b7b69ac

Subscribe to this mod's changes

capacitor-ios is a skill published in the GitHub repository kyh/vibedgames (55 stars, last pushed today), licensed MIT. It adds 46 tokens to every session and 1,051 once invoked, about $0.0002 per session on Opus 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

Other skills, from other repositories

copilotkit-debug

Use when diagnosing CopilotKit issues -- runtime connectivity failures, agent not responding, streaming errors, tool execution problems, transcription failures, version mismatches, and AG-UI event tracing.

CopilotKit/CopilotKit · 42 tokens

copilotkit-agui

Use when building custom agent backends, implementing the AG-UI protocol, debugging streaming issues, or understanding how agents communicate with frontends. Covers event types, SSE transport, AbstractAgent/HttpAgent patterns, state synchronization, tool calls, and human-in-the-loop flows.

CopilotKit/CopilotKit · 61 tokens

inspector-workbench

Runs Inspector UI work on the standalone Threads state lab so the agent can see the overlay. Use when a CopilotKit employee asks an agent to fix, polish, add, or debug Inspector UI, chrome, panes, overlay actions, launcher, Home, Threads, Playground, Memory, or any visual behavior in @copilotkit/web-inspector. Don't…

CopilotKit/CopilotKit · 112 tokens

coss

Helps implement coss UI components correctly. Use when building UIs with coss primitives and patterns (buttons, dialogs, selects, forms, menus, tabs, segmented controls, inputs, toasts, etc.), migrating from shadcn/Radix to coss/Base UI, composing trigger-based overlays, or troubleshooting coss component behavior.…

cosscom/coss · 85 tokens

performance

Diagnose React runtime performance with React Doctor traces, live render outlines, Long Animation Frames, interaction timing, and component render evidence. Use when invoked as /performance for a slow interaction, unexpected re-renders, or a measured before-and-after comparison.

millionco/react-doctor · 53 tokens

react-native-docs

Comprehensive React Native reference covering core components, APIs, styling, flexbox, navigation, networking, animations, platform-specific code, debugging, performance, TypeScript integration, Fast Refresh, environment setup, React fundamentals, running on devices, and the New Architecture (Fabric, JSI…

pledgeandgrow/pledge-skills · 97 tokens