Semantic code caching for AI agents. Cache, retrieve, and reuse code from prior agent executions.
This skill enables semantic code caching via the Raysurfer API.
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.
Get your API key from the Raysurfer dashboard and configure it:
CODEBLOCK0
CODEBLOCK1
Search for cached code snippets that match a natural language task description.
Options:
--top-k N — Maximum number of results (default: 5)Example:
CODEBLOCK2
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).code_cache)Example:
CODEBLOCK4
CODEBLOCK5
Upload code from an execution to the cache for future reuse.
Options:
--files, -f — Files to upload (required, can specify multiple)Example:
CODEBLOCK6
CODEBLOCK7
Vote on whether cached code was useful. This improves retrieval quality over time.
Options:
--up — Upvote / thumbs up (default)Example:
CODEBLOCK8
The skill wraps these Raysurfer API methods:
| Method | Description |
|---|---|
| INLINECODE14 | Unified search for cached code snippets |
| INLINECODE15 |
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 |
LLM agents repeat the same patterns constantly. Instead of regenerating code every time:
Learn more at raysurfer.com or read the documentation.
该技能支持在以下平台通过对话安装:
帮我安装 SkillHub 和 code-cache-1776419979 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 code-cache-1776419979 技能
skillhub install code-cache-1776419979
文件大小: 10.67 KB | 发布时间: 2026-4-17 20:18