Skip to main content
skill CX Codex

tigris-object-operations — Claude Code skill for Tigris Storage

A skill that lets your agent upload, download, delete and list objects in Tigris Storage, and mint presigned URLs.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add tigrisdata/skills --skill tigris-object-operations -a claude-code
Open on GitHub

What tigris-object-operations does

The skill covers object operations in Tigris Storage: put, get, remove, list, head and presigned URL generation. Inside is a reference for the @tigrisdata/storage package — function signatures, option tables and TypeScript examples. Your agent reads the signatures there instead of guessing them.

Before anything else it checks for the Tigris CLI with tigris help and installs @tigrisdata/cli globally via npm if it is missing, telling the user first. Every method returns TigrisStorageResponse<T, E>, so check error before touching data. That ordering sits in the common mistakes section for a reason.

Large uploads get multipart: true plus an upload progress callback; listing gets pagination through hasMore and paginationToken. For browser uploads the skill points at @tigrisdata/storage/client with your own backend endpoint. Nothing here runs without the CLI installed and access to Tigris Storage configured.

What it helps with

  • upload a file to Tigris Storage from agent code
  • download an object as string, file or stream
  • generate a presigned URL for temporary access
  • page through a bucket with a prefix filter
  • read object metadata before processing it

Example prompts for the agent

  • upload the report file to Tigris Storage and give me the URL
  • create a presigned URL for object.txt that lasts an hour
  • list every object under the images/ prefix

How to install tigris-object-operations

1Skills CLI (Vercel)

npx skills add tigrisdata/skills --skill tigris-object-operations -a claude-code

2Manually: put the files in place

~/.claude/skills/tigris-object-operations/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/tigris-object-operations/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about tigris-object-operations

How do I install tigris-object-operations in Claude?

Run npx skills add tigrisdata/skills --skill tigris-object-operations -a claude-code. The skill lands in ~/.claude/skills/tigris-object-operations/SKILL.md.

What does tigris-object-operations do?

It hands your agent a reference for Tigris Storage object operations: upload, download, delete, list, metadata and presigned URLs.

What does the skill need to work?

The Tigris CLI. The skill checks for it with tigris help and installs @tigrisdata/cli globally through npm when it is missing.

Source text

SKILL.md · MIT
---
name: tigris-object-operations
description: Use when working with objects in Tigris Storage - uploading, downloading, deleting, listing, getting metadata, or generating presigned URLs
---

# Tigris Object Operations

## Prerequisites

**Before doing anything else**, install the Tigris CLI if it's not already available:

```bash
tigris help || npm install -g @tigrisdata/cli
```

If you need to install it, tell the user: "I'm installing the Tigris CLI (`@tigrisdata/cli`) so we can work with Tigris object storage."

## Overview

Tigris Storage provides object operations: upload (put), download (get), delete (remove), list, metadata (head), and presigned URLs.

All methods return `TigrisStorageResponse<T, E>` - check `error` property first.

## Quick Reference

| Operation     | Function                         | Key Parameters                    |
| ------------- | -------------------------------- | --------------------------------- |
| Upload        | `put(path, body, options)`       | path, body, access, contentType   |
| Download      | `get(path, format, options)`     | path, format (string/file/stream) |
| Delete        | `remove(path, options)`          | path                              |
| List          | `list(options)`                  | prefix, limit, paginationToken    |
| Metadata      | `head(path, options)`            | path                              |
| Presigned URL | `getPresignedUrl(path, options)` | path, operation (get/put)         |

## Upload (put)

```typescript
import { put } from "@tigrisdata/storage";

// Simple upload
const result = await put("simple.txt", "Hello, World!");
if (result.error) {
  console.error("Error:", result.error);
} else {
  console.log("Uploaded:", result.data?.url);
}

// Large file with progress
const result = await put("large.mp4", fileStream, {
  multipart: true,
  onUploadProgress: ({ loaded, total, percentage }) => {
    console.log(`${loaded}/${total} bytes (${percentage}%)`);
  },
});

// Prevent overwrite
const result = await put("config.json", config, {
  allowOverwrite: false,
});
```

## Put Options

| Option             | Values            | Default  | Purpose                  |
| ------------------ | ----------------- | -------- | ------------------------ |
| access             | public/private    | -        | Object visibility        |
| addRandomSuffix    | boolean           | false    | Avoid naming collisions  |
| allowOverwrite     | boolean           | true     | Allow replacing existing |
| contentType        | string            | inferred | MIME type                |
| contentDisposition | inline/attachment | inline   | Download behavior        |
| multipart          | boolean           | false    | Enable for large files   |
| onUploadProgress   | callback          | -        | Track upload progress    |

## Download (get)

```typescript
import { get } from "@tigrisdata/storage";

// Get as string
const result = await get("object.txt", "string");
if (result.error) {
  console.error("Error:", result.error);
} else {
  console.log("Content:", result.data);
}

// Get as file (triggers download in browser)
const result = await get("object.pdf", "file", {
  contentDisposition: "attachment",
});

// Get as stream
const result = await get("video.mp4", "stream");
const reader = result.data?.getReader();
// Process stream...
```

## Get Options

| Option             | Values            | Default     | Purpose            |
| ------------------ | ----------------- | ----------- | ------------------ |
| contentDisposition | inline/attachment | inline      | Download behavior  |
| contentType        | string            | from upload | MIME type          |
| encoding           | string            | utf-8       | Text encoding      |
| snapshotVersion    | string            | -           | Read from snapshot |

## Delete (remove)

```typescript
import { remove } from "@tigrisdata/storage";

const result = await remove("object.txt");
if (result.error) {
  console.error("Error:", result.error);
} else {
  console.log("Deleted successfully");
}
```

## List Objects

```typescript
import { list } from "@tigrisdata/storage";

// List all objects
const result = await list();
console.log("Objects:", result.data?.items);

// List with prefix (folders)
const result = await list({ prefix: "images/" });

// List with pagination
const allFiles = [];
let currentPage = await list({ limit: 10 });
allFiles.push(...currentPage.data?.items);

while (currentPage.data?.hasMore) {
  currentPage = await list({
    limit: 10,
    paginationToken: currentPage.data?.paginationToken,
  });
  allFiles.push(...currentPage.data?.items);
}
```

## List Options

| Option          | Purpose                              |
| --------------- | ------------------------------------ |
| prefix          | Filter keys starting with prefix     |
| delimiter       | Group keys (e.g., '/' for folders)   |
| limit           | Max objects to return (default: 100) |
| paginationToken | Continue from previous list          |
| snapshotVersion | List from snapshot                   |

## Object Metadata (head)

```typescript
import { head } from "@tigrisdata/storage";

const result = await head("object.txt");
if (result.error) {
  console.error("Error:", result.error);
} else {
  console.log("Metadata:", result.data);
  // { path, size, contentType, modified, url, contentDisposition }
}
```

## Presigned URLs

```typescript
import { getPresignedUrl } from "@tigrisdata/storage";

// Presigned URL for GET (temporary access)
const result = await getPresignedUrl("object.txt", {
  operation: "get",
  expiresIn: 3600, // 1 hour
});
console.log("URL:", result.data?.url);

// Presigned URL for PUT (allow client upload)
const result = await getPresignedUrl("upload.txt", {
  operation: "put",
  expiresIn: 600, // 10 minutes
});
```

## Presigned URL Options

| Option      | Values  | Default | Purpose         |
| ----------- | ------- | ------- | --------------- |
| operation   | get/put | -       | URL purpose     |
| expiresIn   | seconds | 3600    | URL expiration  |
| contentType | string  | -       | Require for PUT |

## Common Mistakes

| Mistake                      | Fix                                                  |
| ---------------------------- | ---------------------------------------------------- |
| Not checking `error` first   | Always check `if (result.error)` before `result.data`|
| Wrong format in `get()`      | Use 'string', 'file', or 'stream'                    |
| Forgetting `multipart: true` | Enable for files >100MB                              |
| Ignoring pagination          | Use `hasMore` and `paginationToken`                  |

## Client-Side Uploads

For browser uploads, use the client package to upload directly to Tigris:

```typescript
import { upload } from "@tigrisdata/storage/client";

const result = await upload(file.name, file, {
  url: "/api/upload", // Your backend endpoint
  onUploadProgress: ({ percentage }) => {
    console.log(`${percentage}%`);
  },
});
```

For initial setup, see **file-storage**.

© tigrisdata · MIT · tigrisdata/skills

Similar skills

Everything for Backend and APIs →

From the same set5

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor