Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Create, modify, debug, test, package, or publish a Kandev runtime plugin in its dedicated repository. Use only when the requested work targets a Kandev plugin implementation or its release and marketplace lifecycle, including fixing a bug in an existing plugin. Do not use for agent skills, MCP servers, general integrations, or Kandev host, SDK, loader, and registry changes that do not also change a plugin.
.claude/skills/kdlbs-create-kandev-plugin/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | 112% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 103% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 158% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 161% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 164% | 0% |
Build Kandev runtime plugins from the official template and current public contracts. Keep plugin source outside the Kandev monorepo and prove the packaged artifact against a disposable development instance before publishing it.
Start with the canonical plugin authoring guide. Use this skill for the repository workflow after choosing a recipe there: choose recipe → edit manifest → implement → validate → package → smoke test. The guide owns the complete hook/Host matrix; this skill keeps the repository and verification procedure concise.
package, release, or submit a Kandev runtime plugin. A passing mention of plugins, a generic extension request, or the presence of plugin host code in the Kandev monorepo is not sufficient.
manifest.yaml, aplatform executable built with the Go pluginsdk, and optionally a native UI bundle. Agent instruction packages, MCP servers, and other products that also use the word "plugin" are outside this skill.
or SDK dependency required by the plugin, or a marketplace-only change.
plugin, use a public kdlbs/kandev-plugin-<slug> repository. For a community plugin, use the author's public repository. Do not add a production plugin implementation to kdlbs/kandev; the in-tree plugin fixture is test support, not a starter location.
repository. If the plugin needs a missing host capability, treat that as a separate Kandev change with its own tests and compatibility review.
Resolve the plugin repository before editing, especially for bug reports:
current task. Otherwise match the manifest id and repo_url against the official catalog entry or the installed plugin metadata. Do not infer that a similarly named fixture or host package in kdlbs/kandev owns the bug.
the worktree whose manifest id matches the target plugin.
and call add_branch_to_task_kandev with exactly one of repository_url, repository_id, or local_path. It defaults to the current task and can find or add a repository to the workspace, then materialize its branch as a separate worktree.
add_branch_to_task_kandev only works with the Worktree executor. For otherexecutors, or when the task tool is unavailable, ask to attach the repository or create a related task that explicitly targets it. Do not clone a nested repository inside the Kandev monorepo worktree.
instructions, manifest, build files, tests, and release workflow. For a bug, reproduce and fix the behavior there with /fix and /tdd, then retain this skill's artifact verification. If the fix also needs a Kandev host or SDK change, keep the two repository deliverables and verification steps explicit.
Treat a plugin as two independently loaded surfaces joined by the manifest:
textpackage tarball -> validate + extract -> supervised plugin executable <-> Host gRPC |-------> static UI bundle -> browser plugin registry Kandev event bus -> bounded per-plugin delivery queue -> OnEvent external or UI request -> declared webhook route -> HandleWebhook
binary with the install directory as its working directory, injects a fresh Host connection on every start, and supervises crashes and failed health checks. Do not launch a second long-running server from the plugin.
KANDEV_PLUGIN_DATA_DIR is the plugin-owned durable file directory. Itsurvives restarts and version upgrades and is deleted on uninstall. Host state is the better fit for small JSON objects that should participate in Kandev backups.
config, state, secrets, versions, and data; uninstall removes them. A config update restarts an active plugin, so load configuration during startup.
the plugin process. Its initialize and optional destroy hooks may run repeatedly as a plugin is disabled and re-enabled in the same browser tab.
browser sandbox. The plugin executable inherits Kandev's process environment, and the UI runs as same-origin JavaScript with host store access. Treat installation as privileged code execution and hold official plugins to dependency, credential, and data-access review.
Choose the narrowest surface that satisfies the behavior:
| Need | Surface | Contract to design for | | --- | --- | --- | | React to Kandev activity | OnEvent | Retryable best-effort delivery, bounded in-memory queues, and possible loss require idempotency and reconciliation for critical workflows. | | Receive an external call or relay a UI request | HandleWebhook | Only declared keys are routed; validate method, authentication, and provider signatures inside the plugin. | | Store small structured data | Host state | Values are JSON objects keyed by scope and key; there is no transaction or compare-and-swap API. | | Store files or use a plugin-managed database | KANDEV_PLUGIN_DATA_DIR | The plugin owns schema, locking, migrations, and recovery. | | Read Kandev entities | Typed Host readers plus api_read | Use opaque pagination cursors and stable SDK DTOs; never query Kandev's database or internal HTTP API. | | Mutate Kandev entities | Typed Host writers | api_write:tasks gates Tasks().Create/Update; api_write:messages gates Messages().Send. A missing mutation requires a separate Host API change. | | Notify another plugin | Host.EmitEvent | Events are published as plugin.<id>.<name>; keep names and payloads versionable. | | Add native interface | UI registry and host.ui | Use host-owned React and components so themes, contexts, portals, and mobile behavior remain compatible. |
Read these sources before designing the plugin:
docs/public/plugins-authoring.md for the supported backend, Host API,native UI, recipes, packaging, install, and iteration workflow.
docs/public/plugins-manifest.md for the authoritative manifest fields,capability gates, and event vocabulary.
docs/public/plugins-marketplace.md when publishing or updating a catalogentry.
kdlbs/kandev-plugin-template repository, including itsREADME.md, Makefile, tests, and release workflow.
Prefer the public authoring docs and current template over old examples. The frontend contract pair is docs/plans/plugins/PLUGIN-API.md plus apps/web/lib/plugins/types.ts; concrete UI exports are in apps/web/lib/plugins/host-api.ts. The backend contract is apps/backend/pkg/pluginsdk plus apps/backend/proto/kandev/plugin/v1/plugin.proto. Read docs/plans/plugins/GRPC-CONTRACT.md when changing the wire contract or when the public docs do not answer a low-level compatibility question.
The frontend and backend matrices in docs/public/plugins-authoring.md, together with apps/web/lib/plugins/types.ts and apps/backend/pkg/pluginsdk, are the authoritative record of what exists today. Read them rather than asserting from memory that a hook is missing, and do not publish a signature they do not declare.
When debugging a contract discrepancy, verify it at the implementation boundary: manifest and package rules live under apps/backend/internal/plugins/manifest and pkgtar; runtime, Host, webhook, and delivery behavior live under apps/backend/internal/plugins; native UI loading and registration live under apps/web/lib/plugins.
Treat a new hook, Host method, capability, manifest field, or mounted UI slot as a contract change. Do not implement the runtime surface and leave author docs for later. In the same change:
docs/plans/plugins/PLUGIN-API.md plusapps/web/lib/plugins/types.ts; update host-api.ts, registry.ts, or the mounted component when the concrete surface changes;
apps/backend/pkg/pluginsdk,apps/backend/proto/kandev/plugin/v1/plugin.proto, and the manifest model or validator when applicable; update docs/plans/plugins/GRPC-CONTRACT.md for wire-level changes.
docs/public/plugins-authoring.md in the same change: add the hook tothe frontend or backend matrix, document inputs/props, capability and lifecycle/cleanup behavior, and add a copy-pasteable recipe or maintained fixture link. Adding the row to the matrix is the update — do not introduce a separate "unavailable" list anywhere.
docs/public/plugins-manifest.md for capability/manifest changes andupdate docs/public/plugins.md, docs/plugins-example.md, or the relevant ADR when their claims or links change. Keep the public guide as a summary; never create a second schema or type definition in prose.
AGENTS.md authority pointers and this skill ifthe source-of-truth locations or author workflow changed.
node --test scripts/validate-public-docs.test.mjs, node scripts/validate-public-docs.mjs, and a stale-reference search. Report the exact commands and results.
A hook absent from the relevant frontend/backend matrix and its corresponding authoritative contract source does not exist yet; point the author at the nearest supported recipe instead of publishing a speculative signature, and do not record the gap as a durable list entry in this skill or an AGENTS.md — the matrix and the contract sources are the only place absence or presence is tracked. If the hook is implemented but the matrix, recipe, fixture, or authoritative contract is missing, the plugin change is not documentation complete.
Skip this section for changes to an existing plugin after resolving its owning repository above.
use the full kandev-plugin-<slug> value for both. Keep the manifest id, Go module, Makefile binary and package names, UI registration id, release asset name, and catalog id synchronized as the template documents.
kdlbs/kandev-plugin-template; do not hand-rollfiles that the template already maintains.
kdlbs/kandev-plugin-<slug> and setrepo_url to that public repository. Do not publish to the organization or mutate repository settings unless the user requested that external action.
identity and example behavior without deleting its packaging, test, or release safeguards.
template's go.mod replacement deliberately. Until the SDK is a standalone module, the default replace resolves ../kandev/apps/backend.
If the requested repository does not exist and cannot be created with the available GitHub tooling, stop after producing a precise repository bootstrap request. Do not silently substitute a directory in the Kandev monorepo.
Use /tdd for backend and manifest logic.
api_read,state, secrets, event subscriptions, and webhooks as permission boundaries rather than descriptive metadata.
pluginsdk.UnimplementedPlugin, override only required methods, andaccess Kandev through the injected Host API. The Host can be unavailable during construction and isolated tests, so resolve it when handling work. Honor context cancellation and do not reach into Kandev internal packages, its database, or undocumented REST endpoints.
EventID. Kandev makes one attempt plusthree retries after 5s, 15s, and 45s, using the same event id. Delivery is sequential per plugin, but its queue and error-state buffer are bounded and in memory; backend restarts and sustained overload can lose events. Add a source-of-truth reconciliation path when missing an event is unacceptable.
config_schema secret fields or the Hostsecret APIs. GetConfig returns the plugin's own secret values in cleartext, so never commit real credentials or log complete config objects.
host.jsx, host.ui, host.store, andhost.api.fetch as documented. Do not bundle another React or Radix runtime. Make initialize repeatable and use destroy to remove timers, subscriptions, and side effects; Kandev revokes registered routes, slots, handlers, styles, and navigation separately. Use /mobile-parity for interaction design and /e2e for user-visible flows.
docs/public/plugins-authoring.md for the current body-size and route limits. Kandev rejects undeclared keys, but it does not authenticate callers or enforce the manifest's informational method field. Validate both before side effects, return status codes from 100 through 599, and avoid reflecting unsafe headers or bodies.
executable declared in runtime.executables; include .exe for Windows.
Run the plugin repository's own formatting, tests, and lint commands first, then verify the artifact rather than only the source tree:
package with the template's make package-host target for the local loop.
manifest.yaml, the current host executable,optional UI assets, and the generated internal checksums.txt. Never author the internal checksum file by hand.
exercise every declared capability. Cover config validation, permission failures, lifecycle restart, events or webhooks, and native UI registration as applicable.
delivery, handler cancellation, missing or invalid webhook authentication, unavailable dependencies, denied Host calls, and corrupt state. For native UI, run initialize/destroy twice and verify one plugin's initialization failure does not break the host or another plugin.
plugin owns either. Verify disable preserves operator data and uninstall removes it when lifecycle behavior is part of the change.
reinstalling; Kandev rejects reinstalling the same id and version.
and confirm its release asset name is <id>-<version>.tar.gz.
There is no standalone exhaustive package checker in this branch. plugin-pack stages files and generates checksums; install-time pkgtar.Install validates the manifest, archive safety, checksums, managed runtime, and host executable. These checks do not execute plugin code or prove browser/module behavior, so the disposable-instance smoke test remains required.
Do not test with a developer's primary instance, database, or credentials. Report commands run, artifact name, host platform tested, and any platform or integration path not exercised.
GitHub Release contains the required plugin tarball; the release-level tarball digest file is optional under the current marketplace contract.
plugin-registry/plugins.yaml in kdlbs/kandev only after a valid latest release exists. Keep catalog id equal to manifest id; leave featured to maintainers.
Catalog categories are free-form discovery tags and are distinct from the manifest category enum.
capabilities, filesystem and network use, secret handling, and UI store access. Internal package checksums detect corruption but do not prove provenance; release-level digests are advisory and signature verification is not wired by default in the shipped product.
Publishing, tagging, creating organization repositories, and marketplace submission are external side effects. Perform only the actions the user asked for, while completing local implementation and verification independently.
Other measured skills in the registry, with their headline benchmark lift.