返回顶部
c

code-cache语义代码缓存

Semantic code caching for AI agents. Cache, retrieve, and reuse code from prior agent executions.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
740
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

code-cache

Code Cache - Semantic Code Caching for AI Agents

This skill enables semantic code caching via the Raysurfer API.

What It Does

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.

Setup

Get your API key from the Raysurfer dashboard and configure it:

CODEBLOCK0

Available Commands

Search for cached code

CODEBLOCK1

Search for cached code snippets that match a natural language task description.

Options:

  • - --top-k N — Maximum number of results (default: 5)
  • INLINECODE1 — Minimum verdict score filter (default: 0.3)
  • INLINECODE2 — Display the source code of the top match

Example:
CODEBLOCK2

Get code files for a task

CODEBLOCK3

Retrieve code files ready for execution, with a pre-formatted prompt addition for your LLM.

Options:

  • - --top-k N — Maximum number of files (default: 5)
  • INLINECODE4 — Output directory (default: .code_cache)

Example:
CODEBLOCK4

Upload code to cache

CODEBLOCK5

Upload code from an execution to the cache for future reuse.

Options:

  • - --files, -f — Files to upload (required, can specify multiple)
  • INLINECODE7 — Mark the execution as failed (default: succeeded)
  • INLINECODE8 — Disable automatic voting on stored code blocks

Example:
CODEBLOCK6

Vote on cached code

CODEBLOCK7

Vote on whether cached code was useful. This improves retrieval quality over time.

Options:

  • - --up — Upvote / thumbs up (default)
  • INLINECODE10 — Downvote / thumbs down
  • INLINECODE11 — Original task description (optional)
  • INLINECODE12 — Code block name (optional)
  • INLINECODE13 — Code block description (optional)

Example:
CODEBLOCK8

How It Works

  1. 1. Cache Hit: When you ask for code similar to something previously executed, Code Cache returns the cached version instantly
  2. Cache Miss: When no match exists, your agent generates code normally, then Code Cache stores it for future use
  3. Verdict Scoring: Code that works gets 👍, code that fails gets 👎—retrieval improves over time

API Reference

The skill wraps these Raysurfer API methods:

MethodDescription
INLINECODE14Unified search for cached code snippets
INLINECODE15
Get code files ready for sandbox execution |
| upload_new_code_snips(task, files_written, succeeded, auto_vote) | Store new code after execution |
| vote_code_snip(task, code_block_id, code_block_name, code_block_description, succeeded) | Vote on snippet usefulness |

Why Code Caching?

LLM agents repeat the same patterns constantly. Instead of regenerating code every time:

  • - 30x faster: Retrieve proven code instead of waiting for generation
  • Lower costs: Reduce token usage by reusing cached solutions
  • Higher quality: Cached code has been validated and voted on
  • Consistent output: Same task = same proven solution

Learn more at raysurfer.com or read the documentation.

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 code-cache-1776419979 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 code-cache-1776419979 技能

通过命令行安装

skillhub install code-cache-1776419979

下载

⬇ 下载 code-cache v1.0.0(免费)

文件大小: 10.67 KB | 发布时间: 2026-4-17 20:18

v1.0.0 最新 2026-4-17 20:18
Initial release: semantic code caching for AI agents via Raysurfer API

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部