Back to the catalog

portable-agent-skill-tools-hooks-generator

Generates agents/skills/tools/hooks that work across Claude Code, GitHub Copilot, Gemini CLI, and OpenCode. See GEMINI.md and CORE.md.

Open source Open in the app JSON README (API)

About

Generates agents/skills/tools/hooks that work across Claude Code, GitHub Copilot, Gemini CLI, and OpenCode. See GEMINI.md and CORE.md.

Details

Kind
Plugins
Topic
AI, RAG & memory
Publisher
deepakkj
Origin
gemini
Category
ferramentas
Version
1.0.0
Last push
2026-07-16T18:34:33Z
Repository state
ativo
License
MIT
Added
2026-08-30 14:13:39
Updated
2026-08-30 14:13:39
Origin id
deepakkj/portable-agent-skills-hooks-tools-generator-skill

README

# Portable Agent / Skill / Tool / Hook Generator

A skill for **Claude Code, GitHub Copilot, Gemini CLI, and OpenCode** that helps
you build agents, skills, tools, and hooks that work across all four providers
instead of hand-maintaining four divergent, drifting copies.

## The idea

There's no universal standard for agent/skill/tool/hook definitions across AI
coding assistants yet. This repo takes the practical approach:

1. Write **one neutral markdown source** per artifact — provider-agnostic
   language, no hardcoded tool names or provider-specific syntax.
2. Generate a **thin adapter per provider** that either points at that source
   or embeds it verbatim (never paraphrased) in whatever shape that provider
   expects.
3. Be honest about the limits: **skills and agents** port at high fidelity
   (all four providers consume markdown instructions in some form). **Tools**
   port best as a single **MCP server** rather than four reimplementations.
   **Hooks** port worst — each provider's event model genuinely differs, and
   some providers may have no equivalent at all. The method says so instead of
   faking parity.
4. **Verify, don't guess.** Provider schemas change; the method requires
   checking each provider's current docs before generating its adapter, and
   flags anything generated from memory instead of verified.

The actual method lives in one place — [`CORE.md`](CORE.md) — written with no
provider-specific syntax. Every provider's entry point is a pointer to it, not
a copy, so editing the method only ever happens once:

| Provider | Entry point |
|---|---|
| Claude Code | [`SKILL.md`](SKILL.md) |
| GitHub Copilot | [`copilot-instructions.md`](copilot-instructions.md) |
| Gemini CLI | [`GEMINI.md`](GEMINI.md) + [`gemini-extension.json`](gemini-extension.json) |
| OpenCode | [`opencode-agent.md`](opencode-agent.md) |

## Overview

**Where the providers diverge, and the one real cross-provider standard (MCP)
for tools.**

![Where providers diverge and the MCP standard](assets/portability-infographic.png)

**The generator's own method — write a neutral source, decide the mechanism
per artifact type, generate adapters, verify against current docs — plus the
honest portability ceiling per artifact type (skill/agent: high, tool: medium
via MCP, hook: low).**

![The method: 5 steps and portability by artifact type](assets/portable-skill-infographic.png)

**Architecture: every provider adapter points at (or embeds verbatim) the same
`CORE.md` — edited once, never re-authored per provider.**

![Architecture: single source, four entry points](assets/portable-skill-architecture.png)

## How to use this skill

1. **Install it** for whichever provider(s) you use — see [Install](#install)
   below. Claude Code is the primary entry point; the other three are thin
   adapters pointing at the same method.
2. **Trigger it** with a natural request, e.g.:
   - "Make this skill portable across providers."
   - "Create an agent that works in Claude Code, Copilot, Gemini CLI, and OpenCode."
   - "Add OpenCode/Gemini support to this tool too."
3. **The agent follows `CORE.md`'s five steps** for you:
   1. Writes one neutral markdown source for your agent/skill/tool/hook —
      provider-agnostic language, no hardcoded tool names.
   2. Decides the honest portability mechanism for that artifact type (see the
      table in the second image above).
   3. Generates a thin adapter per provider you asked for, each pointing at or
      embedding the neutral source verbatim — never a paraphrase.
   4. Verifies each provider's *current* schema/discovery path before writing
      its adapter, rather than generating from stale memory.
   5. Lints the neutral source for anything provider-specific that leaked in.
4. **Check the output.** You should get back: one neutral source file, one
   adapter per requested provider, an MCP server if a tool was involved, and
   an explicit note anywhere full parity wasn't possible (most often hooks).
5. **Edit only `CORE.md`** going forward. If the method changes, regenerate
   the adapters from it rather than hand-editing each one — that keeps all
   four providers in sync by construction.

## Install

### Claude Code

```bash
git clone https://github.com/deepakkj/portable-agent-skills-hooks-tools-generator-skill.git \
  ~/.claude/skills/portable-agent-skills-hooks-tools-generator-skill
```

Claude Code auto-discovers skills under `~/.claude/skills/` (or a repo-local
`.claude/skills/`). It triggers on prompts like "make this portable" or
"create an agent that works across providers."

### GitHub Copilot

Copy `copilot-instructions.md`'s content into your project's
`.github/copilot-instructions.md`, or reference this repo's copy alongside
`CORE.md`.

### Gemini CLI

Clone this repo as a Gemini CLI extension directory (it already contains
`gemini-extension.json` with `contextFileName: GEMINI.md`). See the
[Gemini CLI extensions docs](https://github.com/google-gemini/gemini-cli) to
confirm the current install path before relying on it — provider extension
formats change, and this repo's `gemini-extension.json` should be re-verified
against current docs (see the caveat below).

### OpenCode

Copy `opencode-agent.md` into OpenCode's agent directory per its current
discovery convention.

## ⚠️ Verification caveat

The Gemini CLI (`gemini-extension.json`) and OpenCode (`opencode-agent.md`)
adapter *shapes* in this repo were written from general knowledge of those
tools' formats, not verified line-by-line against current docs at authoring
time. `CORE.md` Step 4 explicitly instructs an agent to verify each provider's
current schema before trusting an adapter's shape — do the same before
depending on these two files' exact format. Claude Code's `SKILL.md`
frontmatter and Copilot's `copilot-instructions.md` convention are stable and
verified.

## Contributing

The neutral method in `CORE.md` is the single source of truth. If you improve
it, regenerate the four adapters from the updated method rather than editing
them independently — that's the whole point of the design.

## License

MIT — see [LICENSE](LICENSE).

More