> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tensorlake.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Skills in Sandboxes

> Pre-load TensorLake skill files inside sandbox images so coding agents auto-discover them at startup.

Coding agents discover skill files by scanning specific directories at startup. By placing TensorLake skill files in the right paths inside a sandbox image, any agent running in the sandbox will automatically pick them up without manual installation.

## How Agents Discover Skills

Each coding agent scans a different directory for skill files:

| Agent          | Skill File  | Discovery Path                                                   |
| -------------- | ----------- | ---------------------------------------------------------------- |
| Claude Code    | `SKILL.md`  | `~/.claude/skills/<name>/SKILL.md`                               |
| OpenAI Codex   | `AGENTS.md` | `~/.agents/skills/<name>/SKILL.md` or `AGENTS.md` in working dir |
| Google ADK     | `SKILL.md`  | Loaded explicitly via `load_skill_from_dir()`                    |
| Cursor         | `.mdc`      | `.cursor/rules/*.mdc`                                            |
| Cline          | `.md`       | `.clinerules/`                                                   |
| Windsurf       | `.md`       | `.windsurf/rules/*.md`                                           |
| GitHub Copilot | `.md`       | `.github/copilot-instructions.md`                                |

To make skills work inside a sandbox, bake the skill files into the image at the paths the agent expects.

## Create a Skills Image

### Any Agent

The simplest way to install skills for any agent is with the [skills](https://skills.sh) CLI. It places skill files in the correct discovery paths for Claude Code, Codex, Cursor, Windsurf, and other supported agents.

<Tabs>
  <Tab title="Python">
    ```python theme={null}
    from tensorlake import Image

    image = (
        Image(name="with-skills", base_image="tensorlake/ubuntu-systemd")
        .run("apt-get update && apt-get install -y nodejs npm python3 python3-pip")
        .run("npm install -g skills")
        .run("skills add tensorlakeai/tensorlake-skills --all -y --copy")
        .run("python3 -m pip install --break-system-packages tensorlake")
    )
    ```
  </Tab>

  <Tab title="TypeScript">
    ```typescript theme={null}
    import { Image } from "tensorlake";

    const image = new Image({
      name: "with-skills",
      baseImage: "tensorlake/ubuntu-systemd",
    })
      .run("apt-get update && apt-get install -y nodejs npm python3 python3-pip")
      .run("npm install -g skills")
      .run("skills add tensorlakeai/tensorlake-skills --all -y --copy")
      .run("python3 -m pip install --break-system-packages tensorlake");
    ```
  </Tab>

  <Tab title="Dockerfile">
    ```dockerfile Dockerfile theme={null}
    FROM tensorlake/ubuntu-systemd

    RUN apt-get update && apt-get install -y nodejs npm python3 python3-pip
    RUN npm install -g skills
    RUN skills add tensorlakeai/tensorlake-skills --all -y --copy
    RUN python3 -m pip install --break-system-packages tensorlake
    ```
  </Tab>
</Tabs>

* `--all` installs skills to all detected agents
* `-y` skips confirmation prompts for non-interactive use
* `--copy` copies files instead of symlinking, which is more reliable inside containers

### Claude Code Only

If you only need Claude Code support, copy the skill into `~/.claude/skills/` inside the image:

<Tabs>
  <Tab title="Python">
    ```python theme={null}
    from tensorlake import Image

    image = (
        Image(name="claude-code-skills", base_image="tensorlake/ubuntu-systemd")
        .run("apt-get update && apt-get install -y git python3 python3-pip")
        .run("git clone https://github.com/tensorlakeai/tensorlake-skills /tmp/tensorlake-skills")
        .run(
            "mkdir -p /root/.claude/skills/tensorlake && "
            "cp -r /tmp/tensorlake-skills/SKILL.md /tmp/tensorlake-skills/references "
            "/root/.claude/skills/tensorlake/"
        )
        .run("rm -rf /tmp/tensorlake-skills")
        .run("python3 -m pip install --break-system-packages tensorlake")
    )
    ```
  </Tab>

  <Tab title="TypeScript">
    ```typescript theme={null}
    import { Image } from "tensorlake";

    const image = new Image({
      name: "claude-code-skills",
      baseImage: "tensorlake/ubuntu-systemd",
    })
      .run("apt-get update && apt-get install -y git python3 python3-pip")
      .run("git clone https://github.com/tensorlakeai/tensorlake-skills /tmp/tensorlake-skills")
      .run(
        "mkdir -p /root/.claude/skills/tensorlake && " +
          "cp -r /tmp/tensorlake-skills/SKILL.md /tmp/tensorlake-skills/references " +
          "/root/.claude/skills/tensorlake/",
      )
      .run("rm -rf /tmp/tensorlake-skills")
      .run("python3 -m pip install --break-system-packages tensorlake");
    ```
  </Tab>

  <Tab title="Dockerfile">
    ```dockerfile Dockerfile theme={null}
    FROM tensorlake/ubuntu-systemd

    RUN apt-get update && apt-get install -y git python3 python3-pip
    RUN git clone https://github.com/tensorlakeai/tensorlake-skills /tmp/tensorlake-skills
    RUN mkdir -p /root/.claude/skills/tensorlake \
     && cp -r /tmp/tensorlake-skills/SKILL.md /tmp/tensorlake-skills/references /root/.claude/skills/tensorlake/
    RUN rm -rf /tmp/tensorlake-skills
    RUN python3 -m pip install --break-system-packages tensorlake
    ```
  </Tab>
</Tabs>

Claude Code scans `~/.claude/skills/` at startup. The `SKILL.md` file and `references/` directory at `/root/.claude/skills/tensorlake/` are auto-discovered.

## Create a Reusable Sandbox Image

Register the image once, then launch new sandboxes with the skills already baked in:

<Tabs>
  <Tab title="CLI">
    ```bash theme={null}
    tl sbx image create ./Dockerfile --registered-name claude-code-skills
    ```

    ```bash theme={null}
    npx tl sbx image create ./Dockerfile --registered-name claude-code-skills
    ```
  </Tab>

  <Tab title="TypeScript">
    ```typescript theme={null}
    import { createSandboxImage, Image } from "tensorlake";

    const image = new Image({
      name: "claude-code-skills",
      baseImage: "tensorlake/ubuntu-systemd",
    })
      .run("apt-get update && apt-get install -y nodejs npm python3 python3-pip")
      .run("npm install -g skills")
      .run("skills add tensorlakeai/tensorlake-skills --all -y --copy")
      .run("python3 -m pip install --break-system-packages tensorlake");

    await createSandboxImage(image, {
      contextDir: ".",
    });
    ```
  </Tab>
</Tabs>

Then launch sandboxes from that image:

```bash theme={null}
tl sbx create --image claude-code-skills
```

## Use with the SDK

You can also install skills programmatically each time you create a sandbox:

<Tabs>
  <Tab title="Python">
    ```python theme={null}
    from tensorlake.sandbox import Sandbox


    sandbox = Sandbox.create()
        sandbox.run("bash", ["-c", "apt-get update && apt-get install -y nodejs npm"])
        sandbox.run("bash", ["-c", "npm install -g skills"])
        sandbox.run("bash", ["-c", "skills add tensorlakeai/tensorlake-skills --all -y --copy"])

        result = sandbox.run(
            "find",
            ["/", "-name", "SKILL.md", "-type", "f", "-not", "-path", "*/node_modules/*"],
        )
        print(result.stdout)
    ```
  </Tab>

  <Tab title="TypeScript">
    ```typescript theme={null}
    import { Sandbox } from "tensorlake";


    const sandbox = await Sandbox.create();

    try {
      await sandbox.run("bash", {
        args: ["-lc", "apt-get update && apt-get install -y nodejs npm"],
      });
      await sandbox.run("bash", {
        args: ["-lc", "npm install -g skills"],
      });
      await sandbox.run("bash", {
        args: [
          "-lc",
          "skills add tensorlakeai/tensorlake-skills --all -y --copy",
        ],
      });

      const result = await sandbox.run("find", {
        args: [
          "/",
          "-name",
          "SKILL.md",
          "-type",
          "f",
          "-not",
          "-path",
          "*/node_modules/*",
        ],
      });
      console.log(result.stdout);
    } finally {
      await sandbox.terminate();
      client.close();
    }
    ```
  </Tab>
</Tabs>

For sandboxes you create frequently, use the [sandbox image approach](#create-a-reusable-sandbox-image) to avoid reinstalling skills on every launch.

## What Gets Included

The skill repo contains SDK references that the agent uses as context:

```text theme={null}
tensorlake-skills/
├── AGENTS.md                       # Skill definition (OpenAI Codex)
├── SKILL.md                        # Skill definition (Claude Code, Google ADK)
└── references/
    ├── applications_sdk.md         # Orchestrate API reference
    ├── sandbox_sdk.md              # Sandbox API reference
    ├── documentai_sdk.md           # DocumentAI API reference
    └── integrations.md             # Integration patterns
```

## See Also

<CardGroup cols={2}>
  <Card title="Agent Skills" icon="wand-magic-sparkles" href="/agent-skills">
    Learn about TensorLake skills and how to install them for your coding agent.
  </Card>

  <Card title="Sandbox Images" icon="layer-group" href="/sandboxes/images">
    Create reusable sandbox images from Dockerfiles or the TensorLake image DSLs.
  </Card>
</CardGroup>
