prefer-local-kody-execute
Skill47 starsChanged 2 months agoMITView on GitHub
Prefer @kodycodes/cli execute --local over hosted MCP execute when the agent has shell + Node. Use when running Kody execute / calling Kody from an agent that can run local commands.
In this repository5 other files it gives its agents.
- ask-kentSkill
- orchestrateSkill
- review-and-recommendSkill
- ship-prSkill
- visual-recapSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 1 is distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
Default: run execute modules on the agent machine with @kodycodes/cli execute --local.
- Very specific: line 33
After kody login, skip minting a temporary API token for local execute.
- Distinctive: line 39
No Node / CLI on the machine
- Very specific: line 64
Only when interactive kody login is not available (CI, Cloud Agents without a provisioned secret, other headless hosts).
- Very specific: line 77
Add other scopes the module needs (for example packages:read).
- Very specific: line 90
Prefer a provisioned KODY_API_TOKEN secret / env var in the cloud environment before --local works.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Prefer local Kody execute
Default: run execute modules on the agent machine with
@kodycodes/cli execute --local. Hosted MCP execute is the fallback.
Public docs: https://kody.codes/docs/open-api
Prefer local when
- Node.js ≥ 22 is available
@kodycodes/clican be run (npxis fine)- Auth is available via
kody loginand/orKODY_API_TOKEN(see below) - The work does not require the hosted cloud workerd
Auth for --local
Priority:
--token/KODY_API_TOKEN(scopedkody_at_…) when set — typical for CI and Cloud Agents- Else the stored CLI MCP OAuth access token from
kody login(no under-the-hoodtokenCreate) — default for interactive agents - Else a clear “login or provide a token” error
After kody login, skip minting a temporary API token for local execute.
CapabilityProxy and package-graph accept that OAuth Bearer when the
local-execute flag is on.
Use hosted MCP execute when
- No Node / CLI on the machine
- The module must run in Kody's cloud workerd
- Neither login nor a token is available (
kody loginnot possible andKODY_API_TOKENmissing)
Feature flags
Open API and local execute need mcp-api-tool and local-execute (experiments
cohort, or per-user opt-in on the docs page). Without them, --local will not
work.
Run locally (default)
kody login # once, if not already logged in
npx @kodycodes/cli execute --local --code 'export default async function main() { return await kody.metaGetCurrentUser({}) }'Omit --token when using login OAuth. Prefer KODY_API_TOKEN in the
environment over --token when a scoped token is already set, so the secret is
not visible in process arguments. --file works the same as --code for longer
modules.
Mint a token (CI / headless only)
Only when interactive kody login is not available (CI, Cloud Agents without a
provisioned secret, other headless hosts). Call MCP api (or Open API) with:
{
"operationId": "tokenCreate",
"params": {
"name": "kody-cli",
"scopes": ["local-execute", "account:read"]
}
}Add other scopes the module needs (for example packages:read). The token value
is returned once. Store it as KODY_API_TOKEN or pass --token. Never paste
the token into chat.
Revoke with MCP api tokenRevoke when done with a short-lived token.
Metering
Local CPU is not counted as execute or dynamic_worker_day. Capabilities
called through the proxy still meter normally.
Cloud agents
Prefer a provisioned KODY_API_TOKEN secret / env var in the cloud environment
before --local works. Do not treat interactive mint as the first path for
desktop agents — those should use kody login + execute --local (omit
--token). If the cloud secret is missing and MCP api can mint one for the
session, mint, export into the shell, and do not echo it. If neither path is
available, fall back to hosted MCP execute.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

