Skip to content

Building Plugins

Plugins are the most powerful extension mechanism in Gee-Code — a single plugin can bundle multiple skills, custom agents, slash commands, and MCP server configurations.

.gee/plugins/my-plugin/
├── plugin.json # Metadata (optional)
├── README.md # Documentation (optional)
├── .mcp.json # MCP server configs (optional)
├── skills/
│ └── my-skill/
│ ├── SKILL.md # Skill instructions
│ ├── scripts/ # Python helpers
│ ├── references/ # Reference docs
│ └── assets/ # Binary assets
├── agents/
│ └── reviewer.md # Standalone agent
└── commands/
└── deploy.md # Slash command
Terminal window
mkdir -p .gee/plugins/my-toolkit/skills/analyze/
mkdir -p .gee/plugins/my-toolkit/agents/
mkdir -p .gee/plugins/my-toolkit/commands/

Create .gee/plugins/my-toolkit/skills/analyze/SKILL.md:

---
name: analyze
description: Analyze code quality and suggest improvements
agents:
- name: code-analyzer
description: Specialized code analysis agent
model: sonnet
system_prompt: You are a code quality expert...
---
# Analyze Skill
When activated, analyze the codebase for:
1. **Security issues** — SQL injection, XSS, auth flaws
2. **Performance** — N+1 queries, unnecessary allocations
3. **Style** — Inconsistent naming, dead code

Create .gee/plugins/my-toolkit/skills/analyze/scripts/scan.py:

"""Security pattern scanner."""
import re, sys, json
PATTERNS = {
"sql_injection": r"f['\"].*SELECT.*{.*}",
"eval_usage": r"\beval\s*\(",
"hardcoded_secret": r"(password|secret|key)\s*=\s*['\"][^'\"]+['\"]",
}
def scan_file(filepath):
with open(filepath) as f:
content = f.read()
findings = []
for name, pattern in PATTERNS.items():
for match in re.finditer(pattern, content):
findings.append({"type": name, "line": content[:match.start()].count('\n') + 1})
return findings
if __name__ == "__main__":
print(json.dumps(scan_file(sys.argv[1]), indent=2))

Create .gee/plugins/my-toolkit/agents/reviewer.md:

---
name: reviewer
description: Code review specialist
model: sonnet
system_prompt: |
You are a thorough code reviewer. Focus on:
- Logic errors and edge cases
- Security vulnerabilities
- Performance implications
Always provide specific line references and suggested fixes.
---

Create .gee/plugins/my-toolkit/.mcp.json:

{
"servers": [
{
"name": "project-db",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres"],
"env": { "DATABASE_URL": "postgresql://localhost:5432/mydb" }
}
]
}
SyncPlugin(plugin_name="my-toolkit")

This uploads all components in one operation.

Plugins are discovered in two locations:

  1. Project-level: .gee/plugins/{name}/ — specific to this project
  2. Global: ~/.gee-code/plugins/{name}/ — available everywhere

Before syncing, validate individual skills within the plugin:

ValidateSkill(skill_path=".gee/plugins/my-toolkit/skills/analyze")
  • Start with a skill, then promote to a plugin when you need agents or commands
  • Bundle related agents in skill frontmatter when they’re tightly coupled to a skill
  • Use references for stable domain knowledge, scripts for dynamic processing
  • Binary assets in assets/ are automatically base64-encoded during sync