trifle-auth_skill

This skill authenticates with the Trifle API using Sign-In with Ethereum, stores JWT tokens, and manages sessions for downstream skills.
  • Python

2.5k

GitHub Stars

6

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill openclaw/skills --skill trifle-auth

  • _meta.json273 B
  • clawdhub.json661 B
  • package-lock.json14.8 KB
  • package.json294 B
  • SKILL.md2.7 KB
  • trifle-auth.mjs10.9 KB

Overview

This skill authenticates with the Trifle API (bot.trifle.life) using Sign-In with Ethereum (SIWE) to enable wallet-based access to the Trifle ecosystem. It manages private key storage, performs SIWE signing, obtains a JWT, and persists session state so other skills can reuse the token. The workflow is focused on secure key handling and automated token storage for downstream tools.

How this skill works

The skill reads an EVM private key from an environment variable or 1Password (with a file fallback), generates or imports a wallet, and requests a SIWE nonce from the Trifle API. It constructs and signs a SIWE message, verifies the signature with the API, receives a JWT valid for 30 days, and writes an auth-state JSON file with token and user metadata. Commands expose login, status, token retrieval (written to a secure temp file), wallet generation, and balance checks.

When to use it

  • Enable wallet-based access to Trifle-protected APIs or games
  • Provide a reusable JWT for other local skills needing Trifle auth
  • Automate periodic re-authentication or token refresh for long-running agents
  • Securely generate and store a Trifle-specific EVM wallet

Best practices

  • Keep TRIFLE_PRIVATE_KEY in a secure environment or use 1Password integration
  • Limit file-based key fallback to user-only permissions (mode 600) and avoid printing private keys
  • Use the provided token command to write tokens to a secure temp file rather than stdout
  • Rotate wallets or private keys if you suspect compromise and regenerate auth tokens
  • Set TRIFLE_AUTH_STATE to customize XDG state path for CI or multi-user setups

Example use cases

  • Authenticate a bot that plays the snake game and needs JWT access to vote or act
  • Scripts that need to read the user’s ball balance and act on economy rules
  • Agents that aggregate user activity across platforms and credit auth bonuses
  • Local CI tasks that require Trifle API access without interactive login

FAQ

By default the token and session metadata are stored in ~/.local/state/trifle-auth/auth-state.json. Override the path with TRIFLE_AUTH_STATE.

How does private key storage work?

Priority order: TRIFLE_PRIVATE_KEY env var, 1Password item (op://Gigi/EVM Wallet - Gigi/private_key), then a restricted file at ~/.trifle-wallet.key created with mode 600 as a fallback.

How long is the token valid?

JWTs issued by the Trifle API are valid for 30 days; re-run login when expired.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational