kg-plugin-port

kg-plugin-port is a skill for Claude Code, Codex from kagan-sh/kagan. It costs 32 tokens per session (959 once invoked), scanned A, original, Apache-2.0.

A workflow for moving a plugin from one host system into a Kagan plugin while recording which parts match, nearly match, or cannot be moved. A plugin is an extension that adds features to an application.

In plain words
What is it for?
Use it to inspect an existing plugin, list its behavior and integrations, and write a clear porting report.
Why use it?
It prevents missing user-facing parts such as commands, panels, settings, tools, events, and stored data during the move. It also avoids inventing host functions that Kagan does not provide.

Skill for Claude CodeCodex

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

Good fit Use it to inspect an existing plugin, list its behavior and integrations, and write a clear porting report.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kagan-sh/kagan/kg-plugin-port
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 kagan-sh/kagan --skill kg-plugin-port
Clone the repo
git clone --depth 1 https://github.com/kagan-sh/kagan

Made for: Claude Code, Codex.

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 kg-plugin-port

README.md
[![agentmods](https://agentmods.dev/badge/skills/kagan-sh/kagan/kg-plugin-port/github.svg)](https://agentmods.dev/skills/kagan-sh/kagan/kg-plugin-port)
Your own site
<a href="https://agentmods.dev/skills/kagan-sh/kagan/kg-plugin-port"><img src="https://agentmods.dev/badge/skills/kagan-sh/kagan/kg-plugin-port/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 kg-plugin-port

Your own site · 80×15
<a href="https://agentmods.dev/skills/kagan-sh/kagan/kg-plugin-port"><img src="https://agentmods.dev/badge/skills/kagan-sh/kagan/kg-plugin-port.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 959 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.
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.00032 $0.00959
Opus 5.5 $0.00013 $0.00384
Sonnet 5.5 $0.00006 $0.00192
Haiku 4.5 $0.00003 $0.00096

Measured today against content hash 905b46708e9f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

kg-plugin-port 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 today.

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.

crates/core/skills/kg-plugin-port/SKILL.md · 47 lines

How it starts

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

Port one bb plugin into one kagan plugin. Keep the behavior the person sees. Drop a surface only when this map says it cannot move, and say so in the report.

kagan runs one script. kagan.json declares every contribution. Read kg-plugin-authoring for the kagan side, and kagan.d.ts after kg plugin types. A call that is not in that file does not exist. Do not invent one.

Workflow

  1. Read the bb plugin. Open package.json and the files bb.server, bb.app, and bb.host point at. Read each folder under bb.skills (default skills/). Note engines.bb.

  2. Inventory every surface. Walk the factory and the web entry. Write down each item below, or "none":

    • Manifest: id, name, description, icon, logo, engines, skills, themes
    • CLI commands and how argv is parsed
    • Agent tools, instruction text, and any per-thread tool selection
    • Panels, tabs, overlays, settings views, composer controls, and other web slots
    • Settings and whether a value is secret
    • Key-value storage and the plugin database
    • Events, hooks, HTTP routes, RPC, realtime, schedules, and background services
    • Programs, network hosts, clipboard, and files outside the plugin folder
    • A host entry, a provider, or an environment provider
  3. Map each item with the table in references/mapping.md. Mark it direct, close, or a gap. A gap keeps its workaround, or "cannot move".

  4. Scaffold. kg plugin new <name> writes kagan.json, main.js, jsconfig.json, and the type files. <name> is lowercase and hyphenated. The id is dev.kagan.<name>. Replace the starter. Point --dir at the folder you want.

  5. Port the code into that one script. The default export is a View whose init runs the job loop. Other views are named exports. Start files with // @ts-check. Use KgButton from gpui-component, not Button. A field kg ui types into is KgInput or KgTextarea from gpui-component, with aria_label. In init, InputState.new(placeholder?, initial?) takes two optional strings and TextareaState.new(initial?) takes one. gpui-base has the same names with an options object; KgInput and KgTextarea reject that state. A local page in a panel is new WebView(id).url(url). Give every control a stable id.

  6. Check. kg plugin check <path> reads the manifest and the entry the same way install does, and refuses an import the host does not export and a field constructor the component schema rejects. Fix every error. A warning about Button means switch that control to KgButton. Run kg plugin types <path> again after you call something new.

  7. Install and try it. kg plugin install <path> waits until the person approves the powers. Then kg plugin dev <path>. Try each kind you declared: kg plugin command <id> <cmd>, kg <cli> <sub> …, and a tool from inside a thread. Read kg plugin logs <id>. A trial that must not touch the person's app sets KG_DATA_DIR to a new temp directory. The socket follows that folder unless KG_SOCKET is set. Stop the headless process the trial started when it is done.

  8. Report the checklist at the end, filled in. The template is references/checklist.md.

Read the full file on GitHub · 47 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. today Changed · +2 lines 905b46708e9f
  2. 20d ago First seen · 45 lines · 32 tokens per session scan A eda57888a90c

Subscribe to this mod's changes

kg-plugin-port is a skill published in the GitHub repository kagan-sh/kagan (5 stars, last pushed today), licensed Apache-2.0. It adds 32 tokens to every session and 959 once invoked, about $0.0001 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-11-11.

Related

kg-plugin-port compared with skills from other repositories

kg-plugin-port next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
kg-plugin-portkagan-sh/kaganSkill5todayApache-2.0A32Claude Code, Codex
architecture-auditorg2AI/ORG2Skill2.5k28d agoAGPL-3.0A70Claude Code, Codex
concord-relayGet-Concord-AI/concord-mcpSkill1.7kyesterdayMITA18Claude Code, Codex
idea-teammajiayu000/spellbookSkill301yesterdayMITA182Claude Code
codex-agentmajiayu000/spellbookSkill301yesterdayMITA45Claude Code
project-health-auditormajiayu000/spellbookSkill301yesterdayMITA31Claude Code
review-gatemajiayu000/spellbookSkill301yesterdayMITA95Claude Code, Codex