  
kibana插件助手
Claude Code插件,让Claude在Kibana插件开发方面拥有深厚的专业知识。
本地安装(无需GitHub)
选项1:直接插件目录(建议用于开发)
# Clone or copy this directory to your machine
# Then load it directly when running Claude Code:
claude --plugin-dir /path/to/kibana-plugin-helper每次使用此标志启动Claude Code时,都会加载插件。
选项2:添加到Claude代码设置
将插件路径添加到您的Claude Code设置文件中:
Linux/macOS: ~/.claude/settings.json 窗户: %APPDATA%\claude\settings.json
{
"pluginDirs": [
"/path/to/kibana-plugin-helper"
]
}然后重新启动Claude Code——插件会自动加载每个会话。
选项3:创建本地市场
# Create a local marketplace directory
mkdir -p ~/claude-plugins/.claude-plugin
# Create the marketplace manifest
cat > ~/claude-plugins/.claude-plugin/marketplace.json << 'EOF'
{
"name": "local-marketplace",
"description": "My local Claude Code plugins",
"plugins": ["kibana-plugin-helper"]
}
EOF
# Copy or symlink the plugin into the marketplace
cp -r /path/to/kibana-plugin-helper ~/claude-plugins/
# Add the marketplace to Claude Code
claude /plugin marketplace add ~/claude-plugins
# Install the plugin
claude /plugin install kibana-plugin-helper验证安装
# Check if plugin is loaded
claude /help您应该看到以下命令 /new-plugin, /route, /saved-object等等。
快速开始
cd /path/to/kibana/plugins
# Create a new plugin
claude /new-plugin
# Add a route
claude /route
# Add a saved object type
claude /saved-object
# Set up fast development (avoid Kibana restarts)
claude /fast-dev包含什么
命令(8)
| 命令 | 描述 |
|---|---|
/new-plugin | 构建一个完整的Kibana插件 |
/route | 通过验证生成服务器路由 |
/saved-object | 使用CRUD创建已保存的对象类型 |
/embeddable | 创建仪表板可嵌入的小部件 |
/ui-action | 创建插件间通信的触发器/操作 |
/expression | 为画布/镜头创建表达式函数 |
/mcp-config | 设置Elasticsearch/Kibana MCP连接 |
/fast-dev | 建立快速开发环境 |
代理商(5)
| 代理 | 触发器 |
|---|---|
kibana-debugger | 错误、“调试”、“不工作” |
kibana-performance | “分析性能”,“缓慢” |
kibana-a11y | “可访问性”、“11年审计” |
kibana-migration | “从X迁移到Y”,“升级” |
kibana-fast-dev | “加速”,“启动太慢” |
技能(3600+行)
全面的知识涵盖:
- 保存的对象(类型、迁移、CRUD、引用)
- 可嵌入(经典+React模式、工厂)
- UI操作(触发器、操作、上下文菜单)
- 表达式(函数、渲染器、画布/镜头)
- 状态管理(URL同步,全局状态)
- 记录和监控(结构化日志、遥测)
- HTTP资源(静态资产,CSP)
- 插件间依赖关系(合约、类型共享)
- 快速开发(模拟服务器、测试)
工具
模拟服务器(tools/mock-server/)
不运行Kibana的测试路线:
cd tools/mock-server
npm install
# Point to your plugin
PLUGIN_PATH=/path/to/your-plugin npm start
# Test routes instantly
curl http://localhost:3000/api/your_plugin/itemsMCP服务器(tools/mcp-server/)
用于插件开发的自定义MCP服务器:
cd tools/mcp-server
npm install
# Add to your .mcp.json目录结构
kibana-plugin-helper/
├── .claude-plugin/
│ └── plugin.json # Plugin manifest
├── commands/ # Slash commands
│ ├── new-plugin.md
│ ├── route.md
│ ├── saved-object.md
│ ├── embeddable.md
│ ├── ui-action.md
│ ├── expression.md
│ ├── mcp-config.md
│ └── fast-dev.md
├── agents/ # Specialized agents
│ ├── kibana-debugger.md
│ ├── kibana-performance.md
│ ├── kibana-a11y.md
│ ├── kibana-migration.md
│ └── kibana-fast-dev.md
├── skills/
│ └── kibana-plugin-dev/
│ └── SKILL.md # 3,600+ lines of Kibana knowledge
├── tools/
│ ├── mock-server/ # Route testing without Kibana
│ └── mcp-server/ # Custom MCP for plugin dev
└── README.md需求
- 克劳德代码
- Node.js 18+(用于工具)
- (可选)Kibana源代码校验
- (可选)MCP的Elasticsearch
使用示例
创建一个完整的插件
claude /new-plugin
# Answer: my_metrics, My Metrics, Track metrics, yes, yes, yes
claude /route
# Answer: GET /api/my_metrics/data, returns metrics from ES
claude /saved-object
# Answer: my_metrics_config, name/enabled/thresholds
claude /fast-dev
# Sets up mock server for instant iteration调试问题
You: "My route returns 404, here's the error: [paste error]"
Claude: Uses kibana-debugger agent to diagnose and fix升级Kibana版本
You: "Migrate my plugin from 8.4 to 8.15"
Claude: Uses kibana-migration agent to list breaking changes and provide fixes提示
- 使用
--plugin-dir为了发展 --通过重新启动Claude Code重新加载更改 - 添加到永久安装的设置中 --始终可用
- 使用模拟服务器 --1秒与5分钟迭代周期
- 问克劳德任何事 --3600行Kibana知识可用
