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.
Plugin Structure
Section titled “Plugin Structure”.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 commandStep by Step
Section titled “Step by Step”1. Create the directory structure
Section titled “1. Create the directory structure”mkdir -p .gee/plugins/my-toolkit/skills/analyze/mkdir -p .gee/plugins/my-toolkit/agents/mkdir -p .gee/plugins/my-toolkit/commands/2. Add a skill
Section titled “2. Add a skill”Create .gee/plugins/my-toolkit/skills/analyze/SKILL.md:
---name: analyzedescription: Analyze code quality and suggest improvementsagents: - 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 flaws2. **Performance** — N+1 queries, unnecessary allocations3. **Style** — Inconsistent naming, dead code3. Add helper scripts
Section titled “3. Add helper scripts”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))4. Add a standalone agent
Section titled “4. Add a standalone agent”Create .gee/plugins/my-toolkit/agents/reviewer.md:
---name: reviewerdescription: Code review specialistmodel: sonnetsystem_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.---5. Add MCP server config (optional)
Section titled “5. Add MCP server config (optional)”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" } } ]}6. Sync to server
Section titled “6. Sync to server”SyncPlugin(plugin_name="my-toolkit")This uploads all components in one operation.
Plugin Search Paths
Section titled “Plugin Search Paths”Plugins are discovered in two locations:
- Project-level:
.gee/plugins/{name}/— specific to this project - Global:
~/.gee-code/plugins/{name}/— available everywhere
Validation
Section titled “Validation”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
Next Steps
Section titled “Next Steps”- Creating Skills — skill development guide
- Creating MCP Servers — add external tool capabilities
- Validation — code validation setup