{
  "schemaVersion": "1.0",
  "item": {
    "slug": "code-cache",
    "name": "Code Cache",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/ryx2/code-cache",
    "canonicalUrl": "https://clawhub.ai/ryx2/code-cache",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/code-cache",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=code-cache",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "README.md",
      "SKILL.md",
      "code_cache.py",
      "tests/test_skill.py"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/code-cache"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/code-cache",
    "agentPageUrl": "https://openagent3.xyz/skills/code-cache/agent",
    "manifestUrl": "https://openagent3.xyz/skills/code-cache/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/code-cache/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Code Cache - Semantic Code Caching for AI Agents",
        "body": "This skill enables semantic code caching via the Raysurfer API."
      },
      {
        "title": "What It Does",
        "body": "When your agent generates and executes code, Code Cache stores it. When a similar task comes up later, the agent can retrieve and run the cached code instead of regenerating it—saving time and tokens."
      },
      {
        "title": "Setup",
        "body": "Get your API key from the Raysurfer dashboard and configure it:\n\n# Via environment variable\nexport RAYSURFER_API_KEY=your_api_key_here\n\n# Or via OpenClaw config\nopenclaw config set skills.entries.code-cache.apiKey \"your_api_key_here\""
      },
      {
        "title": "Search for cached code",
        "body": "/code-cache search <task description> [--top-k N] [--min-score FLOAT] [--show-code]\n\nSearch for cached code snippets that match a natural language task description.\n\nOptions:\n\n--top-k N — Maximum number of results (default: 5)\n--min-score FLOAT — Minimum verdict score filter (default: 0.3)\n--show-code — Display the source code of the top match\n\nExample:\n\n/code-cache search \"Generate a quarterly revenue report\"\n/code-cache search \"Fetch GitHub trending repos\" --top-k 3 --show-code"
      },
      {
        "title": "Get code files for a task",
        "body": "/code-cache files <task description> [--top-k N] [--cache-dir DIR]\n\nRetrieve code files ready for execution, with a pre-formatted prompt addition for your LLM.\n\nOptions:\n\n--top-k N — Maximum number of files (default: 5)\n--cache-dir DIR — Output directory (default: .code_cache)\n\nExample:\n\n/code-cache files \"Fetch GitHub trending repos\"\n/code-cache files \"Build a chart\" --cache-dir ./cached_code"
      },
      {
        "title": "Upload code to cache",
        "body": "/code-cache upload <task> --files <path> [<path>...] [--failed] [--no-auto-vote]\n\nUpload code from an execution to the cache for future reuse.\n\nOptions:\n\n--files, -f — Files to upload (required, can specify multiple)\n--failed — Mark the execution as failed (default: succeeded)\n--no-auto-vote — Disable automatic voting on stored code blocks\n\nExample:\n\n/code-cache upload \"Build a chart\" --files chart.py\n/code-cache upload \"Data pipeline\" -f extract.py transform.py load.py\n/code-cache upload \"Failed attempt\" --files broken.py --failed"
      },
      {
        "title": "Vote on cached code",
        "body": "/code-cache vote <code_block_id> [--up|--down] [--task TEXT] [--name TEXT] [--description TEXT]\n\nVote on whether cached code was useful. This improves retrieval quality over time.\n\nOptions:\n\n--up — Upvote / thumbs up (default)\n--down — Downvote / thumbs down\n--task — Original task description (optional)\n--name — Code block name (optional)\n--description — Code block description (optional)\n\nExample:\n\n/code-cache vote abc123 --up\n/code-cache vote xyz789 --down --task \"Generate report\""
      },
      {
        "title": "How It Works",
        "body": "Cache Hit: When you ask for code similar to something previously executed, Code Cache returns the cached version instantly\nCache Miss: When no match exists, your agent generates code normally, then Code Cache stores it for future use\nVerdict Scoring: Code that works gets 👍, code that fails gets 👎—retrieval improves over time"
      },
      {
        "title": "API Reference",
        "body": "The skill wraps these Raysurfer API methods:\n\nMethodDescriptionsearch(task, top_k, min_verdict_score)Unified search for cached code snippetsget_code_files(task, top_k, cache_dir)Get code files ready for sandbox executionupload_new_code_snips(task, files_written, succeeded, auto_vote)Store new code after executionvote_code_snip(task, code_block_id, code_block_name, code_block_description, succeeded)Vote on snippet usefulness"
      },
      {
        "title": "Why Code Caching?",
        "body": "LLM agents repeat the same patterns constantly. Instead of regenerating code every time:\n\n30x faster: Retrieve proven code instead of waiting for generation\nLower costs: Reduce token usage by reusing cached solutions\nHigher quality: Cached code has been validated and voted on\nConsistent output: Same task = same proven solution\n\nLearn more at raysurfer.com or read the documentation."
      }
    ],
    "body": "Code Cache - Semantic Code Caching for AI Agents\n\nThis skill enables semantic code caching via the Raysurfer API.\n\nWhat It Does\n\nWhen your agent generates and executes code, Code Cache stores it. When a similar task comes up later, the agent can retrieve and run the cached code instead of regenerating it—saving time and tokens.\n\nSetup\n\nGet your API key from the Raysurfer dashboard and configure it:\n\n# Via environment variable\nexport RAYSURFER_API_KEY=your_api_key_here\n\n# Or via OpenClaw config\nopenclaw config set skills.entries.code-cache.apiKey \"your_api_key_here\"\n\nAvailable Commands\nSearch for cached code\n/code-cache search <task description> [--top-k N] [--min-score FLOAT] [--show-code]\n\n\nSearch for cached code snippets that match a natural language task description.\n\nOptions:\n\n--top-k N — Maximum number of results (default: 5)\n--min-score FLOAT — Minimum verdict score filter (default: 0.3)\n--show-code — Display the source code of the top match\n\nExample:\n\n/code-cache search \"Generate a quarterly revenue report\"\n/code-cache search \"Fetch GitHub trending repos\" --top-k 3 --show-code\n\nGet code files for a task\n/code-cache files <task description> [--top-k N] [--cache-dir DIR]\n\n\nRetrieve code files ready for execution, with a pre-formatted prompt addition for your LLM.\n\nOptions:\n\n--top-k N — Maximum number of files (default: 5)\n--cache-dir DIR — Output directory (default: .code_cache)\n\nExample:\n\n/code-cache files \"Fetch GitHub trending repos\"\n/code-cache files \"Build a chart\" --cache-dir ./cached_code\n\nUpload code to cache\n/code-cache upload <task> --files <path> [<path>...] [--failed] [--no-auto-vote]\n\n\nUpload code from an execution to the cache for future reuse.\n\nOptions:\n\n--files, -f — Files to upload (required, can specify multiple)\n--failed — Mark the execution as failed (default: succeeded)\n--no-auto-vote — Disable automatic voting on stored code blocks\n\nExample:\n\n/code-cache upload \"Build a chart\" --files chart.py\n/code-cache upload \"Data pipeline\" -f extract.py transform.py load.py\n/code-cache upload \"Failed attempt\" --files broken.py --failed\n\nVote on cached code\n/code-cache vote <code_block_id> [--up|--down] [--task TEXT] [--name TEXT] [--description TEXT]\n\n\nVote on whether cached code was useful. This improves retrieval quality over time.\n\nOptions:\n\n--up — Upvote / thumbs up (default)\n--down — Downvote / thumbs down\n--task — Original task description (optional)\n--name — Code block name (optional)\n--description — Code block description (optional)\n\nExample:\n\n/code-cache vote abc123 --up\n/code-cache vote xyz789 --down --task \"Generate report\"\n\nHow It Works\nCache Hit: When you ask for code similar to something previously executed, Code Cache returns the cached version instantly\nCache Miss: When no match exists, your agent generates code normally, then Code Cache stores it for future use\nVerdict Scoring: Code that works gets 👍, code that fails gets 👎—retrieval improves over time\nAPI Reference\n\nThe skill wraps these Raysurfer API methods:\n\nMethod\tDescription\nsearch(task, top_k, min_verdict_score)\tUnified search for cached code snippets\nget_code_files(task, top_k, cache_dir)\tGet code files ready for sandbox execution\nupload_new_code_snips(task, files_written, succeeded, auto_vote)\tStore new code after execution\nvote_code_snip(task, code_block_id, code_block_name, code_block_description, succeeded)\tVote on snippet usefulness\nWhy Code Caching?\n\nLLM agents repeat the same patterns constantly. Instead of regenerating code every time:\n\n30x faster: Retrieve proven code instead of waiting for generation\nLower costs: Reduce token usage by reusing cached solutions\nHigher quality: Cached code has been validated and voted on\nConsistent output: Same task = same proven solution\n\nLearn more at raysurfer.com or read the documentation."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/ryx2/code-cache",
    "publisherUrl": "https://clawhub.ai/ryx2/code-cache",
    "owner": "ryx2",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/code-cache",
    "downloadUrl": "https://openagent3.xyz/downloads/code-cache",
    "agentUrl": "https://openagent3.xyz/skills/code-cache/agent",
    "manifestUrl": "https://openagent3.xyz/skills/code-cache/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/code-cache/agent.md"
  }
}