> For the complete documentation index, see [llms.txt](https://haven-11.gitbook.io/haven-ai-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://haven-11.gitbook.io/haven-ai-docs/core-products/havenskill.md).

# HavenSkill

> One-click OpenClaw integration — instantly query, evaluate, and rank stablecoin investment paths.

***

## What is HavenSkill?

HavenSkill is a packaged OpenClaw skill module. Any AI agent built on the OpenClaw framework can install HavenSkill to gain instant access to Haven's yield data, risk scoring, and execution capabilities — without custom integration work.

{% hint style="info" %}
HavenSkill makes Haven composable. Third-party agents, trading bots, and DAO automation tools can leverage Haven's infrastructure as a skill layer rather than building from scratch.
{% endhint %}

***

## Skill Capabilities

| Method                        | Description                                                                   |
| ----------------------------- | ----------------------------------------------------------------------------- |
| `query_yield_paths()`         | Returns ranked stablecoin yield opportunities with current APY and HavenScore |
| `score_protocol(protocol_id)` | Returns real-time HavenScore for any supported protocol                       |
| `execute_strategy(params)`    | Submits an allocation strategy for on-chain execution via HavenClaw           |
| `monitor_position(vault_id)`  | Subscribe to real-time alerts for a user's active Haven position              |

***

## Installation

**Via npm:**

```bash
npm install @openclaw/haven-skill
```

**Via OpenClaw registry:**

```bash
openclaw skill add haven
```

***

## Usage Example

```typescript
import { HavenSkill } from '@openclaw/haven-skill';

const agent = new OpenClawAgent({
  skills: [new HavenSkill({ apiKey: process.env.HAVEN_API_KEY })]
});

// Query best yield paths
const paths = await agent.run('query_yield_paths', {
  minScore: 70,
  minApy: 5.0,
  asset: 'USDC'
});

// Returns ranked list of opportunities with APY and HavenScore
```

***

## Response Format

```json
{
  "paths": [
    {
      "protocol": "Aave V3",
      "asset": "USDC",
      "apy": 6.8,
      "haven_score": 88,
      "chain": "Arbitrum",
      "tvl_usd": 420000000
    },
    {
      "protocol": "Tokenized T-Bill",
      "asset": "USDC",
      "apy": 5.1,
      "haven_score": 96,
      "chain": "Ethereum",
      "tvl_usd": 85000000
    }
  ]
}
```

***

## Related

* [OpenClaw Framework — Full integration guide](/haven-ai-docs/integration/openclaw.md)
* [API Reference — Direct REST API access](/haven-ai-docs/integration/api.md)
* [HavenScore — Understanding risk scores](/haven-ai-docs/core-products/havenscore.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://haven-11.gitbook.io/haven-ai-docs/core-products/havenskill.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
