Skill: nickflach/0xscada (version 1.0.1)

--- name: 0xscada description: > Decentralized Industrial Control Fabric. Bridges SCADA systems with blockchain-backed audit trails and Kannaka memory integration. Provides a unified API for telemetry, geometry classification, and verifiable industrial state. acceptLicenseTerms: true metadata: openclaw: requires: bins: - name: node label: "Node.js 18+ required to run the server" - name: npm label: "npm required for installation" - name: curl label: "curl required for health checks" - name: git label: "git required for repository management" env: [] optional: bins: - name: docker label: "Docker optional for local database/redis" env: - name: SCADA_PORT label: "HTTP port for the 0xSCADA server (default: 5000)" - name: DATABASE_URL label: "PostgreSQL connection string" - name: SCADA_DIR label: "Path to 0xSCADA repository root (default: ../../..)" - name: WEB3_RPC_URL label: "Blockchain RPC endpoint for audit trails" - name: PRIVATE_KEY label: "Private key for signing blockchain transactions" - name: FLUX_URL label: "Flux State Engine URL" - name: FLUX_AUTH_TOKEN label: "Flux Authentication Token" data_destinations: - id: scada-local description: "Local industrial telemetry" remote: false install: - id: npm-install kind: command label: "Install dependencies" command: "npm install" --- # 0xSCADA Skill Decentralized Industrial Control Fabric mapping atoms to bits. Integrates natively with the Kannaka memory ecosystem (84-class SGA Fano geometry). **Architecture Note:** This skill acts as a Clawhub wrapper/controller for a full local 0xSCADA node. It relies on executing the 0xSCADA project repository located relative to this skill or configured via `SCADA_DIR`. ## Prerequisites - **Node.js 18+** on PATH - **npm** on PATH - **curl** on PATH (for health checks) - **PostgreSQL** (optional, uses SQLite by default if not set up) ## Setup ```bash cd ~/workspace/skills/0xscada npm install ``` ## Configuration This skill supports extensive blockchain and integration features by communicating with the underlying 0xSCADA server. To enable these, configure the following environment variables: - `SCADA_DIR`: Explicitly set the 0xSCADA repository path (defaults to relative parent dir) - `WEB3_RPC_URL` & `PRIVATE_KEY`: Enable blockchain audit anchoring - `FLUX_URL` & `FLUX_AUTH_TOKEN`: Enable Kannaka Flux integration *Note: For security, the startup script validates that `SCADA_DIR` points to a legitimate 0xSCADA project containing `server/index.ts` before execution.* ## Quick Start ```bash # Start 0xSCADA ./scripts/0xscada.sh start # Check status ./scripts/0xscada.sh status ```

path: scripts/0xscada.sh
content: #!/usr/bin/env bash
# 0xSCADA CLI wrapper

set -euo pipefail

SKILL_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
# Allow SCADA_DIR to be configured via environment, defaulting to the expected repo root
SCADA_DIR="${SCADA_DIR:-$(cd "$SKILL_DIR/../../.." && pwd)}"
PORT="${SCADA_PORT:-5000}"
BASE_URL="http://localhost:$PORT"

is_running() {
  if curl -sf "$BASE_URL/api/health" > /dev/null; then
    return 0
  fi
  return 1
}

cmd_start() {
  if is_running; then
    echo "0xSCADA already running on $BASE_URL"
    return 0
  fi

  # Security validation: Ensure we are running the actual 0xSCADA project
  if [[ ! -f "$SCADA_DIR/server/index.ts" || ! -f "$SCADA_DIR/package.json" ]]; then
    echo "Error: SCADA_DIR ($SCADA_DIR) does not appear to contain the 0xSCADA project."
    echo "Expected to find server/index.ts and package.json."
    echo "Please set the SCADA_DIR environment variable to the correct 0xSCADA repository root."
    exit 1
  fi

  echo "Starting 0xSCADA from $SCADA_DIR..."
  cd "$SCADA_DIR"
  npm run dev &
  
  # Wait for server to start
  echo "Waiting for server to initialize..."
  for i in {1..15}; do
    if is_running; then
      echo "0xSCADA started successfully on $BASE_URL"
      return 0
    fi
    sleep 2
  done

  echo "Failed to start 0xSCADA within the expected time."
  exit 1
}

cmd_status() {
  if is_running; then
    echo "0xSCADA is RUNNING on $BASE_URL"
  else
    echo "0xSCADA is STOPPED"
  fi
}

CMD="${1:-status}"
shift || true

case "$CMD" in
  start)       cmd_start "$@" ;;
  status)      cmd_status ;;
  *)
    echo "Usage: 0xscada.sh <command> [args]"
    echo "Commands:"
    echo "  start     Start the 0xSCADA server"
    echo "  status    Show running status"
    exit 1
    ;;
esac


path: _meta.json
content: {
  "ownerId": "kn7472bg474xtcrazj1dhmh0m180ywh6",
  "slug": "0xscada",
  "version": "1.0.1",
  "publishedAt": 1741651200000,
  "dependencies": ["flux"],
  "requires": {
    "bins": ["node", "npm", "curl", "git"],
    "env": []
  },
  "optional": {
    "bins": ["docker"],
    "env": [
      "SCADA_PORT",
      "DATABASE_URL",
      "SCADA_DIR",
      "WEB3_RPC_URL",
      "PRIVATE_KEY",
      "FLUX_URL",
      "FLUX_AUTH_TOKEN"
    ]
  },
  "dataDestinations": {
    "alwaysLocal": ["scada-local"],
    "optionalRemote": []
  }
}


Security scan verdicts — ClawScan: suspicious | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (MEDIUM)