Przejdź do treści
Biblioteka skilli
AI i agenci · Integracja z narzędziem

prompts

/prompts

Wersjonuje prompty agentów i zarządza nimi przez LangWatch Prompts CLI, zarówno przy wdrożeniu wersjonowania w całej bazie kodu, jak i przy pojedynczych promptach, w Pythonie i TypeScripcie.

Repozytorium
langwatch ↗
Licencja
Apache-2.0
Ostatnia zmiana repozytorium
27.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 27.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

Co robi i kiedy

Wersjonuje prompty agentów i zarządza nimi przez LangWatch Prompts CLI, zarówno przy wdrożeniu wersjonowania w całej bazie kodu, jak i przy pojedynczych promptach, w Pythonie i TypeScripcie.

Oryginalny opis (EN)

Version and manage your agent's prompts with LangWatch Prompts CLI. Use for both onboarding (set up prompt versioning for an entire codebase) and targeted operations (version a specific prompt, create a new prompt version). Supports Python and TypeScript.

Jak działa

  1. Determine Scope
  2. Plan Limits
  3. Step 1: Read the Prompts CLI Docs
  4. Step 2: Initialize Prompts in the Project
  5. Step 3: Create a Managed Prompt for Each Hardcoded Prompt
  6. Step 4: Update Application Code
  7. Step 5: Sync to the Platform
  8. Step 6: Tag Versions for Deployment
  9. Step 7: Verify
  10. Common Mistakes
Sekcje z nagłówków SKILL.md, w oryginale · 156 linii, 868 słów
Podgląd SKILL.md
---
name: prompts
user-prompt: "Version my prompts with LangWatch"
description: Version and manage your agent's prompts with LangWatch Prompts CLI. Use for both onboarding (set up prompt versioning for an entire codebase) and targeted operations (version a specific prompt, create a new prompt version). Supports Python and TypeScript.
license: MIT
compatibility: Works with Claude Code and similar coding agents. The `langwatch` CLI is the only interface.
---

# Version Your Prompts with LangWatch Prompts CLI

## Determine Scope

If the user's request is **general** ("set up prompt versioning", "version my prompts"):

- Read the full codebase to find all hardcoded prompt strings
- Study git history to understand what changed and why: focus on agent behavior changes, prompt tweaks, bug fixes. Read commit messages for context.
- Set up the Prompts CLI and create managed prompts for each hardcoded prompt
- Update all application code to use `langwatch.prompts.get()`

If the user's request is **specific** ("version this prompt", "create a new prompt version"):

- Focus on the specific prompt
- Create or update the managed prompt
- Update the relevant code to use `langwatch.prompts.get()`

In Langy, do not print the code change for the user to apply by hand: call `code_access` and follow the `code-changes` skill to make it on their machine or through GitHub.

## Plan Limits

LangWatch's free plan has limits on prompts, scenarios, evaluators, experiments, and datasets. When you hit a limit, the API returns `"Free plan limit of N reached..."` with an upgrade link.

How to handle:

- Work within the limits. If 3 resources of the relevant type are allowed, create 3 meaningful ones, not 10.
- Make every creation count: each one should demonstrate clear value.
- Show what works FIRST. If you hit a limit, summarize what was accomplished and note that upgrading the plan raises it. Point to the subscription settings on the platform, or to the license settings if the CLI is pointed at a self-hosted endpoint. Read the endpoint the CLI actually uses, which can come from `.env`, from the process environment, or from the saved CLI configuration.
- Do NOT delete existing resources to make room or repurpose an existing resource to evade the limit.

## Step 1: Read the Prompts CLI Docs

Then specifically read the Prompts CLI guide:

```bash
langwatch docs prompt-management/cli
```

CRITICAL: Do NOT guess how to use the Prompts CLI. Read the docs first.

## Step 2: Initialize Prompts in the Project

```bash
langwatch prompt init
```

Creates a `prompts.json` config and a `prompts/` directory in the project root.

## Step 3: Create a Managed Prompt for Each Hardcoded Prompt

Scan the codebase for hardcoded prompt strings (system messages, instructions). For each:

```bash
langwatch prompt create <name>
```

Edit the generated `.prompt.yaml` file to match the original prompt content.

**Model:** keep the generated `model` on a current model. Store the alias
`openai/latest` rather than a version number: LangWatch resolves it to the
current flagship at run time, so the prompt does not go a generation stale
every release. Do not default a new prompt to a legacy model like
`gpt-4o-mini`; pick one only when the user is trading quality for cost or
latency on purpose.

**Temperature:** the gpt-5 and gpt-6 families reject a custom `temperature`, so
do not add `modelParameters.temperature` for those models. `create` omits it on purpose.

**Structured outputs:** if the prompt must return strict JSON, add a
`response_format` block instead of asking for JSON in prose:

```yaml
response_format:
  name: product_category
  schema:
    type: object
    properties:
      category: { type: string }
      reasoning: { type: string }
    required: [category, reasoning]
    additionalProperties: false
```

`response_format` round-trips losslessly through `sync`/`pull`. See
`langwatch docs prompt-management/cli` for the full format.

## Step 4: Update Application Code

Replace every hardcoded prompt string with a call to `langwatch.prompts.get()`.

**Python (BAD → GOOD):**

```python
agent = Agent(instructions="You are a helpful assistant.")
```

```python
import langwatch
prompt = langwatch.prompts.get("my-agent")
agent = Agent(instructions=prompt.compile().messages[0]["content"])
```

**TypeScript (BAD → GOOD):**

```typescript
const systemPrompt = "You are a helpful assistant.";
```

```typescript
const langwatch = new LangWatch();
const prompt = await langwatch.prompts.get("my-agent");
```

CRITICAL: Do NOT wrap `langwatch.prompts.get()` in a try/catch with a hardcoded fallback string. The whole point of prompt versioning is that prompts are managed externally. A fallback defeats this by silently reverting to a stale hardcoded copy.

## Step 5: Sync to the Platform

```bash
langwatch prompt sync
```

## Step 6: Tag Versions for Deployment

Three built-in tags: `latest` (auto-assigned), `production`, `staging`. Update code to fetch by tag:

```python
prompt = langwatch.prompts.get("my-agent", tag="production")
```

```typescript
const prompt = await langwatch.prompts.get("my-agent", { tag: "production" });
```

Assign tags via the CLI (or the Deploy dialog in the LangWatch UI):

```bash
langwatch prompt tag assign my-agent production
```

For canary or blue/green deployments, create custom tags with `langwatch prompt tag create`.

## Step 7: Verify

Run `langwatch prompt list` to confirm everything synced, or open the Prompts section in the LangWatch app.

## Common Mistakes

- Do NOT hardcode prompts. Always fetch via `langwatch.prompts.get()`
- Do NOT add a hardcoded fallback string in a try/catch; that silently defeats versioning
- Do NOT manually edit `prompts.json`. Use the CLI
- Do NOT skip `langwatch prompt sync` after creating prompts
- Prefer the flagship alias `openai/latest` (or `openai/latest-mini` for the fast tier). Pin a version only when a prompt is tuned to one, and pick an older model like `gpt-4o-mini` only when intentionally optimizing for cost or latency
- Do NOT set `modelParameters.temperature` on a gpt-5 or gpt-6 family model; both families reject it
- Do NOT ask for JSON in the prompt text when output must be structured. Use a `response_format` block

Wersje

W bazie nie ma innych skilli o nazwie prompts.

Identyczna treść występuje jeszcze w 1 innych folderach na GitHubie. Tu pokazujemy jedną, najlepiej ocenioną kopię.

Migawka bazy z 13.11.2026 · wersja paczki 4623703d7893 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100tracing
    Dodaje śledzenie LangWatch do kodu Python lub TypeScript, od instrumentacji całej bazy kodu po pojedyncze funkcje.
  • 90prompt-version
    Buduje systemy wersjonowania promptów: przechowywanie, testy A/B, śledzenie regresji i wycofywanie zmian.
  • 100prompt-governance
    Audytuje prompty pod kątem bezpieczeństwa i podatności na injection, prowadzi katalog promptów, wersjonuje je i ocenia jakość oraz zgodność.
  • 100genai-prompt-versioning
    Wersjonuje prompty i porównuje zmiany na powtarzalnych przykładach.
  • 100agent-platform-prompt-management
    Zarządza promptami w Agent Platform: tworzy, listuje, pobiera, wersjonuje i usuwa zarządzane prompty.
  • 95langwatch
    Odczytuje ślady LLM z LangWatch przez CLI: co agent lub model zrobił w produkcji, także dla konkretnej sesji lub identyfikatora.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.