langfuse-prompt-upsert

Create or update Langfuse prompt with development label. Use when creating new prompts, updating existing prompts, or improving prompt content.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "langfuse-prompt-upsert" with this command: npx skills add neuradex/langfuse-skills/neuradex-langfuse-skills-langfuse-prompt-upsert

Langfuse Prompt Upsert

Create or update a Langfuse prompt and attach the development label.

  • If the prompt does not exist: creates a new one (v1)
  • If the prompt exists: creates a new version

Setup

Set the following environment variables before use:

VariableRequiredDescription
LANGFUSE_PUBLIC_KEYYesLangfuse public key
LANGFUSE_SECRET_KEYYesLangfuse secret key
LANGFUSE_HOST or LANGFUSE_BASE_URLNoLangfuse host URL (default: https://us.cloud.langfuse.com)

When to Use

  • Creating a new prompt
  • Improving/updating an existing prompt
  • Changing prompt content

Steps

1. Check Current Prompt (for updates)

npx tsx scripts/langfuse-prompt-view.ts <prompt-name> --label=development

2. Prepare New Prompt Content

Use AskUserQuestion to confirm or propose new prompt content.

3. Create/Update Prompt

Method A: Pipe directly (recommended)

cat << 'EOF' | npx tsx scripts/langfuse-prompt-upsert.ts <prompt-name>
Prompt content goes here...
EOF

Method B: Via file

# Save to /tmp/new-prompt.txt using the Write tool, then:
npx tsx scripts/langfuse-prompt-upsert.ts <prompt-name> /tmp/new-prompt.txt

4. Verify Result

npx tsx scripts/langfuse-prompt-view.ts <prompt-name> --label=development

Template Variables

Use $variableName format for dynamic values in prompts:

VariablePurpose
$titleTitle
$contentMain content
$searchResultSearch results
$conversationConversation history
$userQuestionUser's question

Variables are replaced in code with .replace('$title', value).

Notes

  • This skill only attaches the development label
  • Attaching the production label should be done manually in the Langfuse UI
  • The existing development label is automatically moved to the new version

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

langfuse-trace-list

No summary provided by upstream source.

Repository SourceNeeds Review
General

langfuse-prompt-list

No summary provided by upstream source.

Repository SourceNeeds Review
General

langfuse-trace-view

No summary provided by upstream source.

Repository SourceNeeds Review
General

langfuse-session-view

No summary provided by upstream source.

Repository SourceNeeds Review