rajatslakhina

Code Mode Runtime Kit — AI skill for Claude Code

AI community

Code mode for iOS agents: run model-written JS plans in a locked-down JavaScriptCore sandbox, calling typed Swift tools through one actor-isolated bridge with scopes, tiers, budgets and replayable tra.

How to install Code Mode Runtime Kit

This entry records only its repository, not the path inside it, so there is no exact command to give. Open rajatslakhina/code-mode-runtime-kit and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Code Mode Runtime Kit does

Code mode for iOS agents: run model-written JS plans in a locked-down JavaScriptCore sandbox, calling typed Swift tools through one actor-isolated bridge with scopes, tiers, budgets and replayable traces.

Alternatives in AI

  • Delimit MCP Server — The merge gate for AI-written code, with signed, replayable attestation 21 ★
  • How I Built Flight Website — How Claude Opus 5 turned a landing page's static hero into a seamless AI-generated flight film — Higgsfield CL 17 ★
  • Hive Standalone Specs — Hive is a standalone AI command center service that acts as an autonomous "boss" for any SaaS application 15 ★

README

CodeModeKit

**Let the model write the program, not make the calls.** CodeModeKit is a Swift runtime for "code mode" in an iOS agent feature. Claude writes one short JavaScript plan. The plan runs in a locked-down JavaScriptCore context, and its only way out is one actor-isolated bridge to your app's typed Swift tools. Every call is checked against a capability scope, a budget and an authorization tier. Destructive calls wait for a human, and every run leaves a trace you can replay.

[![CI](https://github.com/rajatslakhina/code-mode-runtime-kit/actions/workflows/ci.yml/badge.svg)](https://github.com/rajatslakhina/code-mode-runtime-kit/actions/workflows/ci.yml) ![Swift 6](https://img.shields.io/badge/Swift-6.0-orange) ![Platforms](https://img.shields.io/badge/platforms-iOS%2017%20%7C%20macOS%2014%20%7C%20Linux%20(core)-blue) ![License: MIT](https://img.shields.io/badge/license-MIT-green)

**Demo app:** [code-mode-runtime-demo-app](https://github.com/rajatslakhina/code-mode-runtime-demo-app), a SwiftUI app that runs five plans (parallel review, a delete that has to ask you, an exfiltration attempt, a runaway loop, a write in a read-only run) against this package, consumed from GitHub as a version-pinned remote package.


Why this matters

Classic tool use is one model turn per tool call. The model asks for `listExpenses`, reads the result, asks for the next thing, and so on. Every intermediate result goes back into the context and is read again on every later turn. Eight calls mean nine model turns, and the context grows each time.

Claude Code 2.1.323 (12 November 2026) shipped an experimental **Code Mode**: Claude writes JavaScript that calls its tools, so a loop or a `Promise.all` is one script instead of a dozen turns. The same idea works in an app. It also moves a hard problem onto the client: **you are now executing model-written code on a user's phone.** That is a sandboxing, concurrency, authorization and observability problem, not a prompt problem. T