---
title: Agent Skill
sidebarTitle: Agent Skill
description: Install the Langfuse agent skill to give your coding agent access to Langfuse tracing, prompt management, datasets, and documentation — right from the editor.
---

# Langfuse Agent Skill

The Langfuse agent skill helps AI coding agents use Langfuse effectively. It follows the open [Agent Skills](https://github.com/anthropics/skills) standard and works with Claude Code, Cursor, Windsurf, and other compatible agents. The skill is open source on [GitHub](https://github.com/langfuse/skills).

## Why use it [#why-use-it]

Coding agents produce significantly better results with the skill installed, because they are conditioned to follow best practices. A coding agent with access to the skill has an opinionated view on what good looks like, based on Langfuse's knowledge.

The skill is a self-contained folder with a `SKILL.md` entrypoint describing general rules and instructions on using documentation, plus reference docs for specific workflows that are filled with specific best practices:

  <FileTree>
    <FileTree.File name="SKILL.md" />
    <FileTree.Folder name="references" defaultOpen>
      <FileTree.File name="cli.md" />
      <FileTree.File name="instrumentation.md" />
      <FileTree.File name="prompt-migration.md" />
      <FileTree.File name="..." />
    </FileTree.Folder>
  </FileTree>

The skill uses a progressive disclosure model: the frontmatter is always loaded into the agent's context so it knows when the skill is relevant, but the full instructions and reference docs are only loaded on demand. This keeps context usage low while giving agents access to specialized knowledge.

## Install [#install]

Install the [Langfuse Agent Skill](https://github.com/langfuse/skills) to let your coding agent access all Langfuse features.

<Tabs items={["Ask your coding agent", "Cursor plugin", "Manual installation"]}>

<Tab>

Ask your coding agent to install the skill by pointing to the [GitHub repository](https://github.com/langfuse/skills).

```txt filename="Agent instruction"
"Install the Langfuse Agent Skill from github.com/langfuse/skills."
```

</Tab>

<Tab>

Langfuse has a [Cursor Plugin](https://cursor.com/docs/plugins) that includes the skill automatically.

  <Button asChild>
    <Link
      href="https://cursor.com/marketplace/langfuse"
      target="_blank"
      rel="noopener noreferrer"
    >
      Install Plugin in Cursor
    </Link>
  </Button>

</Tab>

<Tab>

Install via npm ([skills CLI](https://www.npmjs.com/package/skills)):

```bash
npx skills add langfuse/skills --skill "langfuse"
```

If you want to target a specific agent directly:

```bash
npx skills add langfuse/skills --skill "langfuse" --agent "<agent-id>"
```

<details>
<summary>Alternatively you can manually clone the skill</summary>

1. Clone repo somewhere stable

```bash
git clone https://github.com/langfuse/skills.git /path/to/langfuse-skills
```

2. Make sure your agent's skills dir exists

```bash
mkdir -p /path/to/<agent-skill-root>/skills
```

3. Symlink the skill folder

```bash
ln -s /path/to/langfuse-skills/skills/langfuse /path/to/<agent-skill-root>/skills/langfuse
```

</details>

</Tab>

</Tabs>

Once installed, you can prompt your agent with what you want to do. A couple of examples:

- _Show me the last 10 traces with a score below 0.5_
- _Create a dataset called "edge-cases" and add these 3 items to it_
- _Migrate the system prompt in src/agent.ts to Langfuse prompt management_

## Resources [#resources]

- [Langfuse for Agents](/agents) — overview of the skill, CLI, and MCP server for coding agents
- [Langfuse Skills on GitHub](https://github.com/langfuse/skills)
- [Langfuse CLI](/docs/api-and-data-platform/features/cli) — the CLI the skill uses under the hood
- [MCP Server](/docs/api-and-data-platform/features/mcp-server) — alternative protocol-based approach for agents
- [Making Agents fall in love with Langfuse](/blog/2026-02-13-will-you-be-my-cli) — the full story behind the skill, CLI, and agent platform
- [Using Agent Skills to Improve your Prompts](/blog/2026-02-16-prompt-improvement-claude-skills)
- [Evaluating AI Agent Skills](/blog/2026-02-26-evaluate-ai-agent-skills)

<!-- agent-instructions -->

---

## Agent Instructions

This page is part of the [Langfuse](https://langfuse.com) documentation, published as plain Markdown for AI agents. Every page is available as Markdown by appending `.md` to its URL, or by sending an `Accept: text/markdown` header. This page: `https://langfuse.com/docs/api-and-data-platform/features/agent-skill.md`.

### Querying these docs

If the answer is not on this page, query the documentation instead of guessing:

- **Semantic search** across all Langfuse docs, returning an answer with the relevant pages and excerpts. Ask a specific, self-contained question:

  ```bash
  curl -sG "https://langfuse.com/api/search-docs" --data-urlencode "query=How do I trace a LangGraph agent?"
  ```

- **Index of every page**: <https://langfuse.com/llms.txt>, with per-section indexes [llms-docs.txt](https://langfuse.com/llms-docs.txt), [llms-integrations.txt](https://langfuse.com/llms-integrations.txt), and [llms-self-hosting.txt](https://langfuse.com/llms-self-hosting.txt).

### Before writing Langfuse code

- **Install the [Langfuse Agent Skill](https://langfuse.com/docs/api-and-data-platform/features/agent-skill).** It encodes Langfuse's own best practices for instrumentation, prompt management, and evaluation, and materially improves results.
- **Read [What does a good trace look like?](https://langfuse.com/docs/observability/best-practices.md)** before instrumenting an application.
- **Verify endpoints, parameters, and response fields** against the [API reference](https://api.reference.langfuse.com) instead of inferring them from code examples.
- **Use the [Langfuse CLI](https://langfuse.com/docs/api-and-data-platform/features/cli)** (`npx langfuse-cli api <resource> <action>`) to read or write traces, prompts, datasets, and scores from the terminal.

Found an error in these docs? Please open an issue at <https://github.com/langfuse/langfuse-docs/issues>.
