LaunchKit · 2026
Back to Skills

code-cache

Semantic code caching for AI agents.

0
487 downloads
by @ryx2

Setup & Installation

openclaw skills install @ryx2/code-cache

Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:

npx clawhub install code-cache

What This Skill Does

Stores code generated during agent executions and retrieves semantically similar code for future tasks. Uses the Raysurfer API to search, upload, and vote on cached snippets. Cuts redundant generation by reusing validated solutions from prior runs.

Retrieving pre-validated cached code avoids the latency and token cost of having an LLM regenerate the same patterns on every run.

When to use it

  • Reusing a prior data pipeline script without regenerating it
  • Retrieving cached chart-building code for a recurring report
  • Searching past executions before writing new API fetch code
  • Uploading a successful script to the cache after an agent run
  • Downvoting a broken cached snippet to improve future retrieval quality

Example Workflow

Here's how your AI assistant might use this skill in practice.

INPUT

User asks: 'Fetch GitHub trending repos'

AGENT
  1. 1Search cache with /code-cache search "Fetch GitHub trending repos" --show-code
  2. 2Review the top match score and inspect the returned snippet
  3. 3Retrieve execution-ready files with /code-cache files "Fetch GitHub trending repos"
  4. 4Run the retrieved code in the agent sandbox
  5. 5Upload the result with /code-cache upload "Fetch GitHub trending repos" --files fetch.py
OUTPUT

GitHub trending repos fetched using cached code, with the execution stored and auto-voted for future reuse

Requirements

Accounts, API keys, or tools you or your AI assistant may need to set up while using this skill.

RAYSURFER_API_KEY environment variableRaysurfer account (sign up at raysurfer.com to access the API key dashboard)