agentsclimarketplace

Pharos defi play

Skill 0xLucas0x/pharos-agent-action-kit/pharos-defi-play

Composed multi-step DeFi "plays" for AI agents on the Pharos blockchain — turns the raw primitives of the official pharos-skill-engine plus the pharos-approvals skill into safe, end-to-end sequences. Invoke when the user wants to do a multi-step on-chain action that needs an approval first: "approve then deposit", "stake my tokens", "approve then call <method>", or the worked vault deposit/withdraw demo on Pharos ("pharos", "PHRS", "atlantic-testnet"). Each step is pre-flighted before broadcast and the next step is simulated against the previous step's result, so a play aborts cleanly instead of stranding the user mid-sequence.From its SKILL.md

Install
npx -y skills add 0xLucas0x/pharos-agent-action-kit --skill pharos-defi-play

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

3.3 KB, 659 tokens by cl100k_base, as published. Nobody here has run it

Pharos DeFi Play

Composed, multi-step on-chain plays for Pharos agents. A "play" is a guarded sequence of primitives — the canonical one being approve → call, the building block of every swap / stake / deposit. This skill sequences those steps safely (preflight each, abort on revert) and ships one worked vault deposit/withdraw play with a self-contained MockVault demo target.

Builds on:

  • the official pharos-skill-engine (deploy, write, query), and
  • pharos-approvals (the approval lifecycle + the preflight convention).

Prerequisites

  1. Foundry (cast + forge) installed (which cast; install per the pharos-approvals SKILL.md if missing).
  2. Private key via --private-key $PRIVATE_KEY for the write steps.
  3. The pharos-approvals skill available — this skill reuses its approve and preflight references rather than redefining them.

Network Configuration

Same as the rest of the suite: read assets/networks.json, default atlantic-testnet, fill rpcUrl into --rpc-url. Mainnet requires an explicit warning.

RPC_URL=$(jq -r '.networks[] | select(.name=="atlantic-testnet") | .rpcUrl' assets/networks.json)

Capability Index

User NeedCapabilityDetailed Instructions
Approve then call any contract method (deposit/stake/...)guarded approve-then-call sequencereferences/play.md#approve-then-call-generic
Deposit a token into a vault and confirm sharesworked vault playreferences/play.md#vault-deposit-worked-play
Withdraw a token from the vaultworked vault playreferences/play.md#vault-withdraw
Deploy the demo MockVault targetforge create / forge scriptreferences/play.md#deploy-the-mockvault-demo-target

Security Reminders

  • Approve the exact amount the play needs. Do not default to unlimited approvals just because a play follows the approval — scope the allowance to the deposit/stake amount.
  • Preflight every step, and preflight step N+1 against the state produced by step N. If any preflight reverts, STOP and report — do not leave the user approved but un-deposited.
  • Confirm the network before writes; warn + re-confirm on mainnet. Never log keys.

Write Operation Pre-checks

Identical to pharos-approvals (SKILL.md): private-key check → derive + confirm sender → confirm network → preflight. Run them once before starting a play; re-derive the sender address only, not re-confirm, between steps of the same play.

What ships with it: 3 files

9.9 KB alongside SKILL.md

references/

Keep looking

Skills are one crate of 326,286. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.