Skip to main content

Prompts

The Prompt Library is a personal and shared repository of reusable system prompts. Create prompts once, version them over time, and attach them to assistants or threads without rewriting the same instructions repeatedly.

Overview

  • Versioned by default: Every save creates a new revision; older versions are preserved and retrievable
  • Public or private: Mark a prompt public to share it with the community, or keep it private to your account
  • Raw text access: Each prompt has a public raw-text endpoint (GET /api/prompts/{id}/raw) for programmatic use
  • Search & filter: Browse by name, content, or visibility (All / My Prompts / Public)
  • Full CRUD API: Create, revise, search, toggle visibility, and delete revisions via REST

How It Works

  1. Create a prompt — Supply a name and markdown/text content. A UUID is assigned and the first revision (v1) is stored.
  2. RevisePOST /api/prompts/{id}/v saves new content as the next revision while keeping all prior revisions intact.
  3. Retrieve a specific version — Search with filter: { id, v } to pin to an exact revision.
  4. Toggle publicPUT /api/prompts/{id}/public toggles the prompt between private and public. Public prompts appear in the community listing and are accessible via the raw endpoint without authentication.

Prompt Data Model

FieldTypeDescription
idstring (UUID)Unique prompt identifier
namestringHuman-readable prompt name
contentstringThe prompt body (markdown supported)
publicbooleanWhether the prompt is publicly visible
vintegerRevision number (auto-incremented)

API Reference

All endpoints require a Bearer token in the Authorization header unless noted.

Create a Prompt

curl -X 'POST' \
'https://chat.ruska.ai/api/prompts' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{
"name": "Concise Summariser",
"content": "Summarise the user'\''s input in three bullet points. Be concise and factual."
}'

Response (200 OK):

{ "prompt_id": "a1b2c3d4-..." }

Search / List Prompts

curl -X 'POST' \
'https://chat.ruska.ai/api/prompts/search' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{ "query": "", "limit": 10, "offset": 0, "filter": {} }'

Pass "filter": { "id": "<prompt_id>" } to fetch a single prompt, or add "v": <n> to pin a specific revision.

Create a Revision

curl -X 'POST' \
'https://chat.ruska.ai/api/prompts/{prompt_id}/v' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{
"name": "Concise Summariser",
"content": "Summarise in three bullet points. Use plain language."
}'

Response:

{ "prompt_id": "a1b2c3d4-...", "v": 2 }

List Revisions

curl -X 'GET' \
'https://chat.ruska.ai/api/prompts/{prompt_id}/v' \
-H 'Authorization: Bearer <token>'

Delete a Revision

curl -X 'DELETE' \
'https://chat.ruska.ai/api/prompts/{prompt_id}/v/{v}' \
-H 'Authorization: Bearer <token>'

Returns 204 No Content.

Toggle Public Visibility

curl -X 'PUT' \
'https://chat.ruska.ai/api/prompts/{prompt_id}/public' \
-H 'Authorization: Bearer <token>'

Response:

{ "prompt_id": "a1b2c3d4-...", "public": true }

View Raw Prompt (No Auth)

curl 'https://chat.ruska.ai/api/prompts/{prompt_id}/raw'

Returns the latest public revision as text/plain. Returns 404 if the prompt is not public.

UI Guide

Navigate to /prompts from the sidebar to access the Prompt Library.

Prompts List (/prompts)

  • All Prompts — shows every prompt visible to you (private + public)
  • My Prompts — filters to your private prompts
  • Public — shows prompts marked public
  • Search by name or content using the top search bar
  • Click a prompt card to open the editor

Create Prompt (/prompts/create)

  • Enter a name (2+ characters) and content (10+ characters)
  • Write or paste prompt content directly, or load from a URL
  • Toggle the Public switch to share with others
  • A fullscreen Monaco editor is available for longer prompts

Edit Prompt (/prompts/{id}/edit)

  • Same form as create, pre-filled with existing content
  • Saving creates a new revision — previous versions remain accessible via the API

Best Practices

Keep Prompts Focused

Write one prompt per distinct role or task. Short, specific prompts are easier to revise and combine.

Use Versioning Intentionally

Add a revision only when the behaviour changes meaningfully. Use descriptive names so collaborators understand the purpose at a glance.

Share Thoughtfully

Mark a prompt public only when it has no domain-specific secrets or confidential context. Public prompts are readable by anyone via the raw endpoint without authentication.

  • Assistants: Attach prompts to reusable assistant configurations
  • Skills: Complement prompts with persistent skill instructions
  • Memories: Layer memory context on top of prompts

Next Steps: Create your first prompt at /prompts/create, then reference it when configuring an Assistant.