← Back to Skills Marketplace
guillaumemaka

Kilocode Model Sync

by Guillaume Maka · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
101
Downloads
0
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install kilocode-model-sync
Description
Sync the Kilocode provider model list in openclaw.json with the live Kilo AI API. Use when: running the weekly model sync job, checking for new/removed/updat...
README (SKILL.md)

----- THIS SKILL IS DEPRECATED - DON'T RUN -----

----- KILOCODE GATEWAY IS NOW BUILT-IN IN OPENCLAW -----

Kilocode Model Sync

Workspace: ~/.openclaw/workspace-steve/ Scripts: ~/.openclaw/workspace/skills/kilocode-model-sync/scripts/ Snapshots/diffs/patches: ~/.openclaw/workspace/kilocode-models/ Telegram delivery: Use the message tool with channel=telegram, target Guillaume's chat.


Step 1 — Run the sync script

source ~/.openclaw/.env && python3 ~/.openclaw/workspace/skills/kilocode-model-sync/scripts/sync_models.py

Parse the JSON result from stdout. It contains:

Field Meaning
status "changed" | "no_change" | "error"
total_models Total models fetched from API
diff.added New models not in previous snapshot
diff.removed Models that disappeared
diff.updated Models with changed fields
snapshot_path Where today's snapshot was saved
patch_path Path to the .patch.json file (only if changed)
diff_path Path to the .diff.json file (only if changed)

Step 2 — If status == "no_change"

Write a brief memory note and stop. No notification needed.

# memory/YYYY-MM-DD.md entry:
## Kilocode Model Sync — YYYY-MM-DD
- Status: no_change
- Total models: X
- No action required.

Step 3 — If status == "changed", notify Guillaume via Telegram

Use the message tool to send to Guillaume's Telegram:

🤖 *Kilocode Model Sync — {date}*

Found changes in the Kilocode model list:
✅ Added: {N} model(s)
❌ Removed: {N} model(s)
🔄 Updated: {N} model(s)

*New models:*
{for each added: • `id` — Name (ctx: Xk tokens, cost: $Y input/$Z output per 1k)}

*Removed models:*
{for each removed: • `id` — Name}

Reply to Grog: `@steve approve` to apply, or `@steve skip` to ignore.

Format costs as $0.001/1k (multiply the raw per-token value × 1000). Use free for models with 0 cost on both input and output.


Step 4 — Wait for approval signal from Grog

Grog will relay a sessions_send message to your session containing either:

  • approve — proceed to apply
  • skip — log and stop

Step 5 — If approved, apply the patch

python3 ~/.openclaw/workspace/skills/kilocode-model-sync/scripts/apply_patch.py \x3Cpatch_path>

The script:

  1. Backs up openclaw.json with a timestamp
  2. Replaces models.providers.kilocode.models with the new list
  3. Runs openclaw gateway restart
  4. Polls openclaw gateway status until RPC probe: ok (up to 30s)

Result fields:

  • status: "ok" | "applied_restart_failed"
  • backup_path: where the backup was saved
  • gateway.ok: true/false
  • gateway.error: error message if failed

Step 6 — Write mission control entry

Append to ~/.openclaw/workspace/memory/YYYY-MM-DD.md:

## Kilocode Model Sync — YYYY-MM-DD
- **Status:** Applied ✅
- **Added:** N models — list ids
- **Removed:** N models — list ids
- **Updated:** N models — list ids
- **Backup:** backup_path
- **Gateway restart:** ok / failed (error message)
- **Approved by:** Guillaume (via Telegram)

Step 7 — Send Telegram confirmation

✅ *Kilocode Model Sync — Applied*

{N} new models added to openclaw.json.
{N} models removed.
Gateway restarted successfully. ✅

Backup saved at: {backup_path}

If gateway restart failed:

⚠️ *Kilocode Model Sync — Patch Applied, Gateway Restart Failed*

Models were written to openclaw.json but the gateway did not restart cleanly.
Error: {error}
Please restart manually: `openclaw gateway restart`

Step 8 — Report summary to Grog (sessions_send to main session)

After completion, send a concise summary to the main agent session so Grog can relay it to Guillaume if needed. Use sessions_send with label=main or sessionKey=agent:main:main.


Error handling

  • If sync_models.py exits with status "error": notify Guillaume via Telegram with the error, stop.
  • If apply_patch.py fails to write config: the script auto-restores from backup; report failure.
  • If gateway doesn't come back: report in Telegram, tell Guillaume to restart manually.
  • Always write a memory note even on failure.
Usage Guidance
This skill appears to do what it says (fetch Kilocode models and update openclaw.json) but there are a few things to check before running it: - Metadata mismatch: the registry lists no required env vars, but the SKILL.md and scripts require KILOCODE_API_KEY (in ~/.openclaw/.env or env). Don't run it until you confirm the metadata or the skill's origin. - Sensitive files: the scripts read ~/.openclaw/.env and will write snapshots, diffs, patch files, and modify ~/.openclaw/openclaw.json. Inspect those files and ensure .env contains only the KILOCODE_API_KEY (or that you are comfortable exposing any other keys present) before running. - Review the generated patch before applying: sync_models.py writes a patch that will overwrite models.providers.kilocode.models. Prefer a manual review of the patch file (kilocode-models-YYYY-MM-DD.patch.json) before applying. - Gateway restart: apply_patch.py will run `openclaw gateway restart` (looks for a hardcoded nvm path then PATH). Make sure restarting the gateway is safe in your environment and that the backup created (openclaw.json.bak.TIMESTAMP) is recoverable. - Deprecated note: SKILL.md contains a big header saying the skill is deprecated and that Kilocode gateway is now built-in. That suggests this skill may be obsolete—confirm whether you actually need it. If you still want to proceed: verify the KILOCODE_API_KEY value, inspect the snapshot/diff/patch files under ~/.openclaw/workspace/kilocode-models/, and run sync_models.py manually in a non-production environment, review the produced patch, and then run apply_patch.py only after manual approval.
Capability Analysis
Type: OpenClaw Skill Name: kilocode-model-sync Version: 1.0.0 The skill performs high-risk operations including reading sensitive environment variables from `~/.openclaw/.env`, modifying the core `openclaw.json` configuration file, and executing system commands to restart the gateway service. While these actions are aligned with the stated purpose of syncing model lists from the Kilo AI API, the broad file system access and execution privileges in `apply_patch.py` and `sync_models.py` represent a significant attack surface. Additionally, the skill contains hardcoded paths to specific Node.js versions and instructions for external data exfiltration/notification via Telegram to specific users, which is characteristic of a highly customized or internal tool with broad permissions.
Capability Assessment
Purpose & Capability
Name/description (sync Kilocode models into openclaw.json) align with the scripts' behavior: fetch models from https://api.kilo.ai, produce snapshots/diffs/patches, write a patch that replaces models.providers.kilocode.models, and restart the OpenClaw gateway. However, the registry metadata claims no required env vars while both SKILL.md and the scripts require KILOCODE_API_KEY in ~/.openclaw/.env (or env). That metadata mismatch is unexpected and should be corrected.
Instruction Scope
SKILL.md instructions are concrete and match the included scripts: source ~/.openclaw/.env, run sync_models.py, review results, optionally run apply_patch.py which backs up and writes openclaw.json and restarts the gateway. The instructions reference using the agent's 'message' tool and sessions_send for Telegram and approval workflow—these are outside the scripts but consistent with an operator-driven sync flow. The skill does not attempt to read unrelated system paths beyond ~/.openclaw and the user workspace.
Install Mechanism
This is an instruction-only skill with included Python scripts and no install spec. Nothing is downloaded at runtime by the skill itself. The attack surface from installation is low, but running the scripts will write to disk (snapshots, patch files) under ~/.openclaw/workspace which is expected for this task.
Credentials
The runtime requires an API credential (KILOCODE_API_KEY) read from ~/.openclaw/.env or from OS env, but the registry metadata did not declare any required environment variables—this is an inconsistency. The scripts only use that token for the kilo.ai API, which is proportionate, but load_env will parse the whole ~/.openclaw/.env (which may contain other secrets). The SKILL.md explicitly instructs sourcing that file, which could expose other secrets to the process—be cautious and ensure the .env contains only intended values.
Persistence & Privilege
The skill is not always: true (not force-included) and disable-model-invocation is true (the model cannot autonomously call it), which reduces autonomous risk. The scripts do modify a configuration file (~/.openclaw/openclaw.json) and restart the gateway — that is appropriate for a config-sync skill but is a privileged operation; ensure you trust the source before allowing it to run and that backups are kept (the script creates backups).
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install kilocode-model-sync
  3. After installation, invoke the skill by name or use /kilocode-model-sync
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
**This version officially deprecates the kilocode-model-sync skill.** - Added prominent deprecation notice: Kilocode Gateway is now built-in to OpenClaw; do not run this skill. - Documentation updated to reflect end-of-life status and recommend against use. - All previous operational steps and usage details retained for reference, but strictly marked as deprecated. - No functional or code changes; this release is a documentation and process update only.
Metadata
Slug kilocode-model-sync
Version 1.0.0
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 1
Frequently Asked Questions

What is Kilocode Model Sync?

Sync the Kilocode provider model list in openclaw.json with the live Kilo AI API. Use when: running the weekly model sync job, checking for new/removed/updat... It is an AI Agent Skill for Claude Code / OpenClaw, with 101 downloads so far.

How do I install Kilocode Model Sync?

Run "/install kilocode-model-sync" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Kilocode Model Sync free?

Yes, Kilocode Model Sync is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Kilocode Model Sync support?

Kilocode Model Sync is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Kilocode Model Sync?

It is built and maintained by Guillaume Maka (@guillaumemaka); the current version is v1.0.0.

💬 Comments