Skip to main content

Overview

Patterns for getting better results from AI assistants when building with Yield.xyz. These prompts are designed to work with the Yield.xyz OpenAPI spec and our documentation.

Discovery Prompts

List Yields with Filtering

Get Yield Details

Fetch Validators


Action Prompts

Enter a Yield Position

Exit a Position

Manage Actions (Claim Rewards)


Portfolio Prompts

Get All User Balances

Track Position Lifecycle


Complete Integration Prompts

Full Staking Flow

Multi-Network Portfolio


Error Handling Prompts

Handle API Errors


Anti-Patterns to Avoid

Avoid these prompts:
  • “Make a staking app” (too vague, no API context)
  • “How do I stake?” (doesn’t reference Yield.xyz specifically)
  • Asking about features not in the API spec
  • Not specifying which endpoint to use

Tips for Better Results

Reference the Spec

Attach the OpenAPI spec or reference specific endpoints

Specify Your Stack

Mention React, Vue, TypeScript, etc.

Include Examples

Paste example API responses for context

Be Specific

Name exact endpoints and fields you need

Next Steps

Guardrails

AI safety best practices

API Reference

Complete API documentation