capacitor-plugin-development

Create and maintain Capacitor plugins with iOS, Android, and web implementations.

1|Updated Aug 25, 2026
One-click install
npx skills add https://github.com/involvex/ionic-everywhere --skill capacitor-plugin-development-involvex
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: capacitor-plugin-development
Source: https://github.com/involvex/ionic-everywhere/tree/main/.agents/skills/capacitor-plugin-development
Command: npx skills add https://github.com/involvex/ionic-everywhere --skill capacitor-plugin-development-involvex

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building a Capacitor plugin requires coordinating TypeScript API definitions, Swift and Java/Kotlin native bridges, web fallbacks, permissions, documentation, and npm publishing across three platforms, which is error-prone without a guided workflow. ## Core Features & Use Cases - End-to-End Plugin Scaffolding: Generate a new plugin project with the official Capacitor plugin generator and verify it with npm run verify. - Cross-Platform Implementation Guidance: Step-by-step instructions for the TypeScript API in src/definitions.ts, the web layer in src/web.ts, the iOS bridge with CAPPlugin and CAPBridgedPlugin, and the Android bridge with @CapacitorPlugin and @PluginMethod. - Events, Permissions, and Configuration: Implement addListener events, runtime permission flows, and plugin configuration values read from capacitor.config.ts. - Use Case: A developer wants to expose a native Bluetooth API to their Ionic app. The skill walks them through scaffolding the plugin, defining the TypeScript interface, implementing Swift and Kotlin bridges, generating docs with docgen, and publishing to npm. ## Quick Start Ask the agent to create a new Capacitor plugin from scratch and specify which platforms (iOS, Android, web) it should target.

Frequently Asked Questions about capacitor-plugin-development

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a new Capacitor plugin from scratch?

Run npm init @capacitor/plugin@latest and provide the npm package name, Android package ID, plugin class name, repository URL, license, and description. Then install dependencies and run npm run verify to confirm the scaffold builds on all platforms.

How do I add a native iOS or Android implementation to a Capacitor plugin?

On iOS, create an implementation class extending NSObject and a plugin class extending CAPPlugin conforming to CAPBridgedPlugin. On Android, extend Plugin with the @CapacitorPlugin annotation and mark each exposed method with @PluginMethod.

Why is my Capacitor plugin method not callable from JavaScript?

On iOS, ensure methods are marked @objc and listed in the pluginMethods array of CAPBridgedPlugin. On Android, methods need the @PluginMethod annotation and must be public. Also verify the registerPlugin name matches jsName and the @CapacitorPlugin name.

Can Capacitor plugins emit events to JavaScript listeners?

Yes. Define addListener and removeAllListeners in the TypeScript interface, then call notifyListeners with the same event name on web, iOS, and Android. The event name string must be identical across all platforms.

How do I test a Capacitor plugin locally before publishing?

Install the plugin into a Capacitor app using a local file path with npm install ../path/to/plugin-root, then run npx cap sync. Rebuild the TypeScript with npm run build after changes and run the app on device or emulator.

When should I not use this plugin development workflow?

Do not use it for installing existing plugins into an app, upgrading plugins to newer Capacitor versions, or adding SPM support to plugins. Those tasks are covered by separate dedicated skills.