跳到正文
TakoAPI
返回技能列表

code-cache

由 ryx2 提供

Search & Research
487下载量由 clawskills.sh 提供
0浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

Semantic code caching for AI agents.

描述

该技能的功能

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.

何时使用

  • 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

示例工作流

输入

User asks: 'Fetch GitHub trending repos'

智能体
  1. 1

    Search cache with /code-cache search "Fetch GitHub trending repos" --show-code

  2. 2

    Review the top match score and inspect the returned snippet

  3. 3

    Retrieve execution-ready files with /code-cache files "Fetch GitHub trending repos"

  4. 4

    Run the retrieved code in the agent sandbox

  5. 5

    Upload the result with /code-cache upload "Fetch GitHub trending repos" --files fetch.py

输出

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

前置要求

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

安装

clawhub install ryx2/code-cache

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接