openclaw-tune
Skill23 starsChanged 3 months agoMITView on GitHub
OpenClaw host maintenance for session backup growth, disk usage, model/cron drift and memory health. Use for periodic maintenance or a specific health symptom. Version upgrades use openclaw-upgrade; repository document/skill cleanup follows AGENTS.md and its worktree/PR workflow.
In this repository14 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- site/llms.txtllms.txt
- daily-deep-briefSkill
- earnings-reviewSkill
- entry-gateSkill
- hk-stock-analysisSkill
- openclaw-upgradeSkill
- portfolio-risk-reviewSkill
- portfolio-swarm-reviewSkill
- scraplingSkill
- serenity-skillSkill
- tavilySkill
- us-stock-analysisSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Start from the reported symptom.
- Very specific: line 29
Check live ownership and preserve a recovery path.
- Very specific: line 32
Follow the owning runbook for state/config changes.
- Distinctive: line 39
Do not delete published briefs, trade records or incident lessons merely because positions were closed.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
OpenClaw host maintenance
Start from the reported symptom. Inspect the relevant surface below; a maintenance
request does not require loading investment data, running quote refreshes or changing
model choices. Workspace documentation changes follow AGENTS.md § Code changes.
Inspect before changing
| Surface | Evidence | Owner / action |
| Session storage | Sizes, ages and matching transcript for ~/.openclaw/agents/main/sessions/*.bak-*; distinguish active transcripts, backups and trajectory logs | Propose a bounded archive set. Preserve active sessions and useful diagnostic logs; file age or absence from the catalog alone does not establish that a file is disposable. |
| Other disk growth | ~/.openclaw/openclaw.json.clobbered.*, old stability dumps, media and SQLite temporary files | Check references and open handles (lsof) before moving anything. Never move an open database, WAL or SHM file. For index/state database compaction use docs/operations/sqlite-maintenance.md, including its offline/rollback requirements. |
| Injected context | config/context-manifest.json plus actual systemPromptReport, file sizes and truncation | Remove duplicate ownership only after checking consumers. Preserve concrete incident rules, scheduled input contracts and tool/skill availability. No byte target justifies dropping required context. |
| Model/fallback drift | python3 ops/host/sync_models.py --effective; compare with config/models.toml | docs/operations/models.md owns parameters, chains and synchronization. Report failing hops; do not reorder providers or change thinking/budgets as a cleanup. |
| Cron drift | openclaw cron list --json, bash ops/host/check_crons.sh --timeline, clawock system check | Compare identities, schedules, enabled state, payloads and host triggers with config/cron-schedules.json; docs/operations/cron-schedules.md is generated. Change runtime cron only via supported CLI/sync tools. |
| Recall / dreaming | Latest diagnostics and source dates, not just file counts or trading keywords | docs/operations/dreaming-review.md owns candidate review and promotion; docs/operations/sqlite-maintenance.md owns recall maintenance, its performance boundary and the KNN patch. Never prune a live recall store by keyword or promote daily prices as durable lessons. |
| After an upgrade | Installed version, patch-kit checks, actual agent context and delivery | Follow ../openclaw-upgrade/SKILL.md; do not duplicate its update/restart sequence here. |
Apply only the evidenced cleanup
- Enumerate the exact files and why each is stale. For inactive session backups, retaining the latest three per session is a starting proposal, not permission to discard transcripts or recovery evidence.
- Check live ownership and preserve a recovery path. Archive approved inactive
files under
/root/scratch/openclaw-cleanup-<date>/, with original paths and before/after sizes recorded there. Do not use/tmpfor recovery material. - Follow the owning runbook for state/config changes. Back up
openclaw.jsonbefore authorized edits. Repository files are changed in a task worktree and delivered through PR, checks, merge and live refresh. - Restart only when required and authorized for the task; first confirm no cron is in flight with the upgrade skill's structured check. Archiving inactive files and editing documentation alone do not require a restart.
Do not delete published briefs, trade records or incident lessons merely because positions were closed. Do not edit raw cron stores, SQLite internals or provider credentials to make a health check green. Generic prompt-writing advice and arbitrary file-size caps are not acceptance criteria.
Verify and report
Re-run the check that exposed the symptom. For host health, check
curl -sf http://127.0.0.1:18789/health and the relevant structured CLI output;
a healthy HTTP endpoint alone does not prove cron, recall or delivery works.
For repository documents, run the affected reference/schema checks.
Report the finding, exact changes, file/byte counts, archive/recovery path, verification results and remaining gaps. State whether a restart happened.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

