circle-check
Our docs are AI-ready. Use them as context for any AI, or ask questions via the search bar.

robotSkill

@trustless-work/skill

Install AI skills and verify Trustless Work integrations directly from your terminal.

npm versionarrow-up-right npm downloadsarrow-up-right


What are AI Skills?

Modern AI coding assistants like Claude Code or Gemini CLI are general-purpose tools β€” they know a lot about programming, but they don't inherently understand your specific product, your API conventions, or the nuances of your integration patterns.

Skills solve this problem. A skill is a curated set of markdown files injected into the AI agent's context directory, so the assistant can read them as reference material when helping you write, debug, or review code. Think of it as giving the AI a focused manual for a specific integration β€” without any fine-tuning or model changes.

A skill typically contains:

  • Core concepts and mental models for the product

  • API and SDK reference documentation

  • Lifecycle guides and role definitions

  • Working code examples and common patterns

  • Pre-production checklists

When the AI agent starts a session, it can access these files and apply their knowledge to every suggestion it makes. The result is an assistant that understands your stack deeply β€” and that you don't have to re-explain every time.


Why are Skills Useful?

Without a skill

You spend time explaining the same context on every conversation:

"Trustless Work is an escrow protocol on Stellar... the deploy endpoint returns an unsigned XDR transaction... you need to sign it with the funder's wallet... the trustline is set with the issuer address, not the contract address..."

With a skill

The AI already knows all of that. You can go straight to:

"Generate the escrow deployment flow for my freelance marketplace."

And it will produce correct, idiomatic code on the first try.

Skills are especially valuable for:

  • Onboarding new developers β€” the AI can guide them with accurate context

  • Reducing integration errors β€” the AI flags wrong patterns before they ship

  • Staying up to date β€” run update when the skill releases a new version and your AI is immediately current


The Trustless Work Skill

The @trustless-work/skill package installs a curated knowledge base about Trustless Work Escrow-as-a-Service into your preferred AI coding assistant. It covers everything your AI needs to help you build correct, production-ready escrow integrations on Stellar.

What the skill teaches the AI

Topic
Content

Core concepts

What Trustless Work is, escrow types, the XDR signing pattern

Roles

All 9 roles (Service Provider, Approver, Release Signer, Receiver, Platform Address, Dispute Resolver) and their permissions

Lifecycle

The 6 phases from Initiation to Release and Dispute Resolution

REST API

Endpoints, authentication, base URLs, deployment payloads, rate limits

SDK

React/Next.js hooks, TrustlessWorkConfig provider setup, TypeScript types

Blocks

Pre-built UI components, provider nesting order, peer dependencies

Examples

Full working integration scenarios for API and SDK

Checklist

Pre-production verification items before going live

Critical details the skill encodes

These are the most common integration mistakes β€” the skill teaches the AI to catch them:

  • Every write operation returns an unsigned XDR transaction that must be signed by the correct role before submission

  • The trustline field in the deploy payload requires the Stellar issuer address (G…) β€” not the contract address (C…)

  • Trustlines must be added from the user's own wallet β€” there is no API call for this

  • Provider nesting order matters: QueryClientProvider β†’ TrustlessWorkConfig β†’ WalletProvider

  • Milestone approvals are irreversible on-chain

  • API rate limit is 50 requests per 60 seconds


Supported AI Agents

Agent
Status
Skill path

Claude Code

βœ… Supported

.claude/skills/trustless-work/

Gemini CLI

βœ… Supported

.gemini/skills/trustless-work/

OpenCode

πŸ”œ Coming soon

β€”


Installation

No global install required. Run directly with npx:

An interactive prompt will guide you through three steps:

Step 1 β€” Select your AI agent

Step 2 β€” Select an action

Step 3 β€” Choose a product preset (install only)

The selected skill files are copied to your agent's context directory. From that moment, your AI assistant has full knowledge of the Trustless Work integration surface.


Keeping the Skill Updated

As the Trustless Work API and SDK evolve, so does the skill. To update all installed skills to the latest version:

This automatically detects which agents have the skill installed and refreshes all template files.


Verifying Your Integration

Beyond installing context for the AI, the CLI includes an integration verifier that statically analyzes your codebase and reports issues before you deploy to production.

The verifier detects your project type (Next.js, React SPA, Node.js backend) and runs targeted checks based on which Trustless Work products you're using.

What gets verified

REST API usage

  • API key is loaded from an environment variable (not hardcoded)

  • Requests include the x-api-key header

  • Base URLs are correct for testnet and mainnet

  • XDR signing pattern is implemented correctly

  • Rate limit handling is present

SDK usage (@trustless-work/escrow)

  • Package is installed

  • TrustlessWorkConfig provider wraps the application

  • "use client" directive is present where required

  • QueryClientProvider is placed before TrustlessWorkConfig

  • engagementId is passed when creating escrows

  • Stellar Wallets Kit is integrated for XDR signing

Blocks usage (@trustless-work/blocks)

  • Package and all peer dependencies are installed

  • Provider nesting order is correct

  • "use client" is set on layout files

  • WalletNetwork is configured

  • setSelectedEscrow pattern is used correctly

  • Approval confirmation dialogs are implemented

  • Trustline guidance is present in the UI

Verification report

Each check returns one of three statuses:

Status
Meaning

βœ… OK

Correctly implemented

⚠️ WARN

Works but not production-ready

❌ FAIL

Critical issue that must be fixed

Every finding includes a description, what was detected, and a "how to fix" guide with a link to the relevant documentation.

The report is printed to the console and also saved as a markdown file at:

  • .claude/skills/trustless-work/report.md (Claude Code)

  • .gemini/skills/trustless-work/report.md (Gemini CLI)

This file can be committed to your repository or shared with reviewers.


Skill File Structure

After installation, the following files are available in your agent's skill directory:

You can read any of these files directly in your editor. They are plain markdown β€” no special tooling required.


Requirements

  • Node.js >= 18.0.0

  • One of the supported AI agents installed on your machine


Quick Reference

Command
Description

npx @trustless-work/skill

Interactive install or verify

npx @trustless-work/skill update

Update all installed skills

npm: npmjs.com/package/@trustless-work/skillarrow-up-right

Last updated

Was this helpful?