create-plugin
4
总安装量
4
周安装量
#53327
全站排名
安装命令
npx skills add https://github.com/ethpandaops/mcp --skill create-plugin
Agent 安装分布
opencode
4
gemini-cli
4
claude-code
4
github-copilot
4
codex
4
kimi-cli
4
Skill 文档
Create New Plugin
Add a datasource plugin following the existing patterns.
Files to Create
plugins/{name}/
âââ config.go # Config struct + Validate() + ApplyDefaults()
âââ plugin.go # Implements plugin.Plugin interface
âââ examples.go # Embeds examples.yaml
âââ examples.yaml # Query examples
âââ python/{name}.py # Sandbox module (connects via proxy)
Plus:
pkg/proxy/handlers/{name}.go– Reverse proxy handler
Templates
Copy from plugins/prometheus/ for a simple plugin, or plugins/clickhouse/ for one with schema discovery.
Registration Steps
- builder.go – Import and add
reg.Add({name}plugin.New()) - builder.go – Add case to
buildProxy()type switch - pkg/proxy/proxy.go – Add field to
Optionsstruct - pkg/proxy/proxy.go – Register handler in
Start() - sandbox/ethpandaops/ethpandaops/init.py – Add to lazy imports
- Copy Python module to
sandbox/ethpandaops/ethpandaops/
Key Rules
- Credentials NEVER go to sandbox – use
SandboxEnv()for metadata only - ProxyConfig() returns credentials for the proxy handler
- Python module reads
ETHPANDAOPS_{NAME}_DATASOURCESenv var (JSON, no creds) - Python module calls proxy at
/{name}/{instance}/...
Checklist
- Implements all
plugin.Pluginmethods (seepkg/plugin/plugin.go) - Proxy handler follows pattern in
pkg/proxy/handlers/prometheus.go -
make lint && make testpass -
make docker-sandboxbuilds