kentcdodds/kcd-skills/prefer-local-kody-execute

Claude Code and agent skill by kentcdodds/kcd-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

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`.

Install

npx vskill@latest install kentcdodds/kcd-skills/prefer-local-kody-execute

SKILL.md

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.

json
{
"operationId": "cliCredentialBootstrap",
"params": { "lifetime": "short" }
}
bash
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 MCP execute stays banned.

  • While an MCP session exists, remint with cliCredentialBootstrap instead of

switching to kody login or tokenCreate.

  • Saved packages keep --local and a static kody:@… import.
  • Credential priority is --token / KODY_API_TOKEN, then the stored bootstrap

token, then kody login.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/kentcdodds/kcd-skills/prefer-local-kody-execute/badge)](https://verified-skill.com/skills/kentcdodds/kcd-skills/prefer-local-kody-execute)

Something wrong with this skill or its page? Tell us.