Skip to content

NPM code that installs the skill for AI agents that assist in the implementation of Trustless Work or verify whether any Trustless Work products are being implemented correctly.

Notifications You must be signed in to change notification settings

Trustless-Work/Trustless-Work-Skill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@trustless-work/skill

AI skill installer and integration verifier for Trustless Work — Escrow-as-a-Service on Stellar/Soroban.

What It Does

  1. Installs a Trustless Work skill for your AI coding assistant — currently supports Claude Code and Gemini CLI.
  2. Verifies your existing Trustless Work integration and produces an actionable report with ✅/⚠️/❌ findings.
  3. Updates installed skills to the latest Trustless Work spec with a single command.

Supported Agents

Agent Skill Location Status
Claude Code (Anthropic) .claude/skills/trustless-work/ ✅ Full support
Gemini CLI (Google) .gemini/skills/trustless-work/ ✅ Full support
OpenCode Coming soon

Quick Start

npx @trustless-work/skill

Follow the interactive prompts to select your agent and install the skill.

Install for Claude Code

npx @trustless-work/skill
# → Select: Claude Code
# → Select: Install skill
# → Choose product preset (API / SDK / Blocks / Full stack)

The skill is automatically available in every Claude Code session — no extra configuration needed.

Install for Gemini CLI

Prerequisites: Gemini CLI must be installed (npm install -g @google/gemini-cli).

npx @trustless-work/skill
# → Select: Gemini CLI
# → Select: Install skill
# → Choose product preset

The skill is automatically discovered by Gemini CLI from .gemini/skills/. Start a new session and ask about Trustless Work.

Update Skill Knowledge

Keep your skill content up-to-date with the latest Trustless Work specs:

npx @trustless-work/skill update

This detects all installed agent skills (Claude, Gemini, or both) and refreshes the content to the latest version shipped with the package.

Example Output

  _____              _   _                  __        __         _
 |_   _| __ _   _ ___| |_| | ___  ___ ___  \ \      / /__  _ __| | __
   | || '__| | | / __| __| |/ _ \/ __/ __|  \ \ /\ / / _ \| '__| |/ /
   | || |  | |_| \__ \ |_| |  __/\__ \__ \   \ V  V / (_) | |  |   <
   |_||_|   \__,_|___/\__|_|\___||___/___/    \_/\_/ \___/|_|  |_|\_\

  ──────────────────────────────────────────────────────────────────────
  AI Skill Installer & Integration Verifier   v1.0.0
  Escrow-as-a-Service on Stellar · docs.trustlesswork.com
  ──────────────────────────────────────────────────────

? Select your AI coding assistant: › Gemini CLI (Google)
? What would you like to do? › 📦 Install skill
? Choose a product preset: › 🚀 Full stack (API + SDK + Blocks)

  ✓ SKILL.md
  ✓ references/api.md
  ✓ references/sdk.md
  ✓ references/blocks.md
  ✓ references/checklist.md
  ✓ references/examples.md
  ✓ meta.json written

  ✅  Installation complete!

  Skill installed at: .gemini/skills/trustless-work/
  Usage: The skill is automatically available in Gemini CLI. Run "gemini" and ask about Trustless Work.

Verify Integration

npx @trustless-work/skill
# → Verify integration

  ──────────────────────────────────────────────────────────────
  🔍  Trustless Work Integration Report
  Project: Next.js  |  2/20/2026, 10:30:00 AM
  ──────────────────────────────────────────────────────────────

  API (REST)

  ✅  API key env var found (NEXT_PUBLIC_API_KEY in .env.local)
  ✅  Auth header handled via TrustlessWorkConfig (SDK)
  ⚠️   Only development (testnet) API URL found
       How to fix: Make the base URL configurable via env var for production
  ✅  XDR signing pattern detected correctly (sign → submit)
  ✅  No hardcoded secrets detected
  ⚠️   No rate limit (429) handling detected
       How to fix: Add exponential backoff for 429 responses

  SDK (@trustless-work/escrow)

  ✅  @trustless-work/escrow is in package.json
  ✅  TrustlessWorkConfig provider found in 1 file(s)
  ✅  TrustlessWorkConfig is in a "use client" component (Next.js)
  ✅  useSendTransaction + signTransaction pattern detected
  ✅  @creit.tech/stellar-wallets-kit is installed
  ⚠️   engagementId not detected in any file

  ──────────────────────────────────────────────────────────────
  Summary: 7 OK  3 Warnings  0 Failures

  ⚠️   Integration looks mostly good. Review warnings.
  ──────────────────────────────────────────────────────────────

Installed File Structure

After running the installer, your project will have (example for Gemini):

.gemini/
└── skills/
    └── trustless-work/
        ├── SKILL.md               ← Core concepts, roles, lifecycle, XDR pattern
        ├── references/
        │   ├── api.md             ← REST API endpoints, auth, examples
        │   ├── sdk.md             ← SDK hooks, provider setup, patterns
        │   ├── blocks.md          ← Blocks components, provider order
        │   ├── checklist.md       ← Pre-production checklist
        │   └── examples.md        ← Full working code examples
        └── meta.json              ← Installation metadata

For Claude Code, the structure is identical under .claude/skills/trustless-work/.

Example Prompts

Once the skill is installed, try these prompts in your agent:

"Help me deploy an escrow using the Trustless Work API"
"Set up the @trustless-work/escrow SDK in my Next.js app"
"Add the Blocks UI components with proper provider configuration"
"Review my Trustless Work integration for correctness"
"Verify my XDR signing pattern is implemented correctly"

Testing Locally

# Clone the repo
git clone https://github.com/Trustless-Work/trustless-work-skill
cd trustless-work-skill

# Install dependencies
npm install

# Run tests
npm test

# Test the CLI locally (without publishing)
npm link

# Now run from any directory
cd /path/to/your/project
trustless-work-skill

# Or use node directly
node /path/to/trustless-work-skill/bin/cli.js

Publishing to npm

# 1. Make sure you're logged in
npm login

# 2. Bump version in package.json
npm version patch  # or minor / major

# 3. Publish
npm publish --access public

# 4. Test the published version
npx @trustless-work/skill

Project Structure

bin/
  cli.js                     ← Shebang entry point (routes subcommands)
src/
  index.js                   ← Main orchestrator (interactive flow)
  commands/
    update.js                ← `npx @trustless-work/skill update`
  ui/
    banner.js                ← ASCII banner
    menu.js                  ← Interactive prompts (agent, action, products)
  installers/
    shared.js                ← Shared install logic (copy files, meta, UI)
    claudeCode.js            ← Claude Code adapter
    gemini.js                ← Gemini CLI adapter (with CLI detection)
  verifiers/
    index.js                 ← Verifier orchestrator + report export
    trustlessApi.js          ← REST API checks
    trustlessSdk.js          ← SDK checks
    trustlessBlocks.js       ← Blocks checks
  utils/
    fs.js                    ← File system utilities (agent-aware paths)
    detect.js                ← Project detection + file scanning
  __tests__/
    verify.test.js           ← Unit tests
skill/                       ← Skill templates (shared across all agents)
  SKILL.md                   ← Main entry point with YAML frontmatter
  references/
    api.md
    sdk.md
    blocks.md
    checklist.md
    examples.md

Architecture: Adding New Agents

The installer uses a shared-core + adapter pattern:

  1. Shared core (skill/ templates + src/installers/shared.js): Contains all Trustless Work knowledge and the common install flow. Both Claude and Gemini use the same SKILL.md format with YAML frontmatter.
  2. Per-agent adapters (src/installers/<agent>.js): Thin wrappers that provide agent-specific configuration (destination path, CLI detection, post-install messages).
  3. Agent-aware utilities (src/utils/fs.js): getSkillDest(agent) resolves the correct destination path per agent.

To add a new agent:

  1. Add its path to AGENT_PATHS in src/utils/fs.js
  2. Create src/installers/newAgent.js (copy gemini.js as a template)
  3. Update src/ui/menu.js to add the option
  4. Update src/index.js to route the new agent
  5. Add tests

Requirements

  • Node.js >= 18.0.0
  • npm >= 7.0.0
  • For Gemini: Gemini CLI installed (npm install -g @google/gemini-cli)

Links

License

MIT

About

NPM code that installs the skill for AI agents that assist in the implementation of Trustless Work or verify whether any Trustless Work products are being implemented correctly.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors