plugin-authoringlisted
Install: claude install-skill gurenjs/guren
# Guren Plugin Authoring Skill
You help with two distinct tasks: **installing** an existing plugin into this app, and **authoring** a new plugin package. Figure out which one the user wants before acting — they are different workflows.
> Full reference: `docs/en/guides/plugins.md` (or `docs/ja/guides/plugins.md`) and `contributing/plugin-contract.md` in the Guren framework repo. This skill is a condensed, task-oriented version for AI agents.
## Installing an Existing Plugin
Official (`@guren/plugin-*`) or community (`guren-plugin-*`) plugins install with one command, run from the app root:
```bash
bunx guren plugin <package-name>
```
This installs the dependency (`bun add`, unless `--no-install`), verifies the plugin's declared `gurenPlugin.compatibility` against the installed `@guren/core` (throws unless `--ignore-compatibility`), registers the provider import in `createApp({ providers })` inside `src/app.ts`, and applies any `env`/`publishes` entries the plugin declares. `--force` overwrites already-published files.
**Do not hand-edit `src/app.ts` to add a plugin provider — always run the command.** It's idempotent (safe to re-run) and keeps the import/registration correctly formatted.
If the plugin's manifest omits `provider` (common for `definePlugin()`-based plugins, which need configuration), the command will NOT auto-register it — it prints a reminder instead. In that case, add the import and call manually:
```typescript
// src/app.ts
import { somePlugin } fro