بنقرة واحدة
generate-node
Generate ONEX nodes via automated code generation with ContractInferencer and LLM-powered business logic
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Generate ONEX nodes via automated code generation with ContractInferencer and LLM-powered business logic
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Dispatch a background worker with role-templated prompt and auto-populated collision fences
Comprehensive system health monitoring — checks agent performance, database, Kafka topics, pattern discovery, and service status across the ONEX platform
Orchestrate a Claude Code agent team to autonomously work a Linear epic across multiple repos
Run DoD evidence checks against a ticket contract and generate a verification receipt
Autonomous per-ticket pipeline that chains ticket-work, local-review, PR creation, CI watching, PR review loop, integration verification gate, and auto-merge into a single unattended workflow with Slack notifications and policy guardrails
Full autonomous audit-debug-fix loop for all dashboard pages — Playwright recon, parallel systematic-debug, fix, PR, Linear ticket, re-audit, iterate until clean. Supports local and cloud targets with optional post-fix redeployment.
| name | generate-node |
| description | Generate ONEX nodes via automated code generation with ContractInferencer and LLM-powered business logic |
| level | advanced |
| debug | false |
Fully automated ONEX node generation using the omniclaude codegen system. Generates complete, production-ready nodes with contracts, infrastructure code, business logic, and tests.
DO NOT run generation scripts directly. When this skill is invoked, you MUST dispatch to a polymorphic-agent.
Bash(${CLAUDE_PLUGIN_ROOT}/skills/generate-node/generate "Create PostgreSQL CRUD Effect")
Bash(${CLAUDE_PLUGIN_ROOT}/skills/generate-node/regenerate src/nodes/my_node)
Task(
subagent_type="onex:polymorphic-agent",
description="Generate PostgreSQL CRUD Effect node",
prompt="Generate an ONEX node with the following requirements:
Description: Create a PostgreSQL CRUD Effect node for user management
Node Type: Effect
Use the generate-node skill:
${CLAUDE_PLUGIN_ROOT}/skills/generate-node/generate 'Create PostgreSQL CRUD Effect node for user management with async operations'
Options available:
- --output-dir ./generated_nodes (default)
- --node-type effect|compute|reducer|orchestrator
- --enable-intelligence (default)
- --enable-quorum (multi-model validation)
After generation:
1. Verify the generated contract YAML
2. Check the business logic implementation
3. Run the generated tests
4. Report any issues found"
)
WHY: Polymorphic agents have full ONEX capabilities, intelligence integration, quality gates, and proper observability. Running scripts directly bypasses all of this.
The codegen system provides 100% automated node generation through an event-driven workflow:
Total Time: 10-25 seconds per node, ZERO manual work ✨
Use the Bash tool to execute:
${CLAUDE_PLUGIN_ROOT}/skills/generate-node/generate "<PROMPT>" [OPTIONS]
To regenerate an existing node (useful for applying updated patterns or refactoring):
${CLAUDE_PLUGIN_ROOT}/skills/generate-node/regenerate <NODE_DIR> [OPTIONS]
The regenerate script intelligently extracts a generation prompt by:
PROMPT - Natural language description of the node (required)--output-dir - Output directory for generated files (default: ./generated_nodes)--node-type - Node type hint: effect|orchestrator|reducer|compute (optional, auto-inferred)--interactive - Enable interactive checkpoints for validation--enable-intelligence - Use RAG intelligence gathering (enabled by default)--disable-intelligence - Disable RAG intelligence gathering--enable-quorum - Use AI quorum validation (multi-model consensus)--timeout - Timeout in seconds (default: 300 = 5 minutes)Generate New Nodes:
# Basic usage - generate PostgreSQL CRUD Effect
${CLAUDE_PLUGIN_ROOT}/skills/generate-node/generate "Create PostgreSQL CRUD Effect node"
# With custom output directory
${CLAUDE_PLUGIN_ROOT}/skills/generate-node/generate "Create ML inference Orchestrator" --output-dir ./my_nodes
# With node type hint and interactive mode
${CLAUDE_PLUGIN_ROOT}/skills/generate-node/generate "Create metrics aggregation Reducer" --node-type reducer --interactive
# With intelligence disabled (faster, less context)
${CLAUDE_PLUGIN_ROOT}/skills/generate-node/generate "Create simple logger Effect" --disable-intelligence
# With AI quorum validation (multi-model consensus)
${CLAUDE_PLUGIN_ROOT}/skills/generate-node/generate "Create payment processing Orchestrator" --enable-quorum
Regenerate Existing Nodes:
# Regenerate node from existing code (extracts prompt automatically)
${CLAUDE_PLUGIN_ROOT}/skills/generate-node/regenerate src/omniclaude/nodes/llm_effect/v1_0_0/llm_effect_llm
# Regenerate with custom output directory
${CLAUDE_PLUGIN_ROOT}/skills/generate-node/regenerate nodes/my_node --output-dir ./regenerated
# Regenerate with interactive mode
${CLAUDE_PLUGIN_ROOT}/skills/generate-node/regenerate ../other_repo/nodes/custom_node --interactive
# Regenerate from node with README.md (fast - no Z.ai call)
${CLAUDE_PLUGIN_ROOT}/skills/generate-node/regenerate nodes/well_documented_node
# Regenerate from node without README (uses Z.ai code analysis)
${CLAUDE_PLUGIN_ROOT}/skills/generate-node/regenerate nodes/legacy_node --enable-intelligence
The skill generates a complete ONEX node with:
generated_nodes/
└── <node_name>/
├── contract.yaml # ONEX v2.0 contract specification
├── node.py # Main node implementation
├── models/ # Pydantic models
│ ├── model_input.py
│ ├── model_output.py
│ └── model_intent.py
├── __init__.py # Package initialization
├── README.md # Node documentation
└── tests/ # Unit tests (optional)
└── test_node.py
🚀 Generating ONEX node...
Correlation ID: 550e8400-e29b-41d4-a716-446655440000
Prompt: Create PostgreSQL CRUD Effect node
Output: ./generated_nodes
[Progress updates via Kafka events...]
✅ Generation complete!
Duration: 18.3s
Quality Score: 0.95
Files Generated: 8
Generated files:
- ./generated_nodes/postgresql_crud_effect/contract.yaml
- ./generated_nodes/postgresql_crud_effect/node.py
- ./generated_nodes/postgresql_crud_effect/models/model_input.py
- ./generated_nodes/postgresql_crud_effect/models/model_output.py
- ./generated_nodes/postgresql_crud_effect/models/model_intent.py
- ./generated_nodes/postgresql_crud_effect/__init__.py
- ./generated_nodes/postgresql_crud_effect/README.md
- ./generated_nodes/postgresql_crud_effect/tests/test_node.py
The codegen uses event-driven orchestration via Kafka:
CLI (omninode-generate)
↓ (publishes event)
Kafka Topic: node.generation.requested
↓ (consumed by)
Code Generation Workflow
├─ ContractInferencer (AST + LLM inference)
├─ HybridStrategy (Jinja2 templates)
├─ BusinessLogicGenerator (LLM code generation)
└─ Validation (pytest + quality checks)
↓ (publishes progress events)
Kafka Progress Topics
↓ (consumed by)
CLI Progress Display
↓
Generated Files
| Component | Time | Automation Level |
|---|---|---|
| ContractInferencer | 5-10s | 100% (LLM-based) |
| Jinja2 Templates | ~50ms | 100% (Template-based) |
| BusinessLogicGenerator | 5-15s | 100% (LLM-based) |
| Validation | ~100ms | 100% (Automated tests) |
| TOTAL | 10-25s | 100% AUTOMATED |
Manual work eliminated: 45 min → 0 min per node = 100% time savings 🎯
When regenerating nodes without README.md files, the skill uses Z.ai LLM API to analyze code and extract generation prompts:
How It Works:
API Configuration:
https://api.z.ai/api/anthropic (Anthropic-compatible)glm-4-flash (fast, cost-effective) - configurable via ZAI_MODEL env varZAI_API_KEY in .env filePerformance:
Fallback Strategy:
Required Infrastructure (running on your configured host):
Environment Variables (in ~/.omnibase/.env):
POSTGRES_HOST=<postgres-host>
POSTGRES_PORT=5436
POSTGRES_DATABASE=omnibase_infra
POSTGRES_USER=postgres
POSTGRES_PASSWORD=<set_in_env>
KAFKA_BOOTSTRAP_SERVERS=omninode-bridge-redpanda:9092 # Docker services
# OR
KAFKA_BOOTSTRAP_SERVERS=<kafka-bootstrap-servers>:9092 # Host scripts
ZAI_API_KEY=<your_key> # For LLM-powered generation and code analysis
ZAI_ENDPOINT=https://api.z.ai/api/anthropic # Optional, defaults to Z.ai
ZAI_MODEL=glm-4-flash # Optional, defaults to glm-4-flash
For Regenerate Mode (analyzing existing code):
# Required
ZAI_API_KEY=<your_key> # Z.ai API key for code analysis
# Optional
ZAI_ENDPOINT=https://api.z.ai/api/anthropic # Override endpoint
ZAI_MODEL=glm-4-flash # Override model (glm-4-flash, glm-4-plus, etc.)
Working Directory: Must be run from within the omniclaude repository.
The skill provides comprehensive error handling:
❌ Manual contract writing - ContractInferencer does it automatically ❌ Template boilerplate - HybridStrategy generates infrastructure ❌ Manual business logic - BusinessLogicGenerator writes working code ❌ Missing tests - Validation ensures quality
✅ 100% automated - From prompt to production-ready code ✅ Event-driven - Real-time progress tracking via Kafka ✅ High quality - LLM-powered with validation and quality checks ✅ Fast - 10-25s total generation time
Claude Code Access: ${CLAUDE_PLUGIN_ROOT}/skills/generate-node/
Executable: ${CLAUDE_PLUGIN_ROOT}/skills/generate-node/generate
Repository: omniclaude
This skill integrates with:
Effect Nodes:
Compute Nodes:
Reducer Nodes:
Orchestrator Nodes:
If generation fails or produces unexpected results:
# Check Kafka connection
curl http://<redpanda-console-host>:8080 # Redpanda Console
# Check PostgreSQL connection
psql -h <your-infrastructure-host> -p 5436 -U postgres -d omnibase_infra
# View generation events in Kafka
kcat -C -b <kafka-bootstrap-servers>:9092 -t node.generation.requested
# Check correlation ID in logs
grep "<correlation_id>" /path/to/logs
# Run with shorter timeout for debugging
${CLAUDE_PLUGIN_ROOT}/skills/generate-node/generate "Test node" --timeout 60
Generate multiple nodes programmatically:
# Generate multiple related nodes
for node_desc in "User CRUD Effect" "Auth Middleware Effect" "Session Reducer"; do
${CLAUDE_PLUGIN_ROOT}/skills/generate-node/generate "$node_desc" --output-dir ./my_service_nodes
done
# Python integration example
import subprocess
import json
def generate_node(prompt: str, output_dir: str = "./generated_nodes"):
result = subprocess.run(
["${CLAUDE_PLUGIN_ROOT}/skills/generate-node/generate", prompt, "--output-dir", output_dir],
capture_output=True,
text=True
)
return result.returncode == 0
Generated nodes include:
Quality Score: 0.0-1.0 based on:
docs/codegen/CONTRACT_INFERENCER.mddocs/codegen/HYBRID_STRATEGY.mddocs/architecture/ONEX_V2_SPECIFICATION.mddocs/guides/NODE_DEVELOPMENT_GUIDE.md