files-inspect

Inspect, download, upload, and debug Kurtosis file artifacts. View artifacts in an enclave, download them locally for inspection, upload local files, and troubleshoot file mounting issues. Use when services can't find expected files or configs are wrong.

533 stars

Best use case

files-inspect is best used when you need a repeatable AI agent workflow instead of a one-off prompt. It is especially useful for teams working in multi. Inspect, download, upload, and debug Kurtosis file artifacts. View artifacts in an enclave, download them locally for inspection, upload local files, and troubleshoot file mounting issues. Use when services can't find expected files or configs are wrong.

Inspect, download, upload, and debug Kurtosis file artifacts. View artifacts in an enclave, download them locally for inspection, upload local files, and troubleshoot file mounting issues. Use when services can't find expected files or configs are wrong.

Users should expect a more consistent workflow output, faster repeated execution, and less time spent rewriting prompts from scratch.

Practical example

Example input

Use the "files-inspect" skill to help with this workflow task. Context: Inspect, download, upload, and debug Kurtosis file artifacts. View artifacts in an enclave, download them locally for inspection, upload local files, and troubleshoot file mounting issues. Use when services can't find expected files or configs are wrong.

Example output

A structured workflow result with clearer steps, more consistent formatting, and an output that is easier to reuse in the next run.

When to use this skill

  • Use this skill when you want a reusable workflow rather than writing the same prompt again and again.

When not to use this skill

  • Do not use this when you only need a one-off answer and do not need a reusable workflow.
  • Do not use it if you cannot install or maintain the related files, repository context, or supporting tools.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/files-inspect/SKILL.md --create-dirs "https://raw.githubusercontent.com/kurtosis-tech/kurtosis/main/skills/files-inspect/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/files-inspect/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How files-inspect Compares

Feature / Agentfiles-inspectStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Inspect, download, upload, and debug Kurtosis file artifacts. View artifacts in an enclave, download them locally for inspection, upload local files, and troubleshoot file mounting issues. Use when services can't find expected files or configs are wrong.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Files Inspect

Work with Kurtosis file artifacts — the mechanism for passing files between services and into containers.

## What are file artifacts?

File artifacts are named collections of files stored in an enclave. They're created by:
- `plan.upload_files()` — upload local files from a package
- `plan.render_templates()` — render Go templates with data
- `plan.store_service_files()` — copy files from a running service
- `plan.run_sh()` / `plan.run_python()` — store output files from scripts

Services mount artifacts via the `files` parameter in `ServiceConfig`.

## List artifacts in an enclave

```bash
kurtosis enclave inspect <enclave-name>
```

The "Files Artifacts" section shows each artifact's UUID and name:

```
========================================= Files Artifacts =========================================
UUID           Name
4a0563e5a391   1-lighthouse-geth-0-127
f49b81f30a8f   el_cl_genesis_data
88c3f17013f3   jwt_file
```

## Download artifacts

```bash
# Download to a local directory
kurtosis files download <enclave-name> <artifact-name> /tmp/artifact-output

# Example: inspect genesis data
kurtosis files download <enclave-name> el_cl_genesis_data /tmp/genesis
ls -la /tmp/genesis/
cat /tmp/genesis/config.yaml
```

## Upload files

```bash
# Upload a local file or directory as an artifact
kurtosis files upload <enclave-name> /path/to/local/file-or-dir
```

The command returns the artifact name and UUID for use in subsequent service configs.

## Inspect files inside a running service

Verify files were mounted correctly by checking content matches expectations:

```bash
# List files at the mount path to confirm they exist
kurtosis service exec <enclave-name> <service-name> -- ls -la /mounted/path/

# Inspect file contents to verify correctness
kurtosis service exec <enclave-name> <service-name> -- cat /mounted/path/config.yaml

# Compare against expected content (e.g., check a key value)
kurtosis service exec <enclave-name> <service-name> -- sh -c "grep 'expected_key' /mounted/path/config.yaml"

# Or shell in for interactive exploration
kurtosis service shell <enclave-name> <service-name>
```

## Starlark file patterns

### Upload files from package

```python
artifact = plan.upload_files(src="./static_files/config.yaml", name="my-config")

plan.add_service(
    name="my-service",
    config=ServiceConfig(
        image="my-image:latest",
        files={"/etc/myapp": artifact},
    ),
)

# Verify files were mounted correctly
plan.exec(
    service_name="my-service",
    recipe=ExecRecipe(command=["ls", "-la", "/etc/myapp/"]),
)
```

### Render templates with variables

```python
template = read_file("./templates/config.toml.tmpl")

artifact = plan.render_templates(
    name="rendered-config",
    config={
        "config.toml": struct(
            template=template,
            data={"port": 8080, "host": "0.0.0.0"},
        ),
    },
)
```

Template syntax uses Go templates:

```toml
# config.toml.tmpl
host = "{{.host}}"
port = {{.port}}
```

### Copy files from a running service

```python
artifact = plan.store_service_files(
    service_name="my-service",
    src="/data/output",
    name="service-output",
)
```

### Store output from a shell command

```python
result = plan.run_sh(
    run="echo 'hello' > /tmp/output.txt && cat /tmp/output.txt",
    store=[StoreSpec(src="/tmp/output.txt", name="shell-output")],
)
```

## Kubernetes-specific

On Kubernetes, file artifacts are stored as files-artifacts-expander init containers:

```bash
# See init containers for a service pod
kubectl describe pod <pod-name> -n kt-<enclave-name> | grep -A10 "Init Containers"

# Check if files-artifacts-expander succeeded
kubectl logs <pod-name> -n kt-<enclave-name> -c files-artifact-expander

# If the expander image is failing (ImagePullBackOff), check image tag
kubectl describe pod <pod-name> -n kt-<enclave-name> | grep "files-artifacts-expander"
```

## Debugging workflow

When files aren't working as expected, follow these steps:

```bash
# 1. List artifacts in the enclave to verify they exist
kurtosis enclave inspect <enclave-name>

# 2. Download the artifact and inspect its contents locally
kurtosis files download <enclave-name> <artifact-name> /tmp/debug-artifact
cat /tmp/debug-artifact/config.yaml

# 3. Verify the mount path inside the service
kurtosis service exec <enclave-name> <service-name> -- ls -la /mounted/path/

# 4. Check file contents match expectations
kurtosis service exec <enclave-name> <service-name> -- cat /mounted/path/config.yaml

# 5. If mismatch: check template data or upload source
```

## Common issues

| Symptom | Cause | Fix |
|---------|-------|-----|
| File not found in service | Wrong mount path | Check `files` dict key matches expected path |
| Empty file after render | Template syntax error | Download artifact and inspect rendered output |
| Init container crash | files-artifacts-expander image issue | Check init container logs with kubectl |
| Artifact name conflict | Duplicate artifact names | Use unique names for each `plan.upload_files()` / `plan.render_templates()` |
| Permission denied | Container runs as non-root | Mount to a writable path or adjust image permissions |

Related Skills

enclave-inspect

533
from kurtosis-tech/kurtosis

Inspect and manage Kurtosis enclaves. List enclaves, view services and ports, examine file artifacts, dump enclave state for debugging, and clean up. Use when you need to understand what's running inside an enclave or export its state.

starlark-dev

533
from kurtosis-tech/kurtosis

Develop and debug Kurtosis Starlark packages. Create packages from scratch, understand the plan-based execution model, use print() debugging, handle future references, and test packages locally. Use when writing or troubleshooting .star files.

service-manage

533
from kurtosis-tech/kurtosis

Manage services in Kurtosis enclaves. Add, inspect, stop, start, remove, update services. View logs, shell into containers, and execute commands. Use when you need to interact with running services.

run-package

533
from kurtosis-tech/kurtosis

Run Starlark scripts and packages with kurtosis run. Covers all flags including dry-run, args-file, parallel execution, image download modes, verbosity levels, and production mode. Use when executing Kurtosis packages locally or from GitHub.

portal

533
from kurtosis-tech/kurtosis

Manage Kurtosis Portal for remote context access. Start, stop, and check status of the Portal daemon that enables communication with remote Kurtosis servers. Use when working with remote Kurtosis contexts.

port-forward

533
from kurtosis-tech/kurtosis

View and manage port mappings for Kurtosis services. Check which local ports map to service ports and troubleshoot connectivity. Use when services aren't reachable or you need to find the right port.

lint

533
from kurtosis-tech/kurtosis

Lint and format Kurtosis Starlark files. Check syntax, validate docstrings, and auto-format .star files. Use when writing or reviewing Starlark packages to ensure code quality.

k8s-dev-deploy

533
from kurtosis-tech/kurtosis

Build, push, and deploy Kurtosis dev images to a Kubernetes cluster without creating a release. Rebuilds engine, core, and files-artifacts-expander as multi-arch Docker images with a unique tag, pushes to the logged-in user's Docker Hub, and restarts the engine. Use when testing local code changes on a k8s cluster.

k8s-debug-pods

533
from kurtosis-tech/kurtosis

Debug Kurtosis pods on Kubernetes. Diagnose why pods are Pending, CrashLoopBackOff, ImagePullBackOff, or Evicted. Check node taints, tolerations, resource pressure, and pod events. Use when kurtosis engine start fails or pods aren't coming online.

k8s-clean-cluster

533
from kurtosis-tech/kurtosis

Force-clean all Kurtosis resources from a Kubernetes cluster when kurtosis clean hangs or fails. Removes all kurtosis namespaces, pods, daemonsets, cluster roles, and cluster role bindings. Use when kurtosis clean -a hangs or leaves behind orphaned resources.

import-compose

533
from kurtosis-tech/kurtosis

Import Docker Compose files into Kurtosis. Convert docker-compose.yml to Starlark packages or run them directly. Use when migrating existing Docker Compose workflows to Kurtosis.

grafloki

533
from kurtosis-tech/kurtosis

Start Grafana and Loki for centralized log collection from Kurtosis enclaves. View aggregated service logs in a Grafana dashboard. Use when you need a UI for browsing logs across multiple services or want persistent log storage.