Skip to content

feat(claws): add unified sageox OpenClaw skill#574

Merged
avi-ox-agola merged 3 commits into
mainfrom
avi/sageox-unified-openclaw-skill
May 7, 2026
Merged

feat(claws): add unified sageox OpenClaw skill#574
avi-ox-agola merged 3 commits into
mainfrom
avi/sageox-unified-openclaw-skill

Conversation

@avi-ox-agola
Copy link
Copy Markdown
Contributor

@avi-ox-agola avi-ox-agola commented May 1, 2026

Summary

  • Adds a single unified sageox OpenClaw skill with 8 capabilities, replacing the separate sageox-distill and sageox-summary skills
  • Capabilities: query, coworkers, distill, distill-pipeline, summary, glance, catchup, import/export
  • Thin SKILL.md intent router (~1,250 tokens) with detailed reference docs loaded on demand
  • Repo manifest (sageox-distill-repos.json) as central context anchor — all ox commands cd to a manifest repo before running
  • Includes deploy script for VPS testing and Python batch test runner

Capabilities

Capability What it does
Query Search team discussions, docs, sessions via ox query
Coworkers List, load, create, remove expert AI agents via ox coworker
Distill Interactive single-repo distillation via ox distill
Distill Pipeline Multi-repo automated sync + index + distill
Summary Cross-team 24h summary generation via claude -p
Glance Real-time AI coworker activity via ox glance
Catchup Structured briefing after being away (orchestrated)
Import/Export Import docs/recordings, export knowledge as local files

Test plan

  • Linter passes clean (0 critical, 0 warnings)
  • SKILL.md under 3,000 token limit
  • Deployed to VPS OpenClaw instance via rsync
  • Batch tested all 10 test cases via openclaw agent --session-id — 10/10 passing
  • Verified skill routing, prerequisites gate, multi-team handling, and manifest management

Co-Authored-By: SageOx

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • SageOx toolkit: query team knowledge, manage AI coworkers, generate summaries and catch-ups, distill insights, and import/export content.
  • Documentation
    • Comprehensive guides for setup, workflows (distill, glance, query, import/export, summary, catchup, coworkers) and templates for summaries/catchups.
  • Tools/Scripts
    • Installer/updater for core CLI, deploy-to-VPS, state/update utilities, and selection helpers.
  • Tests
    • Added a standalone test runner for validating skill prompts and connectivity.

Single skill with 8 capabilities replacing separate sageox-distill and
sageox-summary skills: query, coworkers, distill, distill-pipeline,
summary, glance, catchup, and import/export. Tested 10/10 on VPS.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: SageOx <ox@sageox.ai>
SageOx-Session: https://sageox.ai/repo/repo_019c5812-01e9-7b7d-b5b1-321c471c9777/sessions/2026-04-28T17-29-avi-OxUnkE/view
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 1, 2026

Warning

Rate limit exceeded

@avi-ox-agola has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 33 minutes and 39 seconds before requesting another review.

To continue reviewing without waiting, purchase usage credits in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 07de61c8-910e-408d-9ad5-09f629d6eef2

📥 Commits

Reviewing files that changed from the base of the PR and between f4b28f1 and 7a5d016.

📒 Files selected for processing (2)
  • claws/openclaw/sageox/scripts/install-ox-curl.sh
  • claws/openclaw/sageox/test-skill.py
📝 Walkthrough

Walkthrough

Adds the SageOx OpenClaw toolkit: documentation, templates, installer and readiness scripts for a pinned ox binary, utilities for selecting/updating distill history state, a VPS deployment script, and a Python test runner for skill prompts; plus a .clawhubignore to exclude generated/test artifacts.

Changes

SageOx Toolkit (single coherent change DAG)

Layer / File(s) Summary
Configuration
claws/openclaw/sageox/.clawhubignore
Adds ignore patterns for docs, deployment/test scripts, and generated CSV test results.
User-facing Docs / Overview
claws/openclaw/sageox/README.md, claws/openclaw/sageox/SKILL.md
Adds README and SKILL spec describing scope, dependencies, install/test steps, manifest expectations, auth checks, and intent mappings.
Asset Templates
claws/openclaw/sageox/assets/CATCHUP.md, claws/openclaw/sageox/assets/SUMMARIZE.md
Adds structured templates for catchup briefings and multi-team summaries with format and scannability constraints.
Reference Guides
claws/openclaw/sageox/references/...
Adds multiple workflow references (setup, query, distill, distill-pipeline, glance, catchup, summary, coworkers, import-export) documenting end-to-end commands, flags, time-window rules, multi-repo behavior, and error handling.
Installer / Readiness Gate
claws/openclaw/sageox/scripts/install-ox-curl.sh, claws/openclaw/sageox/scripts/update-ox.sh
Adds pinned ox installer with platform checks and checksum verification; adds readiness gate validating pinned binary path, PATH resolution, and exact ox version match.
State Utilities
claws/openclaw/sageox/scripts/select-new-entries.sh, claws/openclaw/sageox/scripts/update-state.sh
Adds scripts to select new distill-history entry IDs per team and to atomically merge/prune/deduplicate per-team JSON state.
Automation & Testing
claws/openclaw/sageox/deploy-to-vps.sh, claws/openclaw/sageox/test-skill.py
Adds rsync-based VPS deploy script and a Python test runner that exercises skill prompts over SSH and writes timestamped CSV results.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant User as User
  participant FS as Filesystem/Repo
  participant Ox as ox CLI
  participant Claude as Claude
  User->>Ox: run "catchup" (time window)
  Ox->>FS: ox distill/history, ox session list, ox insights
  FS-->>Ox: gathered artifacts (history, sessions, insights)
  Ox->>FS: render assets/CATCHUP.md with artifacts
  Ox->>Claude: timeout 600 claude -p (prompt with templated content)
  Claude-->>Ox: synthesized briefing (mrkdwn)
  Ox-->>User: briefing (or error / raw-data offer)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • sageox/ox#516 — Related pinned-release curl installer and readiness-gate behavior for ox binary deployment.
  • sageox/ox#511 — Overlaps on ox install/update scripts and accompanying SKILL/references documentation.
  • sageox/ox#513 — Shares select-new-entries/update-state helper scripts and summary workflow changes for distill-history-based summaries.

Poem

🐇 I stitched a toolkit, scripts snug in a row,
ox pinned and ready, templates set to go.
Distill, catchup, deploy — the workflows align,
A rabbit’s small hop toward knowledge divine. 🌿✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(claws): add unified sageox OpenClaw skill' accurately summarizes the main change: introducing a new unified OpenClaw skill that consolidates multiple sageox capabilities.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch avi/sageox-unified-openclaw-skill

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 10

🧹 Nitpick comments (2)
claws/openclaw/sageox/deploy-to-vps.sh (1)

8-8: Using $HOME is clearer, but the quoted tilde will still expand correctly in rsync/SSH.

When rsync sends a remote path via SSH (format host:path), the remote shell expands tilde syntax. Since the connection is as the ubuntu user, ~ will expand to /home/ubuntu on the VPS, and deployment will work correctly.

Using $HOME is still recommended for code clarity and consistency with VPS_KEY above it, but this is not a functional issue.

Suggested improvement
-SKILL_DIR="~/.openclaw/workspace/skills/sageox"
+SKILL_DIR="$HOME/.openclaw/workspace/skills/sageox"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@claws/openclaw/sageox/deploy-to-vps.sh` at line 8, The SKILL_DIR variable in
deploy-to-vps.sh uses a quoted tilde ("~/.openclaw/...") which works but is less
explicit; change SKILL_DIR to use $HOME (e.g.,
SKILL_DIR="$HOME/.openclaw/workspace/skills/sageox") for clarity and consistency
with VPS_KEY and other env vars, ensuring the path expands correctly in local
and remote contexts (refer to the SKILL_DIR assignment in deploy-to-vps.sh).
claws/openclaw/sageox/references/setup.md (1)

72-74: ⚡ Quick win

Add concrete verification command for claude credentials.

Steps 1-3 of the authentication checklist provide explicit verification commands (ox status, gh auth status, git config user.name), but step 4 only describes the credential sources without showing how to verify. Consider adding a concrete verification step for consistency:

4. Confirm `claude` has credentials:
   ```bash
   claude --version && (test -f ~/.claude/config.json || test -n "$ANTHROPIC_API_KEY")

If this fails, either run claude login (Pro/Max OAuth) or export ANTHROPIC_API_KEY in the shell that launches OpenClaw.


This maintains the pattern established by the other checks and gives users a clear pass/fail signal.

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against the current code and only fix it if needed.

In @claws/openclaw/sageox/references/setup.md around lines 72 - 74, Add a
concrete verification command for Claude credentials: update the checklist step
mentioning claude/ANTHROPIC_API_KEY to include a shell check that verifies
the claude CLI is available and that either ~/.claude/config.json exists or
the ANTHROPIC_API_KEY environment variable is set; if the check fails,
instruct to run claude login or export ANTHROPIC_API_KEY before launching
OpenClaw.


</details>

</blockquote></details>

</blockquote></details>

<details>
<summary>🤖 Prompt for all review comments with AI agents</summary>

Verify each finding against the current code and only fix it if needed.

Inline comments:
In @claws/openclaw/sageox/README.md:

  • Around line 18-22: Update the Prerequisites section to include the missing ox
    bootstrap/prime steps: explicitly list and order the commands users must run
    (start with ox agent prime first, then ox login, ox init, ox doctor, and
    finally ox status) and add a short note that ox agent prime must be run
    before any other action to enable SageOx queries; ensure these commands are
    placed alongside the existing ox installation note so users see installation +
    required initialization steps together.

In @claws/openclaw/sageox/references/summary.md:

  • Around line 27-29: The fenced code blocks in the summary (the warning line,
    the "### Team" block and the bulleted list block — look for the triple-backtick
    blocks surrounding the warning string, the "### Team "<team_id>"" section and
    the bullets starting with "- Organize the summary...") are missing language
    identifiers; update each opening fence from totext so they become
    text ... which satisfies MD040 and clarifies the block type without
    changing content.
  • Around line 75-77: The shell step uses the GNU-only timeout binary ("timeout
    600 claude -p --model claude-sonnet-4-6 <<< "$PROMPT"") which breaks on macOS;
    replace it with a portable wrapper that picks timeout or gtimeout, e.g. set
    TIMEOUT_BIN="$(command -v timeout || command -v gtimeout)" and invoke
    "$TIMEOUT_BIN" 600 claude -p --model claude-sonnet-4-6 <<< "$PROMPT"; apply the
    same change to the analogous invocation in catchup.md.

In @claws/openclaw/sageox/scripts/install-ox-curl.sh:

  • Around line 40-42: Preflight currently checks for curl and tar but not jq,
    causing late failures; add the same preflight check used for curl/tar to verify
    jq is installed and exit with code 3 and an error message if missing; apply this
    change both in the initial preflight block (the command -v curl/tar checks) and
    the later install/check block around lines referenced (the block handling
    state-file emission), so the script fails early with the documented tool-missing
    flow when jq is absent.

In @claws/openclaw/sageox/scripts/update-ox.sh:

  • Line 31: Update the remediation path strings in the echo messages inside
    update-ox.sh to point to the correct doc (references/setup.md) instead of
    references/INSTALL.md; locate the echo lines that print "ox install state not
    configured — run install flow from references/INSTALL.md" (and the similar
    messages at the other occurrences) and replace the INSTALL.md path with setup.md
    so the error messages match the SKILL.md prerequisite flow.

In @claws/openclaw/sageox/scripts/update-state.sh:

  • Around line 88-91: Replace the predictable TMP_FILE assignment that uses the
    PID suffix with a secure mktemp call: create a temp file in the same directory
    as STATE_FILE using mktemp, assign it to TMP_FILE, write NEW_STATE into
    TMP_FILE, and then atomically mv it to STATE_FILE; ensure the trap cleans up the
    mktemp-created TMP_FILE and that failure paths still remove TMP_FILE before
    exit. Reference the TMP_FILE, STATE_FILE, NEW_STATE variables and the existing
    trap/mv logic when making the change.

In @claws/openclaw/sageox/SKILL.md:

  • Around line 50-52: Update the prerequisite flow in SKILL.md to include an
    explicit "ox agent prime" step before any other SageOx capability checks or
    actions (specifically insert this before the sentence starting "Before doing
    anything else, verify the environment. Run every check in order." and the
    repeated block around lines 75-82); state that you must run ox agent prime
    first and stop if it hasn't been executed, and adjust the explanatory text to
    mention that this step enables SageOx queries and is required even if
    install/auth checks pass.

In @claws/openclaw/sageox/test-skill.py:

  • Around line 93-97: Replace the insecure SSH option in the command argument
    list: where the SSH invocation is built (the list containing "ssh", "-i",
    str(VPS_KEY), "-o", "StrictHostKeyChecking=no", "-o", "ConnectTimeout=10",
    VPS_HOST), change the "-o", "StrictHostKeyChecking=no" element to use "-o",
    "StrictHostKeyChecking=accept-new" (or remove it and point SSH at a managed
    known_hosts file via "-o", "UserKnownHostsFile=/path/to/known_hosts") so tests
    do not silently accept MITM; keep VPS_KEY and VPS_HOST usage intact.
  • Line 31: The constant OUTPUT_DIR is set to a shared /tmp path which can expose
    sensitive test outputs; change the default to a private directory under the
    current user's $HOME (e.g., Path(os.environ.get("HOME", "~")) /
    ".sageox-test-results") and ensure the code that creates the directory (the
    place where OUTPUT_DIR is used/created, and the other occurrences around the
    second occurrence at lines referenced 126-127) sets restrictive permissions
    (mode 0o700) and uses mkdir(parents=True, exist_ok=True) so only the user can
    read/write the output; update any related tests or docstrings to mention the new
    default and keep the original /tmp behavior only if an explicit environment
    variable or config overrides OUTPUT_DIR.
  • Around line 92-99: The ssh_cmd construction uses repr(prompt) which can lead
    to unsafe remote shell interpretation; replace repr(prompt) with
    shlex.quote(prompt) and also wrap session_id with shlex.quote(session_id) so
    both values are safely shell-escaped, update the f-string in ssh_cmd to use
    those quoted values, and add an import for shlex at the top of the file; locate
    usage in the ssh_cmd list (and any other places using session_id or prompt for
    remote shell commands) and apply the same quoting.

Nitpick comments:
In @claws/openclaw/sageox/deploy-to-vps.sh:

  • Line 8: The SKILL_DIR variable in deploy-to-vps.sh uses a quoted tilde
    ("~/.openclaw/...") which works but is less explicit; change SKILL_DIR to use
    $HOME (e.g., SKILL_DIR="$HOME/.openclaw/workspace/skills/sageox") for clarity
    and consistency with VPS_KEY and other env vars, ensuring the path expands
    correctly in local and remote contexts (refer to the SKILL_DIR assignment in
    deploy-to-vps.sh).

In @claws/openclaw/sageox/references/setup.md:

  • Around line 72-74: Add a concrete verification command for Claude credentials:
    update the checklist step mentioning claude/ANTHROPIC_API_KEY to include a
    shell check that verifies the claude CLI is available and that either
    ~/.claude/config.json exists or the ANTHROPIC_API_KEY environment variable
    is set; if the check fails, instruct to run claude login or export
    ANTHROPIC_API_KEY before launching OpenClaw.

</details>

<details>
<summary>🪄 Autofix (Beta)</summary>

Fix all unresolved CodeRabbit comments on this PR:

- [ ] <!-- {"checkboxId": "4b0d0e0a-96d7-4f10-b296-3a18ea78f0b9"} --> Push a commit to this branch (recommended)
- [ ] <!-- {"checkboxId": "ff5b1114-7d8c-49e6-8ac1-43f82af23a33"} --> Create a new PR with the fixes

</details>

---

<details>
<summary>ℹ️ Review info</summary>

<details>
<summary>⚙️ Run configuration</summary>

**Configuration used**: defaults

**Review profile**: CHILL

**Plan**: Pro Plus

**Run ID**: `67d56bcf-a10d-46d2-bb58-732265a1b814`

</details>

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 760aeb03a4452e98b473a49dcc1e3a7e481e0ce2 and ea8267c462d820378ea97cc4e9e26509b257b8f7.

</details>

<details>
<summary>📒 Files selected for processing (20)</summary>

* `claws/openclaw/sageox/.clawhubignore`
* `claws/openclaw/sageox/README.md`
* `claws/openclaw/sageox/SKILL.md`
* `claws/openclaw/sageox/assets/CATCHUP.md`
* `claws/openclaw/sageox/assets/SUMMARIZE.md`
* `claws/openclaw/sageox/deploy-to-vps.sh`
* `claws/openclaw/sageox/references/catchup.md`
* `claws/openclaw/sageox/references/coworkers.md`
* `claws/openclaw/sageox/references/distill-pipeline.md`
* `claws/openclaw/sageox/references/distill.md`
* `claws/openclaw/sageox/references/glance.md`
* `claws/openclaw/sageox/references/import-export.md`
* `claws/openclaw/sageox/references/query.md`
* `claws/openclaw/sageox/references/setup.md`
* `claws/openclaw/sageox/references/summary.md`
* `claws/openclaw/sageox/scripts/install-ox-curl.sh`
* `claws/openclaw/sageox/scripts/select-new-entries.sh`
* `claws/openclaw/sageox/scripts/update-ox.sh`
* `claws/openclaw/sageox/scripts/update-state.sh`
* `claws/openclaw/sageox/test-skill.py`

</details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

Comment on lines +18 to +22
## Prerequisites

- `ox` — installed via bundled curl script (not Homebrew)
- `git`, `gh`, `jq`, `claude` — declared in skill metadata

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Prerequisites are missing required ox bootstrap/prime steps.

Please add ox login, ox init, ox doctor, ox status, and ox agent prime; without these, users can install the skill but still fail core SageOx query flows.

Based on learnings: Run ox agent prime before ANY other action to enable SageOx queries; initialize with ox login, ox init, ox doctor, then verify via ox status.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@claws/openclaw/sageox/README.md` around lines 18 - 22, Update the
Prerequisites section to include the missing ox bootstrap/prime steps:
explicitly list and order the commands users must run (start with `ox agent
prime` first, then `ox login`, `ox init`, `ox doctor`, and finally `ox status`)
and add a short note that `ox agent prime` must be run before any other action
to enable SageOx queries; ensure these commands are placed alongside the
existing `ox` installation note so users see installation + required
initialization steps together.

Comment thread claws/openclaw/sageox/references/summary.md Outdated
Comment thread claws/openclaw/sageox/references/summary.md
Comment thread claws/openclaw/sageox/scripts/install-ox-curl.sh
Comment thread claws/openclaw/sageox/scripts/update-ox.sh Outdated
Comment thread claws/openclaw/sageox/scripts/update-state.sh Outdated
Comment on lines +50 to +52
Before doing anything else, verify the environment. Run every check in
order. If any fails, explain what's missing and stop.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Add an explicit ox agent prime prerequisite before capability execution.

The prerequisite flow omits ox agent prime, which is required in this repo before SageOx actions. Without it, later commands can fail despite passing install/auth checks.

Suggested patch
 ### 3. Authentication
 
 1. `ox status` — confirm authenticated. If not: `ox login`.
 2. `gh auth status` — confirm GitHub credentials.
 3. `git config user.name` — confirm git identity.
 4. `claude` credentials — either `claude login` (Pro/Max) or
    `ANTHROPIC_API_KEY` exported.
+5. `ox agent prime` — run before any SageOx operation.

Based on learnings: Run ox agent prime before ANY other action to enable SageOx queries.

Also applies to: 75-82

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@claws/openclaw/sageox/SKILL.md` around lines 50 - 52, Update the prerequisite
flow in SKILL.md to include an explicit "ox agent prime" step before any other
SageOx capability checks or actions (specifically insert this before the
sentence starting "Before doing anything else, verify the environment. Run every
check in order." and the repeated block around lines 75-82); state that you must
run `ox agent prime` first and stop if it hasn't been executed, and adjust the
explanatory text to mention that this step enables SageOx queries and is
required even if install/auth checks pass.

Comment thread claws/openclaw/sageox/test-skill.py Outdated
Comment thread claws/openclaw/sageox/test-skill.py
Comment thread claws/openclaw/sageox/test-skill.py
- Fix INSTALL.md -> setup.md path mismatch in update-ox.sh
- Add jq preflight check in install-ox-curl.sh
- Use mktemp instead of predictable .$$  in update-state.sh
- Make timeout portable (timeout/gtimeout) in summary.md and catchup.md
- Add MD040 language tags to fenced code blocks in summary.md
- Use shlex.quote instead of repr() for shell escaping in test-skill.py
- Use StrictHostKeyChecking=accept-new instead of =no
- Move test output to ~/.sageox-test-results with 0o700 permissions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: SageOx <ox@sageox.ai>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@claws/openclaw/sageox/references/catchup.md`:
- Around line 49-50: The documentation references the template as
`assets/CATCHUP.md` which is ambiguous because step 2 runs in the selected repo
directory; update the reference to use an unambiguous, absolute or
skill-root-relative template path (e.g.,
`openclaw/skills/<skill-name>/assets/CATCHUP.md` or a full repo-root path)
wherever the prompt is built (the "Build a prompt by substituting gathered data
into `assets/CATCHUP.md`" step) so that the templating logic loads the correct
`CATCHUP.md` from the OpenClaw skill root rather than the selected repo
directory.
- Around line 58-60: The TIMEOUT_BIN assignment and usage
(TIMEOUT_BIN="$(command -v timeout || command -v gtimeout)" and "$TIMEOUT_BIN"
600 claude ...) must be guarded: detect when TIMEOUT_BIN is empty before
invoking it and emit a clear error/exit (e.g., print "timeout or gtimeout not
found" and exit 1) so the claude call isn't attempted with an empty command;
apply the same guard to the identical pattern in summary.md (the TIMEOUT_BIN
variable and its invocation) to avoid non-actionable failures.

In `@claws/openclaw/sageox/scripts/install-ox-curl.sh`:
- Around line 207-218: The TMP_STATE_FILE created by mktemp can be left behind
if jq fails because the existing EXIT trap only removes WORK_DIR; initialize
TMP_STATE_FILE="" before the trap and extend the EXIT trap handler (the same
trap declared around WORK_DIR) to also check and remove TMP_STATE_FILE if
non-empty, ensuring cleanup even on set -euo pipefail failures; locate the
mktemp/TMP_STATE_FILE usage, the jq -> mv block, and the existing trap (the
handler that currently cleans WORK_DIR) to update it accordingly and avoid
adding a separate trap.

In `@claws/openclaw/sageox/test-skill.py`:
- Line 127: The current call OUTPUT_DIR.mkdir(parents=True, exist_ok=True,
mode=0o700) only sets permissions for newly created directories and leaves
pre-existing ones unchanged; after the mkdir call, enforce the desired
permissions by applying a chmod to OUTPUT_DIR (e.g., call os.chmod(OUTPUT_DIR,
0o700) or OUTPUT_DIR.chmod(0o700)) so existing directories get the correct 0o700
mode, and wrap it in a try/except if you need to surface or log permission
errors.
- Around line 131-134: The SSH preflight subprocess.run invocation omits the
StrictHostKeyChecking=accept-new option causing failures on fresh hosts; update
the argument list in the preflight check (the subprocess.run call creating
"check") to include "-o", "StrictHostKeyChecking=accept-new" (matching the
option used by send_prompt) so the preflight behaves the same as send_prompt and
won't hang or prompt for interactive confirmation.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 40190353-601a-4f9c-af81-3d0346f496b3

📥 Commits

Reviewing files that changed from the base of the PR and between ea8267c and f4b28f1.

📒 Files selected for processing (6)
  • claws/openclaw/sageox/references/catchup.md
  • claws/openclaw/sageox/references/summary.md
  • claws/openclaw/sageox/scripts/install-ox-curl.sh
  • claws/openclaw/sageox/scripts/update-ox.sh
  • claws/openclaw/sageox/scripts/update-state.sh
  • claws/openclaw/sageox/test-skill.py
✅ Files skipped from review due to trivial changes (1)
  • claws/openclaw/sageox/references/summary.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • claws/openclaw/sageox/scripts/update-state.sh

Comment on lines +49 to +50
Build a prompt by substituting gathered data into `assets/CATCHUP.md`:
- `{{DISTILLED}}` — distilled daily entries (content from step 2)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Use an unambiguous template path for CATCHUP.md.

Step 2 explicitly runs from the selected repo directory, but this step references assets/CATCHUP.md as if it were local to that repo. That can break prompt templating when the skill assets live under the OpenClaw skill root.

Suggested doc fix
-Build a prompt by substituting gathered data into `assets/CATCHUP.md`:
+Build a prompt by substituting gathered data into
+`claws/openclaw/sageox/assets/CATCHUP.md` (or an equivalent resolved skill-root path):
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Build a prompt by substituting gathered data into `assets/CATCHUP.md`:
- `{{DISTILLED}}` — distilled daily entries (content from step 2)
Build a prompt by substituting gathered data into
`claws/openclaw/sageox/assets/CATCHUP.md` (or an equivalent resolved skill-root path):
- `{{DISTILLED}}` — distilled daily entries (content from step 2)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@claws/openclaw/sageox/references/catchup.md` around lines 49 - 50, The
documentation references the template as `assets/CATCHUP.md` which is ambiguous
because step 2 runs in the selected repo directory; update the reference to use
an unambiguous, absolute or skill-root-relative template path (e.g.,
`openclaw/skills/<skill-name>/assets/CATCHUP.md` or a full repo-root path)
wherever the prompt is built (the "Build a prompt by substituting gathered data
into `assets/CATCHUP.md`" step) so that the templating logic loads the correct
`CATCHUP.md` from the OpenClaw skill root rather than the selected repo
directory.

Comment on lines +58 to +60
TIMEOUT_BIN="$(command -v timeout || command -v gtimeout)"
"$TIMEOUT_BIN" 600 claude -p --model claude-sonnet-4-6 <<< "$PROMPT"
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify whether docs/scripts in the repo already guarantee timeout availability.
# Expected:
# - Either a documented prerequisite mentioning timeout/gtimeout
# - Or script-level preflight checks before timeout execution

rg -n -C2 'command -v timeout|gtimeout|TIMEOUT_BIN|coreutils|prereq|preflight' claws openclaw || true

Repository: sageox/ox

Length of output: 3287


🏁 Script executed:

# First, let's check the full context of catchup.md around the timeout usage
cat -n claws/openclaw/sageox/references/catchup.md | head -80 | tail -30

Repository: sageox/ox

Length of output: 1291


🏁 Script executed:

# Check if there's documentation about prerequisites/requirements
git ls-files | grep -i -E '(readme|prerequisite|setup|install|requirement)' | head -20

Repository: sageox/ox

Length of output: 745


🏁 Script executed:

# Search for any preflight or prerequisite validation scripts
rg -n 'prerequisite|preflight|check.*timeout|check.*timeout' --type md --type sh --type bash

Repository: sageox/ox

Length of output: 82


🏁 Script executed:

# Check setup.md and INSTALL.md for timeout/gtimeout prerequisites
cat claws/openclaw/sageox/references/setup.md | head -100

Repository: sageox/ox

Length of output: 3186


🏁 Script executed:

# Check the main README for timeout mention
rg -n -A2 -B2 'timeout|gtimeout|coreutils|GNU|prerequisite' claws/openclaw/sageox/README.md

Repository: sageox/ox

Length of output: 35


🏁 Script executed:

# Search for any validation or check for timeout in the skill code
rg -n 'timeout|gtimeout' claws/openclaw/sageox/scripts/ claws/openclaw/sageox/references/

Repository: sageox/ox

Length of output: 504


🏁 Script executed:

# Check if there's any error handling in claude command invocation
rg -n -A3 'TIMEOUT_BIN.*600|claude.*600' claws/openclaw/sageox/

Repository: sageox/ox

Length of output: 719


Add guard for missing timeout/gtimeout binary before synthesis execution.

The code assumes timeout (or gtimeout on macOS) is available but doesn't validate it exists. If neither binary is present, TIMEOUT_BIN becomes empty and the claude command fails with a non-actionable error. Add an explicit check before execution.

This same pattern appears in summary.md (lines 76–77) and should also be fixed there.

Suggested fix
 TIMEOUT_BIN="$(command -v timeout || command -v gtimeout)"
+if [ -z "$TIMEOUT_BIN" ]; then
+  echo "Error: timeout utility not found. Install coreutils (timeout) or switch to macOS (gtimeout)."
+  return 1
+fi
 "$TIMEOUT_BIN" 600 claude -p --model claude-sonnet-4-6 <<< "$PROMPT"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
TIMEOUT_BIN="$(command -v timeout || command -v gtimeout)"
"$TIMEOUT_BIN" 600 claude -p --model claude-sonnet-4-6 <<< "$PROMPT"
```
TIMEOUT_BIN="$(command -v timeout || command -v gtimeout)"
if [ -z "$TIMEOUT_BIN" ]; then
echo "Error: timeout utility not found. Install coreutils (timeout) or switch to macOS (gtimeout)."
return 1
fi
"$TIMEOUT_BIN" 600 claude -p --model claude-sonnet-4-6 <<< "$PROMPT"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@claws/openclaw/sageox/references/catchup.md` around lines 58 - 60, The
TIMEOUT_BIN assignment and usage (TIMEOUT_BIN="$(command -v timeout || command
-v gtimeout)" and "$TIMEOUT_BIN" 600 claude ...) must be guarded: detect when
TIMEOUT_BIN is empty before invoking it and emit a clear error/exit (e.g., print
"timeout or gtimeout not found" and exit 1) so the claude call isn't attempted
with an empty command; apply the same guard to the identical pattern in
summary.md (the TIMEOUT_BIN variable and its invocation) to avoid non-actionable
failures.

Comment thread claws/openclaw/sageox/scripts/install-ox-curl.sh
Comment thread claws/openclaw/sageox/test-skill.py
Comment thread claws/openclaw/sageox/test-skill.py
- Add TMP_STATE_FILE cleanup to EXIT trap in install-ox-curl.sh
- Enforce 0o700 on existing output dir with os.chmod in test-skill.py
- Add StrictHostKeyChecking=accept-new to SSH preflight check

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: SageOx <ox@sageox.ai>
@avi-ox-agola avi-ox-agola merged commit 54dcf66 into main May 7, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant