{
  "schemaVersion": "1.0",
  "item": {
    "slug": "raysurfer",
    "name": "Raysurfer Code Caching",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/ryx2/raysurfer",
    "canonicalUrl": "https://clawhub.ai/ryx2/raysurfer",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/raysurfer",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=raysurfer",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "README.md",
      "SKILL.md",
      "references/api-reference.md",
      "search.py",
      "search.sh",
      "search.ts"
    ],
    "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",
      "slug": "raysurfer",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T21:35:05.723Z",
      "expiresAt": "2026-05-14T21:35:05.723Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=raysurfer",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=raysurfer",
        "contentDisposition": "attachment; filename=\"raysurfer-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "raysurfer"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/raysurfer"
    },
    "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/raysurfer",
    "agentPageUrl": "https://openagent3.xyz/skills/raysurfer/agent",
    "manifestUrl": "https://openagent3.xyz/skills/raysurfer/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/raysurfer/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": "Raysurfer Code Caching Skill",
        "body": "You have access to Raysurfer, a code caching system that stores and retrieves code from prior AI agent executions. Always check the cache before writing new code and upload successful results afterward."
      },
      {
        "title": "Environment",
        "body": "API Base URL: https://api.raysurfer.com\nAuth: Bearer token via the RAYSURFER_API_KEY environment variable\nAll API calls use Content-Type: application/json"
      },
      {
        "title": "Workflow",
        "body": "Follow this sequence for every coding task:"
      },
      {
        "title": "Step 1: Search the Cache",
        "body": "Before writing any code, search for existing cached solutions.\n\nTo also include community public snippets (crawled from GitHub), add the X-Raysurfer-Public-Snips: true header.\n\ncurl -s -X POST https://api.raysurfer.com/api/retrieve/search \\\n  -H \"Authorization: Bearer $RAYSURFER_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"X-Raysurfer-Public-Snips: true\" \\\n  -d '{\"task\": \"<describe the task here>\", \"top_k\": 5, \"min_verdict_score\": 0.3}'\n\nThe response contains:\n\n{\n  \"matches\": [\n    {\n      \"code_block\": {\n        \"id\": \"uuid\",\n        \"name\": \"descriptive name\",\n        \"description\": \"what this code does\",\n        \"source\": \"the actual code content\",\n        \"language\": \"python\"\n      },\n      \"combined_score\": 0.85,\n      \"filename\": \"suggested_filename.py\",\n      \"thumbs_up\": 12,\n      \"thumbs_down\": 1\n    }\n  ],\n  \"total_found\": 3,\n  \"cache_hit\": true\n}\n\nDecision logic:\n\nIf total_found > 0 and the top match has combined_score >= 0.7 and a favorable vote ratio (thumbs_up > thumbs_down), use the cached code.\nIf matches exist but scores are low, use them as a starting point and adapt.\nIf no matches, generate the code from scratch."
      },
      {
        "title": "Step 2a: Use Cached Code (Cache Hit)",
        "body": "When a good cache hit is found:\n\nExtract the source field from the best matching code_block.\nWrite it to the appropriate file(s).\nAdapt paths, variable names, or configuration to the current project if needed.\nRun the code to verify it works.\nProceed to Step 3 (Vote)."
      },
      {
        "title": "Step 2b: Generate Code (Cache Miss)",
        "body": "When no suitable cache hit exists:\n\nWrite the code as you normally would.\nRun the code to verify it works.\nProceed to Step 4 (Upload)."
      },
      {
        "title": "Step 3: Vote on Cached Code",
        "body": "After using cached code, report whether it worked:\n\ncurl -s -X POST https://api.raysurfer.com/api/store/cache-usage \\\n  -H \"Authorization: Bearer $RAYSURFER_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"code_block_id\": \"<id from the match>\", \"code_block_name\": \"<name from the match>\", \"code_block_description\": \"<description from the match>\", \"succeeded\": true, \"task\": \"<the task description>\"}'\n\nSet succeeded to true if the code ran correctly, false if it failed or needed significant changes."
      },
      {
        "title": "Step 4: Upload New Code",
        "body": "After successfully generating and running new code (cache miss), upload it for future reuse:\n\ncurl -s -X POST https://api.raysurfer.com/api/store/execution-result \\\n  -H \"Authorization: Bearer $RAYSURFER_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"task\": \"<describe what this code does>\",\n    \"file_written\": {\"path\": \"relative/path/to/file.py\", \"content\": \"<full file content>\"},\n    \"succeeded\": true\n  }'\n\nOnly upload code that executed successfully. AI voting is enabled by default."
      },
      {
        "title": "Handling Arguments",
        "body": "If invoked with a search query (e.g., /raysurfer parse CSV and generate chart), run Step 1 with that query as the task.\nIf invoked with upload (e.g., /raysurfer upload), run Step 4 for the most recently generated code in the conversation.\nIf invoked with no arguments, display a summary of the workflow and ask what the user wants to do.\n\nWhen $ARGUMENTS is provided, use it as: $ARGUMENTS"
      },
      {
        "title": "Runnable Scripts",
        "body": "Ready-to-run scripts are in this skill's directory. Requires RAYSURFER_API_KEY to be set."
      },
      {
        "title": "Search",
        "body": "python search.py \"Parse a CSV and plot a chart\"\nbun search.ts \"Parse a CSV and plot a chart\"\nbash search.sh \"Parse a CSV and plot a chart\""
      },
      {
        "title": "Upload",
        "body": "python upload.py \"Generate a bar chart\" chart.py\nbun upload.ts \"Generate a bar chart\" chart.py\nbash upload.sh \"Generate a bar chart\" chart.py"
      },
      {
        "title": "Guidelines",
        "body": "Always verify RAYSURFER_API_KEY is set before making API calls. If unset, inform the user and skip cache operations.\nWrite descriptive task strings that capture what the code does, not how it does it (e.g., \"Parse CSV file and generate a bar chart with matplotlib\" rather than \"run pandas read_csv and plt.bar\").\nNever hardcode API keys in any command or file.\nIf the API is unreachable, proceed with normal code generation without blocking the user.\nKeep uploaded code self-contained when possible so it is maximally reusable."
      },
      {
        "title": "Quick Reference",
        "body": "ActionEndpointMethodSearch cache/api/retrieve/searchPOSTUpload code/api/store/execution-resultPOSTVote on code/api/store/cache-usagePOST\n\nSee references/api-reference.md for full request and response schemas."
      }
    ],
    "body": "Raysurfer Code Caching Skill\n\nYou have access to Raysurfer, a code caching system that stores and retrieves code from prior AI agent executions. Always check the cache before writing new code and upload successful results afterward.\n\nEnvironment\nAPI Base URL: https://api.raysurfer.com\nAuth: Bearer token via the RAYSURFER_API_KEY environment variable\nAll API calls use Content-Type: application/json\nWorkflow\n\nFollow this sequence for every coding task:\n\nStep 1: Search the Cache\n\nBefore writing any code, search for existing cached solutions.\n\nTo also include community public snippets (crawled from GitHub), add the X-Raysurfer-Public-Snips: true header.\n\ncurl -s -X POST https://api.raysurfer.com/api/retrieve/search \\\n  -H \"Authorization: Bearer $RAYSURFER_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"X-Raysurfer-Public-Snips: true\" \\\n  -d '{\"task\": \"<describe the task here>\", \"top_k\": 5, \"min_verdict_score\": 0.3}'\n\n\nThe response contains:\n\n{\n  \"matches\": [\n    {\n      \"code_block\": {\n        \"id\": \"uuid\",\n        \"name\": \"descriptive name\",\n        \"description\": \"what this code does\",\n        \"source\": \"the actual code content\",\n        \"language\": \"python\"\n      },\n      \"combined_score\": 0.85,\n      \"filename\": \"suggested_filename.py\",\n      \"thumbs_up\": 12,\n      \"thumbs_down\": 1\n    }\n  ],\n  \"total_found\": 3,\n  \"cache_hit\": true\n}\n\n\nDecision logic:\n\nIf total_found > 0 and the top match has combined_score >= 0.7 and a favorable vote ratio (thumbs_up > thumbs_down), use the cached code.\nIf matches exist but scores are low, use them as a starting point and adapt.\nIf no matches, generate the code from scratch.\nStep 2a: Use Cached Code (Cache Hit)\n\nWhen a good cache hit is found:\n\nExtract the source field from the best matching code_block.\nWrite it to the appropriate file(s).\nAdapt paths, variable names, or configuration to the current project if needed.\nRun the code to verify it works.\nProceed to Step 3 (Vote).\nStep 2b: Generate Code (Cache Miss)\n\nWhen no suitable cache hit exists:\n\nWrite the code as you normally would.\nRun the code to verify it works.\nProceed to Step 4 (Upload).\nStep 3: Vote on Cached Code\n\nAfter using cached code, report whether it worked:\n\ncurl -s -X POST https://api.raysurfer.com/api/store/cache-usage \\\n  -H \"Authorization: Bearer $RAYSURFER_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"code_block_id\": \"<id from the match>\", \"code_block_name\": \"<name from the match>\", \"code_block_description\": \"<description from the match>\", \"succeeded\": true, \"task\": \"<the task description>\"}'\n\n\nSet succeeded to true if the code ran correctly, false if it failed or needed significant changes.\n\nStep 4: Upload New Code\n\nAfter successfully generating and running new code (cache miss), upload it for future reuse:\n\ncurl -s -X POST https://api.raysurfer.com/api/store/execution-result \\\n  -H \"Authorization: Bearer $RAYSURFER_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"task\": \"<describe what this code does>\",\n    \"file_written\": {\"path\": \"relative/path/to/file.py\", \"content\": \"<full file content>\"},\n    \"succeeded\": true\n  }'\n\n\nOnly upload code that executed successfully. AI voting is enabled by default.\n\nHandling Arguments\nIf invoked with a search query (e.g., /raysurfer parse CSV and generate chart), run Step 1 with that query as the task.\nIf invoked with upload (e.g., /raysurfer upload), run Step 4 for the most recently generated code in the conversation.\nIf invoked with no arguments, display a summary of the workflow and ask what the user wants to do.\n\nWhen $ARGUMENTS is provided, use it as: $ARGUMENTS\n\nRunnable Scripts\n\nReady-to-run scripts are in this skill's directory. Requires RAYSURFER_API_KEY to be set.\n\nSearch\npython search.py \"Parse a CSV and plot a chart\"\nbun search.ts \"Parse a CSV and plot a chart\"\nbash search.sh \"Parse a CSV and plot a chart\"\n\nUpload\npython upload.py \"Generate a bar chart\" chart.py\nbun upload.ts \"Generate a bar chart\" chart.py\nbash upload.sh \"Generate a bar chart\" chart.py\n\nGuidelines\nAlways verify RAYSURFER_API_KEY is set before making API calls. If unset, inform the user and skip cache operations.\nWrite descriptive task strings that capture what the code does, not how it does it (e.g., \"Parse CSV file and generate a bar chart with matplotlib\" rather than \"run pandas read_csv and plt.bar\").\nNever hardcode API keys in any command or file.\nIf the API is unreachable, proceed with normal code generation without blocking the user.\nKeep uploaded code self-contained when possible so it is maximally reusable.\nQuick Reference\nAction\tEndpoint\tMethod\nSearch cache\t/api/retrieve/search\tPOST\nUpload code\t/api/store/execution-result\tPOST\nVote on code\t/api/store/cache-usage\tPOST\n\nSee references/api-reference.md for full request and response schemas."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/ryx2/raysurfer",
    "publisherUrl": "https://clawhub.ai/ryx2/raysurfer",
    "owner": "ryx2",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/raysurfer",
    "downloadUrl": "https://openagent3.xyz/downloads/raysurfer",
    "agentUrl": "https://openagent3.xyz/skills/raysurfer/agent",
    "manifestUrl": "https://openagent3.xyz/skills/raysurfer/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/raysurfer/agent.md"
  }
}