code-execution

Defines sandboxing tiers and restrictions for executing model-generated Python in the RLM kernel.

Updated Aug 17, 2026
One-click install
npx skills add https://github.com/lakshya4568/DeepContext --skill code-execution-lakshya4568
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-execution
Source: https://github.com/lakshya4568/DeepContext/tree/main/.agents/skills/code-execution
Command: npx skills add https://github.com/lakshya4568/DeepContext --skill code-execution-lakshya4568

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Running model-generated Python against documents or repositories you did not author yourself is a security risk: a prompt-injection payload hidden in an ingested PDF can trick the model into writing destructive code. This Skill provides the policy and checklist for sandboxing the Deep Context Platform's RLM kernel so that process separation is never mistaken for a real security boundary. ## Core Features & Use Cases - Three-Tier Sandboxing Model: Tier 1 subprocess isolation for local dev with trusted documents, Tier 2 container isolation (Docker with dropped capabilities, read-only root filesystem) for any third-party input, and Tier 3 syscall-level isolation (gVisor/nsjail or hosted sandboxes like E2B/Modal) for production. - Mandatory Restriction Checklist: Enforces scratch-directory-only filesystem access, network egress allowlists, credential separation (kernel never holds database credentials or API keys), capped REPL output (8,192 characters per turn), and crash-safe lifecycle management. - Use Case: When deploying the RLM orchestrator against a repository of user-uploaded documents, use this Skill to decide that Tier 2 container isolation is required and to verify the kernel accesses the host only through the typed host-request bridge. ## Quick Start Ask the AI to review the RLM kernel's code-execution path against this sandboxing checklist and recommend the correct isolation tier for your deployment.

Frequently Asked Questions about code-execution

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely run model-generated Python code?

Run model-generated Python inside a sandbox matched to input trust: a restricted subprocess for your own documents, a Docker container with dropped capabilities and read-only root filesystem for third-party input, and gVisor or a hosted sandbox like E2B for production workloads.

What sandboxing tier should I use for untrusted documents?

Use Tier 2 container isolation at minimum whenever input includes any document or repository you did not author yourself. A prompt-injection payload in an ingested PDF is indistinguishable from ordinary text until the kernel executes code influenced by it.

Is process separation between host and kernel enough for security?

No. Host/kernel process separation provides crash isolation and authority separation, not a security boundary. It prevents a crashed kernel from corrupting the host, but does not stop malicious model-generated code from acting with the kernel's OS permissions.

Why should REPL output shown to the model be truncated?

Capping REPL stdout (default 8,192 characters per turn) forces the model to search and filter rather than dump raw output, improving correctness. It also closes a channel through which a malicious document could flood the model's context window.

Should the kernel process hold database credentials or API keys?

No. Credentials and provider API keys live only on the host side of the boundary. Everything the kernel needs that requires authority goes through the typed host-request bridge, so a compromised kernel cannot exfiltrate secrets.