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

# Prompts Reference

MCP prompts for common Contree workflows. Prompts provide structured instructions that guide AI agents through multi-step tasks.

<Columns cols={2}>
  <Card title="prepare-environment" href="./prepare-environment" icon="gear" />

  <Card title="run-python" href="./run-python" icon="terminal" />

  <Card title="run-shell" href="./run-shell" icon="terminal" />

  <Card title="sync-and-run" href="./sync-and-run" icon="rotate" />

  <Card title="install-packages" href="./install-packages" icon="box-open" />

  <Card title="parallel-tasks" href="./parallel-tasks" icon="code-fork" />

  <Card title="build-project" href="./build-project" icon="hammer" />

  <Card title="debug-failure" href="./debug-failure" icon="bug" />

  <Card title="inspect-image" href="./inspect-image" icon="magnifying-glass" />

  <Card title="multi-stage-build" href="./multi-stage-build" icon="layer-group" />
</Columns>

## Quick Reference

| Prompt                                       | Description                                                   | Key Parameters                                   |
| -------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------ |
| [prepare-environment](./prepare-environment) | Prepare container environment with CHECK-PREPARE-EXECUTE flow | `task`, `base`, `project`, `packages`            |
| [run-python](./run-python)                   | Run Python code in isolated container                         | `code`                                           |
| [run-shell](./run-shell)                     | Run shell command in isolated container                       | `command`, `image`                               |
| [sync-and-run](./sync-and-run)               | Sync local files and run command                              | `source`, `command`, `image`                     |
| [install-packages](./install-packages)       | Install packages and create reusable image                    | `packages`, `image`                              |
| [parallel-tasks](./parallel-tasks)           | Run multiple tasks in parallel                                | `tasks`, `image`                                 |
| [build-project](./build-project)             | Build project: install deps and run tests                     | `source`, `install_cmd`, `test_cmd`              |
| [debug-failure](./debug-failure)             | Diagnose failed operation                                     | `operation_id`                                   |
| [inspect-image](./inspect-image)             | Explore container image contents                              | `image`                                          |
| [multi-stage-build](./multi-stage-build)     | Multi-stage build with rollback points                        | `source`, `install_cmd`, `build_cmd`, `test_cmd` |

## Using Prompts

### With MCP Clients

MCP-compatible clients can invoke prompts directly:

```json theme={null}
{
  "prompt": "prepare-environment",
  "args": {
    "task": "Train ML model",
    "base": "python:3.11-slim",
    "packages": "numpy pandas scikit-learn"
  }
}
```

### Prompt Output

Prompts return structured instructions that guide the agent through:

1. **Step-by-step workflows** - Ordered operations with clear dependencies
2. **Tool selection** - Which Contree tools to use and when
3. **Parameter guidance** - Correct values for each tool call
4. **Best practices** - Following the CHECK-PREPARE-EXECUTE pattern

## Categories

### Environment Setup

* [prepare-environment](./prepare-environment) - Full workflow with environment reuse
* [install-packages](./install-packages) - Install and tag for reuse

### Code Execution

* [run-python](./run-python) - Quick Python execution
* [run-shell](./run-shell) - Shell command execution
* [sync-and-run](./sync-and-run) - Local files + execution

### Building and Testing

* [build-project](./build-project) - Standard build + test workflow
* [multi-stage-build](./multi-stage-build) - Complex builds with checkpoints

### Operations

* [parallel-tasks](./parallel-tasks) - Concurrent execution
* [debug-failure](./debug-failure) - Error diagnosis
* [inspect-image](./inspect-image) - Image exploration
