prefer-local-kody-execute
Skill64 starsChanged 25 days agoMITView on GitHub
Prefer @kodycodes/cli execute --local over hosted MCP execute for one-off modules and smoke tests when Node ≥22 and the CLI are available. Agents already on Kody MCP: cliCredentialBootstrap then CLI auth bootstrap (no second OAuth, no tokenCreate). Interactive humans: kody login. Scoped KODY_API_TOKEN remains for CI/headless. Use when running Kody execute from Cursor (including Cloud Agents), bootstrapping CLI credentials, or choosing local CLI vs Open API / MCP `api`.
In this repository6 other files it gives its agents.
- autopilotSkill
- friction-logSkill
- review-and-recommendSkill
- ship-prSkill
- use-kodySkill
- visual-recapSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is 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.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
When Node is 22 or newer and @kodycodes/cli is available, run one-off modules with local execute.
- Distinctive: line 54
Follow the message. Judgment calls the CLI cannot make:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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 CLI execute
When Node is 22 or newer and @kodycodes/cli is available, run one-off modules
with local execute. Do not use hosted MCP execute. This skill and
Local CLI execute
(guide:local_execute) are the source of truth. Open API fallback:
Open API (guide:open_api).
Local CPU is not counted as execute or dynamic_worker_day. Capabilities
called through the proxy still meter normally. Prefer KODY_API_TOKEN in the
environment over --token so the secret is not visible in process arguments.
Command
Agents already on MCP: call cliCredentialBootstrap with a required lifetime
(single-task agents use short), then run the returned cli_command (it
already includes lifetime flags). Humans who can finish browser OAuth:
npx @kodycodes/cli login once. CI with no MCP session and no interactive
login: set KODY_API_TOKEN in the environment. Never paste a kody_at_… into
chat.
{
"operationId": "cliCredentialBootstrap",
"params": { "lifetime": "short" }
}npx @kodycodes/cli auth bootstrap --code 'kody_bc_…' --lifetime short
npx @kodycodes/cli execute --local --code 'import { kody } from "kody:runtime"; export default async function main() { return await kody.metaGetCurrentUser({}) }'Saved packages keep --local and a static kody:@… import.
Failure
The CLI errors name the fix for a missing lifetime, a rejected bootstrap code,
and insufficient_scope (including search:read; scopes replace the defaults,
see
ADR 0056).
Follow the message. Judgment calls the CLI cannot make:
- Node is below 22, the CLI is missing, or the host cannot run workerd. Use Open
API / MCP
api, or fix the environment. Hosted MCPexecutestays banned. - While an MCP session exists, remint with
cliCredentialBootstrapinstead of switching tokody loginortokenCreate. - Saved packages keep
--localand a statickody:@…import. - Credential priority is
--token/KODY_API_TOKEN, then the stored bootstrap token, thenkody login.
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.

