Langfuse skill helps you effectively use Langfuse across diverse workflows such as application instrumentation, prompt migration, and debugging traces. It's ideal for developers seeking to access and modify Langfuse data and documentation programmatically.
$ npx skills add https://github.com/langfuse/skills --skill langfuseThe Langfuse skill teaches AI coding assistants like Claude Code and Cursor how to work with Langfuse, the open-source LLM engineering platform. It provides programmatic access to query and manage traces, prompts, datasets, and scores through the Langfuse API, and includes documentation lookup capabilities. The skill automates common workflows including setting up tracing, migrating prompts to Langfuse prompt management, auditing existing instrumentation, and querying data via API. Developers can use it to implement LLM application tracing, manage prompt experiments, and integrate Langfuse into CI/CD pipelines with experiment gates. Installation requires a Langfuse account and API keys, available through Cursor plugins, the skills CLI, or manual setup.
Install using the command: `$ npx skills add https://github.com/langfuse/skills --skill langfuse`
Query and modify Langfuse data (traces, prompts, datasets) programmatically.
Access current Langfuse documentation through structured index and search APIs.
Follow use-case-specific guidelines for effective Langfuse implementation.
$ npx skills add https://github.com/langfuse/skills --skill langfusegit clone https://github.com/langfuse/skillsCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Act as a Langfuse expert and help me [TASK] using Langfuse's API or SDK. Specifically, I need to [SPECIFIC_ACTION] related to [PROJECT_NAME] or [DATASET]. Provide code snippets if applicable. [ADDITIONAL_CONTEXT].
## Langfuse Debugging Assistance
Here’s how to debug a specific trace in your Langfuse dashboard for the `customer-support-bot` project:
### Steps to Debug:
1. **Locate the Trace**:
- Navigate to the *Traces* tab in Langfuse.
- Filter by `project_name: "customer-support-bot"` and `trace_id: "tr_7f3e9a2b"`.
- The trace shows a failed API call to your payment service.
2. **Analyze the Error**:
- Under *Observations*, the error `PaymentGatewayTimeout` is highlighted.
- The `input` field contains the user’s request: `"Process refund for order #45678"`.
- The `output` field shows the raw response: `{"error": "Timeout after 5s"}`.
3. **Reproduce the Issue**:
```python
from langfuse import Langfuse
langfuse = Langfuse(
secret_key="lf_...",
public_key="pk_lf_...",
host="https://cloud.langfuse.com"
)
trace = langfuse.get_trace("tr_7f3e9a2b")
print(trace.observations)
```
4. **Fix the Issue**:
- Increase the timeout for the payment service to `10s` in your `payment_client.py`.
- Add a retry mechanism with exponential backoff.
5. **Verify the Fix**:
- Re-run the trace in your staging environment.
- Check Langfuse for the updated trace with `status: "success"`.
### Key Takeaways:
- Always check `observations` for errors.
- Use the `input` and `output` fields to correlate user requests with API responses.
- Reproduce issues locally using the Langfuse SDK before deploying fixes.
Would you like me to help you implement the retry mechanism or analyze another trace?Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan