Skip to content

spencerbeggs/pluginfinity

v0.2.2MIT

How to author an agent plugin as one pluginfinity source and build it for Claude Code and GitHub Copilot: the config, skill and agent frontmatter, targets and host blocks, hooks, and every build finding with its fix.

hook-authoring

Use when adding or changing a hook in a pluginfinity plugin: a hook entry in pluginfinity.config.ts, a script under hooks/, or its bats test under __test__/. Walks the bats-first loop (fixture, failing run_hook test on both targets, script, config entry, build, bats) and the script rules the hook library depends on. Applies to files matching: **/hooks/**/*.sh, **/pluginfinity.config.ts, **/__test__/**/*.bats

hook-events

Use when choosing which hook event a pluginfinity hook should use, when a hook behaves differently on Claude Code and GitHub Copilot, or when deciding whether an event needs fallback omit on Copilot. Covers what each event can do on each host, the input each sends, and the measured host differences.

migrating-hooks

Use when a plugin still has a vendored hooks/lib, emit_* calls, hook_error or HOOK_LOG_PREFIX, a hand-written hooks.json, or separate Claude and Copilot hook scripts, and it is moving to pluginfinity and its hook library. Inventories the old plugin, maps every old helper, and verifies the result on both hosts.

plugin-scripts

Use when writing a script a pluginfinity plugin ships outside hooks, such as a skill's scripts/ or an MCP or LSP server launcher, or any plugin script that calls gh, git, aws, kubectl or another CLI. Covers server launchers on the server library, finding the plugin root and data directory on each host, calling CLIs without leaking or misusing credentials, persistent state, reading the plugin's session env, and testing scripts with bats. Applies to files matching: **/skills/**/scripts/**, **/bin/start-*.sh

pluginfinity

How to author and build an agent plugin with pluginfinity, which turns one host-neutral source into Claude Code and GitHub Copilot plugins. Use when a directory holds a pluginfinity.config.ts, when writing or editing a skill, agent or hook in a pluginfinity plugin, when running pluginfinity build, build --check or validate, or when a pluginfinity command reports a finding to fix.