capacitor-testing

capacitor-testing is a skill for Claude Code from Cap-go/capgo-skills. It costs 257 tokens per session (2,054 once invoked), scanned A, original, MIT.

A testing guide for Capacitor apps, which are mobile apps built with web technologies. It covers tests for individual code units, connected parts, complete user flows, and native mobile behaviour.

In plain words
What is it for?
Use it to plan or write tests with Jest, Vitest, Playwright, Appium, or native testing tools.
Why use it?
It helps check both the web portion and the iOS or Android portion of an app before problems reach users.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the capacitor-quality plugin — 7 skills shipped together

Good fit Use it to plan or write tests with Jest, Vitest, Playwright, Appium, or native testing tools.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cap-go/capgo-skills/capacitor-testing
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 Cap-go/capgo-skills --skill capacitor-testing
Clone the repo
git clone --depth 1 https://github.com/Cap-go/capgo-skills

Made for: Claude Code.

Or install capacitor-quality, the plugin that ships this one along with the rest of its 7 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-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/cap-go/capgo-skills/capacitor-testing/github.svg)](https://agentmods.dev/skills/cap-go/capgo-skills/capacitor-testing)
Your own site
<a href="https://agentmods.dev/skills/cap-go/capgo-skills/capacitor-testing"><img src="https://agentmods.dev/badge/skills/cap-go/capgo-skills/capacitor-testing/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 capacitor-testing

Your own site · 80×15
<a href="https://agentmods.dev/skills/cap-go/capgo-skills/capacitor-testing"><img src="https://agentmods.dev/badge/skills/cap-go/capgo-skills/capacitor-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 257 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,054 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
  • Socket pass 11 Oct 2026
  • Snyk pass 11 Oct 2026
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.00257 $0.02054
Opus 5.5 $0.00103 $0.00822
Sonnet 5.5 $0.00051 $0.00411
Haiku 4.5 $0.00026 $0.00205

Measured 13d ago against content hash 080f297b0f67, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

capacitor-testing 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 13d 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/capacitor-quality/skills/capacitor-testing/SKILL.md · 100 lines

How it starts

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

Testing Capacitor Apps and Plugins

A Capacitor app has three layers to test: the web app (most logic), the native bridge and plugins (Swift/Kotlin), and the running app on a device. Pick the cheapest layer that can catch the bug.

When to Use

TRIGGER when:

  • Adding unit, component or E2E tests to a Capacitor app
  • Mocking Capacitor or plugin APIs in Vitest / Jest
  • Writing or modernizing native unit tests for a plugin (Swift Testing, XCTest, JUnit)
  • Verifying a change on a simulator, emulator or device ("test this", "does it work", "check on device")
  • E2E tests that cannot find web elements in the app (WebView context)
  • Setting up test jobs in CI

Do not use:

  • Reading device or crash logs: ios-android-logs
  • Safari Web Inspector / Chrome DevTools debugging: debugging-capacitor
  • Build, signing and release pipelines: capacitor-ci-cd
  • App Intents tests: capacitor-app-intents (AppIntentsTesting)

Choose the layer

What changed Test with Reference
Business logic, state, services that call plugins Vitest with mocked plugins references/web-unit-tests.md
Components (React, Vue, Angular, Svelte) Testing Library on Vitest references/web-unit-tests.md
Web flows (routing, forms) Playwright against the dev server or dist references/e2e.md
Plugin native code (Swift / Kotlin) Swift Testing or XCTest; JUnit references/native-plugin-tests.md
Full app on device, native UI, permissions, deep links Agent verification loop; Appium or Maestro for repeatable suites references/device-verification-loop.md, references/e2e.md
CI jobs GitHub Actions matrix references/ci.md

Only load a reference when its layer is in play.

Facts that save time

  • Plugins in jsdom run their web implementation, or throw unimplemented when there is none. Capacitor.isNativePlatform() returns false in tests unless you mock @capacitor/core. Mock at the plugin package boundary, not deep inside the app.
  • E2E tools see the WebView as one native element. Appium must switch to the WEBVIEW_* context to find DOM elements. Capacitor makes the WebView inspectable in debug builds; for release builds set ios.webContentsDebuggingEnabled / android.webContentsDebuggingEnabled in capacitor.config. Never ship release builds with it on by accident.
  • Detox is not an option. It targets React Native and does not drive Capacitor WebView content.
  • Swift Testing cannot replace all XCTest. UI tests (XCUIApplication) and measure {} performance tests stay XCTest. Unit tests can migrate one class at a time; a file can hold both.
  • iOS-only plugin packages cannot use swift test because they depend on UIKit and Capacitor. Run xcodebuild test -scheme <Package> -destination 'platform=iOS Simulator,...'.
  • Capacitor 9 removed the deprecated Swift APIs. Tests that build calls with the old CAPPluginCall(callbackId:options:success:error:) initializer or CAPPlugin(bridge:pluginId:pluginName:) must move to CAPPluginCall(callbackId:methodName:options:success:error:) and a plain init().
  • Live reload flags changed in Capacitor 9. Capacitor 9: npx cap run ios --url http://<lan-ip>:5173. Capacitor 8: npx cap run ios -l --host <lan-ip> --port 5173. The Ionic CLI's ionic cap run ios -l --external is a different tool.

Read the full file on GitHub · 100 lines

Files

What ships with it

6 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. 13d ago Changed · -489 lines · +201 tokens per session 080f297b0f67
  2. 1mo ago First seen · 589 lines · 56 tokens per session scan A 91458ca9236f

Subscribe to this mod's changes

capacitor-testing is a skill published in the GitHub repository Cap-go/capgo-skills (73 stars, last pushed 6d ago), licensed MIT. It adds 257 tokens to every session and 2,054 once invoked, about $0.0010 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

Other skills, from other repositories