← Back to Plugins
Tools

Enterprise Agent Plugins

jdiegosierra By jdiegosierra ⭐ 1 stars 👁 12 views ▲ 0 votes

Enterprise agent plugins scaffold โ€” multi-platform AI coding agent plugins for Claude Code, opencode, and OpenClaw

GitHub

README

# Enterprise Agent Plugins

A scaffold for building **multi-platform AI coding agent plugins** that work across Claude Code, opencode, and OpenClaw. Use this as a starting point for your own enterprise engineering plugins.

This repository demonstrates a production-ready plugin architecture where `src/` is the single source of truth, and each AI platform reads from it via symlinks.

## Quick start

### Install in Claude Code

```
/plugin marketplace add jdiegosierra/enterprise-agent-plugins
/plugin install acme-engineering@jdiegosierra-enterprise-agent-plugins
```

### Test locally

```bash
claude --plugin-dir ./plugins/acme-engineering/claude
```

## What's included

The `acme-engineering` plugin is a fully functional example with:

- **2 agents** โ€” SRE (infrastructure, runbooks) and backend-developer (PRs, testing)
- **4 commands** โ€” help, setup, lint-fix, run-tests
- **3 skills** โ€” platform map, Kubernetes best practices, SRE runbook executor
- **1 runbook** โ€” GitHub access provisioning (end-to-end: Jira ticket to PR)
- **6 hooks** โ€” bash safety guard, welcome message, session rules, update checker, onboarding, notifications
- **Multi-platform support** โ€” Claude Code, opencode, and OpenClaw with symlinks

## Architecture

```
enterprise-agent-plugins/
โ”œโ”€โ”€ .claude-plugin/marketplace.json     # Claude Code marketplace definition
โ”œโ”€โ”€ release-please-config.json          # Automated versioning
โ”œโ”€โ”€ .release-please-manifest.json
โ”œโ”€โ”€ .github/workflows/                  # CI/CD
โ”‚   โ””โ”€โ”€ release-please.yml
โ””โ”€โ”€ plugins/
    โ””โ”€โ”€ acme-engineering/               # One plugin per department
        โ”œโ”€โ”€ src/                        # Source of truth โ€” all content lives here
        โ”‚   โ”œโ”€โ”€ agents/                 # Agent definitions (markdown + YAML frontmatter)
        โ”‚   โ”œโ”€โ”€ commands/               # Slash commands
        โ”‚   โ”œโ”€โ”€ skills/                 # Knowledge bases (SKILL.md per topic)
        โ”‚   โ””โ”€โ”€ runbooks/              # Operational procedures
        โ”œโ”€โ”€ claude/                     # Claude Code plugin root (symlinks to src/)
        โ”‚   โ”œโ”€โ”€ .claude-plugin/        # Plugin manifest
        โ”‚   โ”œโ”€โ”€ agents/                # โ†’ src/agents/
        โ”‚   โ”œโ”€โ”€ commands/              # โ†’ src/commands/
        โ”‚   โ”œโ”€โ”€ skills/                # โ†’ src/skills/
        โ”‚   โ””โ”€โ”€ hooks/                 # Lifecycle hooks (bash scripts)
        โ”œโ”€โ”€ opencode/                  # opencode agents (symlinks to src/)
        โ”‚   โ””โ”€โ”€ agents/
        โ”œโ”€โ”€ openclaw/                  # OpenClaw skills (symlinks to src/)
        โ”‚   โ””โ”€โ”€ skills/
        โ”œโ”€โ”€ scripts/                   # Setup and utility scripts
        โ””โ”€โ”€ tests/                     # Hook and integrity tests
```

### Platform hierarchy

**Claude Code and opencode are at the same level** โ€” both are coding tools. Everything implemented for Claude Code should be implemented for opencode so teams can choose either tool.

**OpenClaw is at a higher level** โ€” it's a gateway/orchestrator that receives requests (Slack, Jira) and delegates coding work to opencode.

```
                    OpenClaw (gateway/orchestrator)
                    โ”œโ”€โ”€ Receives Slack DMs, Jira tickets
                    โ”œโ”€โ”€ Triages requests
                    โ””โ”€โ”€ Delegates coding work โ†“

        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
        โ”‚   Claude Code     โ”‚     opencode       โ”‚
        โ”‚   (local CLI)     โ”‚   (server runtime) โ”‚
        โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
        โ”‚ agents            โ”‚ agents             โ”‚
        โ”‚ skills            โ”‚ (via file read)    โ”‚
        โ”‚ commands          โ”‚ (via prompt)       โ”‚
        โ”‚ hooks             โ”‚ plugins (.ts)      โ”‚
        โ”‚ marketplace       โ”‚ symlinks + setup   โ”‚
        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
```

### How it works

1. **Content lives in `src/`** โ€” agents, skills, commands, and runbooks are plain markdown files
2. **Each platform has its own directory** with symlinks pointing to `src/`
3. **Claude Code** discovers content via the marketplace (`.claude-plugin/marketplace.json` points to `claude/`)
4. **opencode** uses symlinks from `~/.config/opencode/agents/` (created by `scripts/setup-opencode-agents.sh`)
5. **OpenClaw** loads skills via `extraDirs` in `openclaw.json` (points directly to `src/skills/` โ€” OpenClaw doesn't resolve symlinks)

### Versioning

Only Claude Code has formal versioning via release-please. opencode and OpenClaw load files directly from `git pull`.

## Customizing for your organization

1. **Fork this repo** or use it as a template
2. **Rename** `acme-engineering` to `<your-org>-engineering` everywhere:
   - `plugins/acme-engineering/` directory
   - `.claude-plugin/marketplace.json`
   - `release-please-config.json` and `.release-please-manifest.json`
   - `plugins/acme-engineering/claude/.claude-plugin/plugin.json`
   - All hook scripts and command files that reference `acme-engineering`
3. **Replace placeholder content**:
   - `acme-platform` skill โ†’ your org's repository inventory and service map
   - `github-access.md` runbook โ†’ your actual provisioning steps
   - AWS profiles, team names, Jira project keys โ†’ your real values
4. **Add your skills** โ€” create `src/skills/<topic>/SKILL.md` and symlink in `claude/skills/`
5. **Add your agents** โ€” create `src/agents/<role>.md` and symlink in `claude/agents/`

## Key concepts

### Agents

Markdown files with YAML frontmatter that define specialized roles. Each agent has:
- A description (used for routing)
- Available commands and skills
- Core workflows
- Safety rules

### Skills

Knowledge bases that agents consult. Each skill is a directory with a `SKILL.md` file. Skills are loaded on-demand (2% of context window), so they scale well.

### Runbooks

Step-by-step operational procedures stored as plain markdown. Unlike skills (which are reference knowledge), runbooks are executable instructions. Agents have routing tables that map trigger keywords to runbook files.

**Why not commands?** Commands load their description at session start. With hundreds of runbooks, this would consume too much context budget. Runbooks are loaded on-demand when triggered.

### Hooks

Lifecycle scripts that run on events:
- **SessionStart** โ€” welcome messages, update checks, onboarding, session rules
- **PreToolUse** โ€” safety guards that intercept dangerous commands
- **Stop** โ€” notifications when tasks complete

### Multi-platform symlinks

Git preserves symlinks. When Claude Code clones the repo via marketplace install, symlinks in `claude/` resolve to `src/` correctly. This means one source of truth, zero duplication.

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md).

## License

MIT
tools

Comments

Sign in to leave a comment

Loading comments...