feat: expand hello-world into a complete cross-compat plugin scaffold

Adds every cross-compatible component between Claude Code and Copilot CLI:
skills (shared), agents (per-tool .md vs .agent.md), hooks (per-tool
paths), and .mcp.json (shared). Both plugin.json manifests now carry all
shared identity fields (name, description, author, license, keywords)
with Copilot-specific component paths only in the root manifest.

Updates validate.sh sync check to verify shared identity fields rather
than demanding content equality, since component path declarations
legitimately diverge between tools.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-20 13:41:00 +00:00
parent 41f98f6efd
commit 5ab7054976
9 changed files with 142 additions and 16 deletions

View File

@@ -1,33 +1,77 @@
# hello-world
Minimal proof-of-concept plugin for the `holocron` marketplace. Install it to confirm the marketplace scaffolding works, then replace it with real plugins.
Complete scaffold plugin for the **holocron** marketplace. Every cross-compatible component
is included with a working stub. Copy this directory, rename it, and replace the stubs with
your actual content.
## Directory layout
```
hello-world/
├── plugin.json # Copilot CLI manifest — declares component paths
├── .claude-plugin/
│ └── plugin.json # Claude Code manifest — no component paths (uses defaults)
├── skills/
│ └── hello-world/
│ └── SKILL.md # ✅ identical for both tools
├── agents/
│ ├── hello-world.md # Claude Code agent (no frontmatter)
│ └── hello-world.agent.md # Copilot CLI agent (YAML frontmatter + tools:)
├── hooks/
│ └── hooks.json # Claude Code hooks (PostToolUse / PreToolUse events)
├── hooks.json # Copilot CLI hooks (session_start / session_end events)
├── .mcp.json # ✅ MCP server config — identical for both tools
└── README.md
```
## Cross-compatibility notes
| Component | Claude Code path | Copilot CLI path | Portable? |
|---|---|---|---|
| Plugin manifest | `.claude-plugin/plugin.json` | `plugin.json` at root | Ship both |
| Skills | `skills/<name>/SKILL.md` | `skills/<name>/SKILL.md` | ✅ Identical |
| Agents | `agents/<name>.md` | `agents/<name>.agent.md` | Ship both |
| Hooks | `hooks/hooks.json` | `hooks.json` at root | Ship both |
| MCP servers | `.mcp.json` at root | `.mcp.json` at root | ✅ Identical |
## Install via marketplace
### Claude Code
```bash
# Claude Code
claude plugin marketplace add <owner>/ai-development
claude plugin install hello-world@holocron
```
### GitHub Copilot CLI
```bash
# GitHub Copilot CLI
copilot plugin marketplace add <owner>/ai-development
copilot plugin install hello-world
```
## Local dev install
### Claude Code
```bash
# Claude Code
claude --plugin-dir ./plugins/hello-world
```
### GitHub Copilot CLI
```bash
# GitHub Copilot CLI
copilot plugin install ./plugins/hello-world
```
## Verify
## Validate (Claude Code)
After install, open a new session and type `/hello-world` or "test plugin install".
```bash
claude plugin validate ./plugins/hello-world
```
Copilot CLI has no validate command — run `copilot plugin install ./plugins/hello-world`
and check that `/skills list` and `/agent` surface the expected entries.
## Creating a new plugin from this scaffold
1. Copy `plugins/hello-world/` → `plugins/<your-plugin-name>/`
2. Update `name` in both `plugin.json` files
3. Replace `skills/hello-world/SKILL.md` with your skill(s)
4. Replace or remove `agents/` files — only include if your plugin ships an agent
5. Replace or remove `hooks/` files — only include if your plugin reacts to events
6. Replace or remove `.mcp.json` — only include if your plugin ships an MCP server
7. Add the new plugin to `.claude-plugin/marketplace.json`
8. Run `claude plugin validate ./plugins/<your-plugin-name>`