Skip to content

Convex Retention Rules

Guides agents on classifying Convex tables and writing bounded data cleanup jobs for ClawHub.

Stars
9,546
Licence
MIT
Files
1 file

What it does

This is an instruction file that tells an AI coding agent how to handle data retention in the ClawHub project's Convex database. When the agent adds or changes tables, expiration fields, or cleanup jobs, it is told to classify every table in a central policy file, use indexed and size-limited deletion, avoid bulk-clearing login sessions, and run specific tests and checks. It is written for maintainers of this one codebase rather than general use.

Great for

  • Developers contributing to the ClawHub codebase who touch Convex schema or cron jobs
  • Maintainers reviewing whether new tables have an appropriate cleanup path

Skip it if

  • People outside the ClawHub project, since it references project-specific files like convex/lib/retentionPolicy.ts and other skills that will not exist in their repo (limited usefulness)
  • Anyone wanting to run large production data deletions without a reviewed migration plan, because the skill itself points to other skills for migrations and the risk of destructive changes remains

Try asking

  • “Add a new Convex table with an expiration field and a cleanup cron”
  • “Review whether a deprecated table is safely removed from the retention policy”
  • “Write a bounded pruning function for expired auth sessions”
Step-by-step guide: how to use Convex Retention RulesInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 1 original files, the MIT licence and an attribution note.

    convex-retention.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip convex-retention.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip convex-retention.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Use it alongside the ClawHub repository so referenced files and skills are available
  • Ask the agent to run the listed verification steps before merging schema changes

What's inside

  • SKILL.md

Redistributed unmodified from openclaw/clawhub under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.