openclaw-tune

openclaw-tune is a skill for Claude Code, Codex from KCNyu/clawock. It costs 140 tokens per session (2,834 once invoked), scanned A, original, MIT.

A maintenance routine for an OpenClaw installation, an agent system that stores sessions, settings, scheduled jobs, and recall data. It checks stored files, model fallback settings, scheduled-task health, and short-term recall noise.

In plain words
What is it for?
Run it after an OpenClaw update or every one to two weeks. It archives stale session backups, checks model fallback and scheduled jobs, and cleans recall noise.
Why use it?
It helps find accumulated backups and other storage bloat, catch configuration problems after updates, and avoid changing files that are currently in use.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: mentions AGENTS.md; mentions Codex; built for openclaw.

Good fit Run it after an OpenClaw update or every one to two weeks. It archives stale session backups, checks model fallback and scheduled jobs, and cleans recall noise.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kcnyu/clawock/openclaw-tune
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add KCNyu/clawock --skill openclaw-tune
Clone the repo
git clone --depth 1 https://github.com/KCNyu/clawock

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for openclaw-tune

README.md
[![agentmods](https://agentmods.dev/badge/skills/kcnyu/clawock/openclaw-tune/github.svg)](https://agentmods.dev/skills/kcnyu/clawock/openclaw-tune)
Your own site
<a href="https://agentmods.dev/skills/kcnyu/clawock/openclaw-tune"><img src="https://agentmods.dev/badge/skills/kcnyu/clawock/openclaw-tune/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for openclaw-tune

Your own site · 80×15
<a href="https://agentmods.dev/skills/kcnyu/clawock/openclaw-tune"><img src="https://agentmods.dev/badge/skills/kcnyu/clawock/openclaw-tune.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 140 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,834 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Rogue Agent · line 44
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00140 $0.02834
Opus 5 $0.00070 $0.01417
Sonnet 5 $0.00028 $0.00567
Haiku 4.5 $0.00014 $0.00283

Measured 8d ago against content hash 963e9d053f6a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

openclaw-tune scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -sf http://127.0.0.1:18789/health && echo " ✓ gateway up"
skills/openclaw-tune/SKILL.md · 220 lines

How it starts

The opening of the file, as written. The whole thing — 220 lines — stays where its author put it; the contents beside it link to each section on GitHub.

OpenClaw Tune-Up

Use this skill to keep kcn's openclaw setup lean. Run it after every openclaw update, or as a periodic chore every 1-2 weeks.

When to invoke

  • User says /openclaw-tune or 优化下 openclaw
  • After openclaw update (defaults may have shifted; configs may need migration)
  • When response feels slow / token costs creeping up
  • When agents/main/sessions/ looks suspiciously large

Operating principles

  1. Don't delete, archive first: move stale files to /tmp/openclaw-cleanup-<date>/ so they can be recovered for a day
  2. Verify before touching live state: if openclaw gateway is running, only touch files it doesn't actively hold (use lsof)
  3. Real holdings, real data: never propose changes that hardcode portfolio numbers — portfolio.json is the only source of truth
  4. Report what was done with sizes/counts; never silent fixes

Checklist

1. Disk bloat

Big offenders found historically:

Path What to look for Action
~/.openclaw/agents/main/sessions/*.bak-* Transcript backups, no rotation. One active session can accumulate 100+ files (7MB each = 700MB) Keep latest 3 per session, archive rest
~/.openclaw/agents/main/sessions/*.bak-* (orphan) .bak file with no matching .jsonl (session deleted but backup stayed) Archive all
~/.openclaw/openclaw.json.clobbered.* Config corruption snapshots (e.g. 2026-04-25 had 78) Archive all (the .last-good retains canonical state)
~/.openclaw/logs/stability/*.json Crash dumps from past unhandled rejections Archive if older than 30 days
~/.openclaw/memory/main.sqlite.tmp-* Orphaned SQLite migration tmp file from interrupted write. Verify lsof returns empty, mtime > 7d, then delete Delete only if not held
~/.openclaw/media/ Generated images, voice clips Check size; archive if > 100MB and not referenced
~/.openclaw/agents/main/sessions/*.trajectory.jsonl Audit trajectory logs — large but useful for debugging Leave unless > 500MB total

Read the full file on GitHub · 220 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 220 lines · 140 tokens per session scan A 963e9d053f6a

Subscribe to this mod's changes

openclaw-tune is a skill published in the GitHub repository KCNyu/clawock (14 stars, last pushed yesterday), licensed MIT. It adds 140 tokens to every session and 2,834 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.