一键导入
cypher-query
Use when handling any natural language question about ERP data (suppliers, POs, invoices, payments, items, receipts, etc.)
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when handling any natural language question about ERP data (suppliers, POs, invoices, payments, items, receipts, etc.)
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Dispatch ERP queries to Workers. Handles task creation, MinIO sync, state registration, and Matrix room dispatch.
Manager direct-to-MCP fast path for simple ERP data queries. Bypasses Workers entirely — calls honeybadge-nebula-mcp generate_query + validate_and_execute, then forwards results to user via contract 002.
Use when the user asks about fraud detection, three-way matching anomalies, duplicate invoices, unusual payment patterns, or supplier concentration risk
Use when the user asks for analysis that requires decomposing a complex question into multiple queries (trend analysis, comparisons, aggregation across entities)
| name | cypher-query |
| description | Use when handling any natural language question about ERP data (suppliers, POs, invoices, payments, items, receipts, etc.) |
Handle natural language questions by querying the HoneyBadge NebulaGraph knowledge graph.
You call MCP tools via the exec tool using the mcporter CLI. All MCP tools are on separate servers:
nebula-mcp (honeybadge-nebula):
mcporter call honeybadge-nebula.generate_query --args '{"question":"...","conversation_history":[...]}'
mcporter call honeybadge-nebula.validate_and_execute --args '{"ngql":"...","user_context":{"user_id":"..."}}'
mcporter call honeybadge-nebula.get_schema --args '{"space":"honeybadge"}'
mcporter call honeybadge-nebula.explain_ngql --args '{"ngql":"..."}'
mcporter call honeybadge-nebula.summarize_query_results --args '{"question":"...","columns":[...],"rows":[...]}'
audit-mcp (honeybadge-audit):
mcporter call honeybadge-audit.write_audit_log --args '{"trace_id":"...","question":"...","ngql":"...","raw_result":{...},"summary":"..."}'
cache-mcp (honeybadge-cache):
mcporter call honeybadge-cache.check_cache --args '{"key":"..."}'
mcporter call honeybadge-cache.cache_result --args '{"key":"...","value":{...},"ttl":300}'
Call mcporter call honeybadge-nebula.generate_query --args '{"question":"<user_question>","conversation_history":[...]}'
Multi-turn context (conversation_history): Before generating nGQL, check if
the task directory contains history.json (written by dispatch-to-worker.sh).
If present and non-empty, read it and pass it as conversation_history so the
nGQL LLM can resolve anaphora like "这些订单" / "他" / "上面提到的" against prior
turns. If history.json is missing or [], omit the conversation_history
field entirely (single-turn).
# Example: read history.json from task dir and inline into --args
HISTORY=$(cat /root/hiclaw-fs/shared/tasks/$TASK_ID/history.json 2>/dev/null || echo '[]')
mcporter call honeybadge-nebula.generate_query --args \
"$(python3 -c "import json,sys; print(json.dumps({'question':sys.argv[1],'conversation_history':json.loads(sys.argv[2])}))" "$QUESTION" "$HISTORY")"
Call mcporter call honeybadge-nebula.validate_and_execute --args '{"ngql":"<generated_ngql>"}'
"user_context":{"user_id":"<username>"}On failure (L1/L2 error), retry up to 3 times with error details.
Based on results, run additional queries following Step 1-2.
Format results as a table. Numbers must be EXACTLY as returned.
mcporter call honeybadge-cache.cache_result --args '{"key":"<question_hash>","value":{...},"ttl":300}'
mcporter call honeybadge-audit.write_audit_log --args '{"trace_id":"...","question":"...","ngql":"...","raw_result":{...},"summary":"..."}'
Return summary with trace_id, row count, execution time.
User: "查供应商V001234的所有采购订单"
mcporter call honeybadge-nebula.generate_query --args '{"question":"查供应商V001234的所有采购订单"}'
→ ngql: "MATCH (s:Supplier)-[:PLACED_WITH]->(po:PurchaseOrder) WHERE s.Supplier.supplier_id == \"V001234\" RETURN po.purchase_order_number AS po_no, po.status AS status, po.total_amount AS amount"
mcporter call honeybadge-nebula.validate_and_execute --args '{"ngql":"MATCH (s:Supplier)-[:PLACED_WITH]->(po:PurchaseOrder) WHERE s.Supplier.supplier_id == \"V001234\" RETURN po.purchase_order_number AS po_no, po.status AS status, po.total_amount AS amount"}'
→ {success: true, rows: [...], trace_id: "TRC-..."}