---
name: elnora-files
description: >
  This skill should be used when the user asks to "list files", "read a file",
  "get file content", "view protocol output", "file versions", "version history",
  "download protocol", or any task involving Elnora Platform file management.
---

# Elnora Files

Browse and read files generated by Elnora Platform tasks. Files are protocol outputs, templates, and other artifacts attached to projects.

## Invocation

```
CLI="uv run --project ${CLAUDE_PLUGIN_ROOT} elnora"
```

## Commands

### List Files

```bash
$CLI --compact files list --project <PROJECT_ID>
$CLI --compact files list --project <PROJECT_ID> --page 2 --page-size 50
$CLI --compact --fields "id,name" files list --project <PROJECT_ID>
```

`--project` is required. Response:

```json
{"items":[{"id":"<UUID>","name":"...","mimeType":"...","size":N,"createdAt":"...","updatedAt":"..."}],"page":1,"totalCount":N,"hasNextPage":false}
```

### Get File Metadata

```bash
$CLI --compact files get <FILE_ID>
```

Returns metadata (name, type, size, timestamps) without the actual content. Use to inspect a file before reading.

### Get File Content

```bash
$CLI files content <FILE_ID>
```

Returns raw file content to stdout (not JSON-wrapped). Pipe to a file to save:

```bash
$CLI files content <FILE_ID> > protocol.md
```

Note: `--compact` and `--fields` have no effect on this command — output is always raw content.

### Get Version History

```bash
$CLI --compact files versions <FILE_ID>
$CLI --compact files versions <FILE_ID> --page-size 10
```

Returns paginated list of file versions. Use to track how a protocol evolved across task iterations.

## Agent Recipes

**Read a protocol from a project:**

```bash
# 1. List files in the project
$CLI --compact --fields "id,name" files list --project <PROJECT_ID>

# 2. Read the content of the target file
$CLI files content <FILE_ID>
```

**Compare file versions:**

```bash
# Get version history, then read specific versions
$CLI --compact files versions <FILE_ID>
```

**Reference a file in a task message:**

```bash
# Use file IDs from files list as --file-refs in tasks send
$CLI --compact tasks send <TASK_ID> --message "Optimize this protocol" --file-refs "<FILE_ID>"
```
