{
  "schemaVersion": "1.0",
  "item": {
    "slug": "niri-ipc",
    "name": "Niri IPC",
    "source": "tencent",
    "type": "skill",
    "category": "效率提升",
    "sourceUrl": "https://clawhub.ai/AtefR/niri-ipc",
    "canonicalUrl": "https://clawhub.ai/AtefR/niri-ipc",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/niri-ipc",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=niri-ipc",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "scripts/niri.py",
      "scripts/niri_socket.py",
      "scripts/niri_ctl.py",
      "references/ipc.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-23T16:43:11.935Z",
      "expiresAt": "2026-04-30T16:43:11.935Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
        "contentDisposition": "attachment; filename=\"4claw-imageboard-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/niri-ipc"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/niri-ipc",
    "agentPageUrl": "https://openagent3.xyz/skills/niri-ipc/agent",
    "manifestUrl": "https://openagent3.xyz/skills/niri-ipc/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/niri-ipc/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Niri IPC",
        "body": "Use Niri IPC through the niri msg CLI (preferred) or by writing JSON requests to $NIRI_SOCKET.\n\nThis skill assumes:\n\nYou are on Linux with Niri running.\n$NIRI_SOCKET is set (usually true inside the Niri session)."
      },
      {
        "title": "Quick start (recommended)",
        "body": "Use the bundled helper script (wrapper around niri msg --json):\n\n./skills/niri-ipc/scripts/niri.py version\n./skills/niri-ipc/scripts/niri.py outputs\n./skills/niri-ipc/scripts/niri.py workspaces\n./skills/niri-ipc/scripts/niri.py windows\n./skills/niri-ipc/scripts/niri.py focused-window"
      },
      {
        "title": "1) High-level helpers (window matching)",
        "body": "Use scripts/niri_ctl.py when you want to refer to windows by title/app_id substring instead of ids:\n\n# List windows (optionally filtered)\n./skills/niri-ipc/scripts/niri_ctl.py list-windows --query firefox\n\n# Focus a window by substring match\n./skills/niri-ipc/scripts/niri_ctl.py focus firefox\n\n# Close a matched window (focus then close)\n./skills/niri-ipc/scripts/niri_ctl.py close firefox\n\n# Move a matched window to a workspace (by index or by name)\n./skills/niri-ipc/scripts/niri_ctl.py move-to-workspace firefox 3\n./skills/niri-ipc/scripts/niri_ctl.py move-to-workspace firefox web\n\n# Focus a workspace by index or name\n./skills/niri-ipc/scripts/niri_ctl.py focus-workspace 2\n./skills/niri-ipc/scripts/niri_ctl.py focus-workspace web"
      },
      {
        "title": "2) Full IPC access (raw socket)",
        "body": "Use scripts/niri_socket.py to talk to $NIRI_SOCKET directly (newline-delimited JSON):\n\n# Send a simple request (JSON string)\n./skills/niri-ipc/scripts/niri_socket.py raw '\"FocusedWindow\"'\n\n# Batch requests: one JSON request per line on stdin\nprintf '%s\\n' '\"FocusedWindow\"' '\"Workspaces\"' | ./skills/niri-ipc/scripts/niri_socket.py stdin\n\n# Event stream (prints JSON events until interrupted)\n./skills/niri-ipc/scripts/niri_socket.py event-stream"
      },
      {
        "title": "Actions",
        "body": "Pass through Niri actions:\n\n# Focus workspace by index\n./skills/niri-ipc/scripts/niri.py action focus-workspace 2\n\n# Move focused window to workspace\n./skills/niri-ipc/scripts/niri.py action move-window-to-workspace 3\n\n# Focus a window by id\n./skills/niri-ipc/scripts/niri.py action focus-window 123\n\n# Close focused window\n./skills/niri-ipc/scripts/niri.py action close-window\n\n# Reload niri config\n./skills/niri-ipc/scripts/niri.py action load-config-file\n\n# Spawn (no shell)\n./skills/niri-ipc/scripts/niri.py action spawn -- alacritty\n\n# Spawn through shell\n./skills/niri-ipc/scripts/niri.py action spawn-sh -- 'notify-send hello'"
      },
      {
        "title": "Output configuration",
        "body": "Use niri msg output ... via the wrapper:\n\n./skills/niri-ipc/scripts/niri.py output --help"
      },
      {
        "title": "Working directly with niri msg",
        "body": "If you don’t want the helper script, call Niri directly:\n\nniri msg --json windows\nniri msg --json action focus-workspace 2\n\nTip: if niri msg parsing errors happen after upgrades, restart the compositor (new niri msg against old compositor is a common mismatch)."
      },
      {
        "title": "Event stream",
        "body": "For status bars/daemons: Niri can stream events.\n\n# Raw JSON event lines (runs until interrupted)\n./skills/niri-ipc/scripts/niri.py event-stream\n\n# Just a few lines for a quick test\n./skills/niri-ipc/scripts/niri.py event-stream --lines 5"
      },
      {
        "title": "Troubleshooting",
        "body": "If commands fail with “NIRI_SOCKET is not set”: run inside your Niri session, or export the socket path.\nIf you need the socket protocol details, read: ./skills/niri-ipc/references/ipc.md.\nIf your goal is complex automation (pick the right window by title/app_id, etc.), first query windows, then act by window id."
      }
    ],
    "body": "Niri IPC\n\nUse Niri IPC through the niri msg CLI (preferred) or by writing JSON requests to $NIRI_SOCKET.\n\nThis skill assumes:\n\nYou are on Linux with Niri running.\n$NIRI_SOCKET is set (usually true inside the Niri session).\nQuick start (recommended)\n\nUse the bundled helper script (wrapper around niri msg --json):\n\n./skills/niri-ipc/scripts/niri.py version\n./skills/niri-ipc/scripts/niri.py outputs\n./skills/niri-ipc/scripts/niri.py workspaces\n./skills/niri-ipc/scripts/niri.py windows\n./skills/niri-ipc/scripts/niri.py focused-window\n\nDeeper control\n1) High-level helpers (window matching)\n\nUse scripts/niri_ctl.py when you want to refer to windows by title/app_id substring instead of ids:\n\n# List windows (optionally filtered)\n./skills/niri-ipc/scripts/niri_ctl.py list-windows --query firefox\n\n# Focus a window by substring match\n./skills/niri-ipc/scripts/niri_ctl.py focus firefox\n\n# Close a matched window (focus then close)\n./skills/niri-ipc/scripts/niri_ctl.py close firefox\n\n# Move a matched window to a workspace (by index or by name)\n./skills/niri-ipc/scripts/niri_ctl.py move-to-workspace firefox 3\n./skills/niri-ipc/scripts/niri_ctl.py move-to-workspace firefox web\n\n# Focus a workspace by index or name\n./skills/niri-ipc/scripts/niri_ctl.py focus-workspace 2\n./skills/niri-ipc/scripts/niri_ctl.py focus-workspace web\n\n2) Full IPC access (raw socket)\n\nUse scripts/niri_socket.py to talk to $NIRI_SOCKET directly (newline-delimited JSON):\n\n# Send a simple request (JSON string)\n./skills/niri-ipc/scripts/niri_socket.py raw '\"FocusedWindow\"'\n\n# Batch requests: one JSON request per line on stdin\nprintf '%s\\n' '\"FocusedWindow\"' '\"Workspaces\"' | ./skills/niri-ipc/scripts/niri_socket.py stdin\n\n# Event stream (prints JSON events until interrupted)\n./skills/niri-ipc/scripts/niri_socket.py event-stream\n\nActions\n\nPass through Niri actions:\n\n# Focus workspace by index\n./skills/niri-ipc/scripts/niri.py action focus-workspace 2\n\n# Move focused window to workspace\n./skills/niri-ipc/scripts/niri.py action move-window-to-workspace 3\n\n# Focus a window by id\n./skills/niri-ipc/scripts/niri.py action focus-window 123\n\n# Close focused window\n./skills/niri-ipc/scripts/niri.py action close-window\n\n# Reload niri config\n./skills/niri-ipc/scripts/niri.py action load-config-file\n\n# Spawn (no shell)\n./skills/niri-ipc/scripts/niri.py action spawn -- alacritty\n\n# Spawn through shell\n./skills/niri-ipc/scripts/niri.py action spawn-sh -- 'notify-send hello'\n\nOutput configuration\n\nUse niri msg output ... via the wrapper:\n\n./skills/niri-ipc/scripts/niri.py output --help\n\nWorking directly with niri msg\n\nIf you don’t want the helper script, call Niri directly:\n\nniri msg --json windows\nniri msg --json action focus-workspace 2\n\n\nTip: if niri msg parsing errors happen after upgrades, restart the compositor (new niri msg against old compositor is a common mismatch).\n\nEvent stream\n\nFor status bars/daemons: Niri can stream events.\n\n# Raw JSON event lines (runs until interrupted)\n./skills/niri-ipc/scripts/niri.py event-stream\n\n# Just a few lines for a quick test\n./skills/niri-ipc/scripts/niri.py event-stream --lines 5\n\nTroubleshooting\nIf commands fail with “NIRI_SOCKET is not set”: run inside your Niri session, or export the socket path.\nIf you need the socket protocol details, read: ./skills/niri-ipc/references/ipc.md.\nIf your goal is complex automation (pick the right window by title/app_id, etc.), first query windows, then act by window id."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/AtefR/niri-ipc",
    "publisherUrl": "https://clawhub.ai/AtefR/niri-ipc",
    "owner": "AtefR",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/niri-ipc",
    "downloadUrl": "https://openagent3.xyz/downloads/niri-ipc",
    "agentUrl": "https://openagent3.xyz/skills/niri-ipc/agent",
    "manifestUrl": "https://openagent3.xyz/skills/niri-ipc/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/niri-ipc/agent.md"
  }
}