agentleFS
FAHTHIZFAHTHIZ/oasis/skills/plugin-authoring/SKILL.md

plugin-authoring

Skill4 starsChanged 9 days agoApache-2.0View on GitHub

Reference for writing OASIS / Claude Code plugins: manifest, commands, agents, skills, hooks, MCP and LSP servers, monitors, workflows, marketplaces, and how to test them.

7 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run each command and check /hooks, /mcp, /agents and /skills list your parts.

    line 44
  2. Very specific:

    Create a marketplace repo with .claude-plugin/marketplace.json: { "name": "my-market", "owner": { "name": "You" }, "plugins": [ { "name": …

    line 49

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Writing a plugin

OASIS loads Claude Code plugins unchanged. A plugin is a directory:

my-plugin/
  .claude-plugin/plugin.json   # manifest (required)
  commands/*.md                # slash commands: /my-plugin:name
  agents/*.md                  # subagents (frontmatter: name, description, tools, model)
  skills/<name>/SKILL.md       # skills (frontmatter: name, description)
  hooks/hooks.json             # { "hooks": { "PreToolUse": [ { "matcher": "Bash", "hooks": [ { "type": "command", "command": "..." } ] } ] } }
  .mcp.json                    # MCP servers ({ "mcpServers": { ... } })
  .lsp.json                    # LSP servers
  monitors/monitors.json       # background monitors that wake the session
  workflows/*.js               # saved dynamic workflows: /my-plugin:name

Manifest

{ "name": "my-plugin", "version": "0.1.0", "description": "What it does", "author": { "name": "You" } }

name is kebab-case and becomes the namespace. Optional fields: commands, agents, hooks, mcpServers (paths or inline objects that replace the defaults), userConfig (values asked for at enable time, exposed as ${user_config.KEY} and CLAUDE_PLUGIN_OPTION_KEY).

Paths and environment

  • In hooks, MCP and LSP commands use ${CLAUDE_PLUGIN_ROOT} for files inside the plugin and ${CLAUDE_PLUGIN_DATA} for persistent per-plugin data. CLAUDE_PROJECT_DIR is the workspace.
  • Commands: Markdown with frontmatter (description, argument-hint, allowed-tools, model) and $ARGUMENTS / $1 placeholders.

Test locally

  1. oasis --plugin-dir ./my-plugin loads it for one session without installing.
  2. oasis plugin validate ./my-plugin checks the manifest and files.
  3. Run each command and check /hooks, /mcp, /agents and /skills list your parts.
  4. For hooks, run oasis --debug hooks and read the hook input/output in the debug log.

Distribute

Create a marketplace repo with .claude-plugin/marketplace.json: { "name": "my-market", "owner": { "name": "You" }, "plugins": [ { "name": "my-plugin", "source": "./my-plugin", "description": "..." } ] }. Users add it with /plugin marketplace add OWNER/REPO and install with /plugin install my-plugin@my-market.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.