Minimal plugin for telecom operations based on O-RAN and Nephio concepts. Provides slash commands and an agent for intent translation.
This plugin is not yet in any themed marketplace. To install it, you'll need to add it from GitHub directly.
This plugin uses advanced features that require additional trust:
Only install plugins from repositories you trust. Review the source code before installation.
Choose your preferred installation method below
A marketplace is a collection of plugins. Every plugin gets an auto-generated marketplace JSON for individual installation, plus inclusion in category and themed collections. Add a marketplace once (step 1), then install any plugin from it (step 2).
One-time setup for access to all plugins
When to use: If you plan to install multiple plugins now or later
Step 1: Add the marketplace (one-time)
/plugin marketplace add https://claudepluginhub.com/marketplaces/all.json
Run this once to access all plugins
Step 2: Install this plugin
/plugin install telecom-ops@all
Use this plugin's auto-generated marketplace JSON for individual installation
When to use: If you only want to try this specific plugin
Step 1: Add this plugin's marketplace
/plugin marketplace add https://claudepluginhub.com/marketplaces/plugins/telecom-ops.json
Step 2: Install the plugin
/plugin install telecom-ops@telecom-ops
一個針對電信營運(O-RAN/Nephio)的 Claude Code 插件,提供網路切片意圖解析、O2-IMS 狀態查詢等功能。本插件展示了 Claude Code 插件系統的完整能力,包括 Slash Commands、Agents、Hooks 與 MCP Server 整合。
/telecom-ops:intent-parse
將自然語言的服務意圖轉換為 Nephio 相容的 KRM(Kubernetes Resource Model)配置包。
使用範例:
/telecom-ops:intent-parse intent description: VR network, bandwidth: 5 Mbps downlink, latency: 9 ms, single UE test
功能:
QoSIntent.yaml
和 NetworkSlice.yaml
輸出:
output/
└── vr-network-package/
├── Kptfile
├── QoSIntent.yaml
├── NetworkSlice.yaml
└── README.md
/telecom-ops:o2-status
查詢 O2-IMS(O-RAN O2 Interface for Infrastructure Management Service)清單與站點狀態。
使用範例:
/telecom-ops:o2-status edge01
/telecom-ops:o2-status # 查詢所有站點
功能:
intent-translator
- 網路切片意圖翻譯器
專門用於將高層級的電信服務意圖轉換為具體的 Kubernetes 資源清單。
能力:
配置:
插件配置了 PostToolUse hook,在每次工具調用後自動觸發。
當前配置:
{
"hooks": {
"PostToolUse": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/kpt-render.sh"
}
]
}
]
}
}
效果: 每次工具執行後,終端會顯示:
[telecom-ops] PostToolUse hook triggered. This is where you could run kpt rendering or validation.
擴充性: 可新增 PreToolUse、Notification 等 hooks,實現:
⚠️ (進階)MCP Server:若你替換 .mcp.json
為實際 O2-IMS / Nephio / kubectl server,插件啟用時會自動啟動對應 server,成為 Claude 的工具。
此功能尚未完全開發完成。 目前提供的是 stub 配置範例。
當前配置(示例):
{
"mcpServers": {
"telecom-cli": {
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/telecom-mcp-server.sh",
"args": [],
"env": {
"EXAMPLE_ENV": "value"
}
}
}
}
未來規劃: 連接實際的 O2-IMS MCP Server 後,將提供以下工具:
mcp__o2ims_list_sites
- 列出所有站點mcp__o2ims_get_site_status
- 獲取站點詳細狀態mcp__o2ims_list_resource_pools
- 查詢資源池mcp__o2ims_get_deployments
- 列出部署的工作負載mcp__o2ims_query_alarms
- 查詢告警事件mcp__o2ims_get_inventory
- 查詢硬體清單配置方式:
參考 telecom-ops/.mcp.json
,替換為實際的 MCP server 端點與認證資訊。
telecom-ops-claude-code-plugins/
├── .claude-plugin/
│ ├── plugin.json # 插件元數據
│ └── marketplace.json # Marketplace 配置
│
├── telecom-ops/ # 插件主體
│ ├── agents/
│ │ └── intent-translator.md # 意圖翻譯 Agent
│ ├── commands/
│ │ ├── intent-parse.md # Intent Parse 指令
│ │ └── o2-status.md # O2 Status 指令
│ ├── hooks/
│ │ └── hooks.json # Hook 配置
│ ├── scripts/
│ │ ├── kpt-render.sh # PostToolUse hook 腳本
│ │ └── telecom-mcp-server.sh # MCP server stub
│ └── .mcp.json # MCP server 配置
│
└── telecom-ops-tests/ # 測試套件
├── prompts/
│ ├── S1_intent_to_krm.md # 測試案例 1:意圖解析
│ ├── S2_o2_status.md # 測試案例 2:O2 狀態查詢
│ └── S3_hook_check.md # 測試案例 3:Hook 驗證
├── output/ # 生成的 KRM packages
├── scripts/
│ └── run_headless.sh # Headless 自動化測試
└── README.md
# 在 Claude Code 中執行
/plugin marketplace add thc1006/telecom-ops-claude-code-plugins
/plugin install telecom-ops@telecom-ops-marketplace
# 克隆專案
git clone https://github.com/thc1006/telecom-ops-claude-code-plugins.git
cd telecom-ops-claude-code-plugins
# 在 Claude Code 中執行
/plugin marketplace add ./telecom-ops-tests/dev-marketplace
/plugin install telecom-ops@dev-marketplace
/plugin enable telecom-ops
重啟 Claude Code 後,執行:
/plugin list
應該會看到 telecom-ops
插件已啟用。
請使用 telecom-ops 插件提供的 /intent parse 指令,
把這段意圖轉為 KRM 草案並列出預計輸出:
VR network,5 Mbps 下行,9 ms 延遲,單 UE 測試。
預期結果:
QoSIntent.yaml
(包含 5QI=7, 9ms latency, 5Mbps bandwidth)NetworkSlice.yaml
(eMBB 類型,單 UE 配置)Kptfile
和 README.md
請示範 /o2 status --site edge01,
若目前尚未串到實際 O2-IMS,先用 stub 文本回覆 site/health/capacity 欄位。
預期結果:
edge01
的健康狀態(OK/DEGRADED)請執行一個會觸發工具調用的動作,並在回覆中說明:
(1) 我應該在終端看到哪些訊息可判定 PostToolUse hook 已觸發?
(2) 若要再加上 PreToolUse 或 Notification 的 hook,hooks.json 應怎麼擴充?
預期結果:
[telecom-ops] PostToolUse hook triggered...
${CLAUDE_PLUGIN_ROOT}
變數的使用方式使用 headless 模式執行所有測試:
bash telecom-ops-tests/scripts/run_headless.sh
測試結果會儲存在 telecom-ops-tests/runs/
目錄。
插件會根據服務類型自動映射到對應的 S-NSSAI:
服務類型 | SST | SD | 用途 |
---|---|---|---|
VR/視頻串流 | 1 (eMBB) | 000001 | 增強型移動寬帶 |
IoT 感測器 | 2 (mMTC) | 000002 | 大規模機器通信 |
遠程手術/自駕車 | 3 (URLLC) | 000003 | 超可靠低延遲通信 |
5QI | 資源類型 | 優先級 | 封包延遲預算 | 適用場景 |
---|---|---|---|---|
5 | GBR | 10 | 100ms | IMS 語音 |
7 | GBR | 70 | 100ms | 視頻串流(本插件預設) |
9 | Non-GBR | 90 | 300ms | 網頁瀏覽 |
82 | GBR | 19 | 10ms | 低延遲 eMBB |
User Request
↓
Claude processes
↓
Tool Call (Write/Edit/Bash/etc.)
↓
[PreToolUse Hook] ← 可配置
↓
Tool Execution
↓
[PostToolUse Hook] ← 當前已配置
↓
Result returned to Claude
↓
[Notification Hook] ← 可配置
↓
Response to User
telecom-ops/commands/
新增 .md
文件telecom-ops/agents/
新增 .md
文件編輯 telecom-ops/hooks/hooks.json
:
{
"hooks": {
"PreToolUse": [...],
"PostToolUse": [...],
"Notification": [...]
}
}
支援的 matcher:
"*"
- 匹配所有"Write|Edit"
- 匹配特定工具"error"
- 匹配錯誤通知telecom-ops/.mcp.json
配置mcp__
前綴的工具A: 檢查以下項目:
chmod +x telecom-ops/scripts/*.sh
hooks/hooks.json
語法/plugin list
A:
/plugin list
/plugin enable telecom-ops
A: 目前 MCP Server 整合功能尚未完全開發。需要:
.mcp.json
配置實際 API endpointA: 生成的檔案是起始模板(skeleton),需要根據實際環境調整:
建議流程:
kpt fn render
驗證本專案採用 MIT 授權。
歡迎提交 Issue 和 Pull Request!
開發者:
Repository:
/telecom-ops:intent-parse
指令/telecom-ops:o2-status
指令intent-translator
agent0.0.1