Add codemode skill for @cloudflare/codemode#26
Draft
mksglu wants to merge 1 commit intocloudflare:mainfrom
Draft
Add codemode skill for @cloudflare/codemode#26mksglu wants to merge 1 commit intocloudflare:mainfrom
mksglu wants to merge 1 commit intocloudflare:mainfrom
Conversation
Adds a new skill covering Code Mode — the pattern where LLMs write and execute JavaScript to orchestrate multiple tool calls in a single turn instead of calling tools one at a time. Includes: - SKILL.md with decision tree, configuration, core patterns, agent integration, MCP integration, anti-patterns, and troubleshooting - references/api-reference.md — full API surface (createCodeTool, DynamicWorkerExecutor, generateTypes, sanitizeToolName) - references/executor-patterns.md — DynamicWorkerExecutor, Node VM, and HTTP bridge executor implementations - references/mcp-integration.md — MCP server orchestration patterns and token comparison
|
tbh I don't think codemode's in a place where we want to recommend it as a skill just yet, it's still experimental. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new codemode skill covering
@cloudflare/codemode— the pattern where LLMs write and execute JavaScript to orchestrate multiple tool calls in a single turn, instead of calling tools one at a time.Code Mode reduces token usage by 99%+ for multi-tool workflows by collapsing N individual tool calls into a single code-generation step executed in an isolated V8 sandbox via
DynamicWorkerExecutor.What's included
SKILL.md covers:
streamTextAIChatAgentintegration example@cloudflare/codemodevs@cloudflare/codemode/ai)Reference files provide deep-dives into:
createCodeTool,DynamicWorkerExecutor,Executorinterface,ExecuteResult,ToolDispatcher,generateTypes,sanitizeToolName,ToolDescriptor,normalizeCodeConventions followed
This skill follows all conventions established by existing skills in this repo:
name,description, and trigger phrasesreferences/subdirectorySources
Written based on:
@cloudflare/codemodesource code (v0.1.0)agents-sdk/references/codemode.mdreference in this repo