Skip to content

Add perp-dex-costs skill: pre-trade cost and funding check for perp DEXs 🤖🤖🤖 - #6458

Closed
dineroenlamesa wants to merge 3 commits into
github:mainfrom
dineroenlamesa:main
Closed

dineroenlamesa wants to merge 3 commits into
github:mainfrom
dineroenlamesa:main

Conversation

@dineroenlamesa

Copy link
Copy Markdown

Pull Request Checklist

  • I have read and followed the CONTRIBUTING.md guidelines.
  • I have read and followed the Guidance for submissions involving paid services.
  • My contribution adds a new instruction, prompt, agent, skill, workflow, or canvas extension file in the correct directory.
  • The file follows the required naming convention.
  • The content is clearly structured and follows the example format.
  • I have tested my instructions, prompt, agent, skill, workflow, or canvas extension with GitHub Copilot.
  • I have run npm start and verified that README.md is up to date.
  • I am targeting the main branch for this pull request.

Description

Adds skills/perp-dex-costs/SKILL.md (a single file, no bundled scripts). Before a perpetual futures trade, Copilot calls a read-only HTTP API to find which perp DEX is cheapest right now for the order size (taker fees on both legs + slippage walked on the live order book), compare funding and order book depth across 25+ venues, and find the best delta-neutral funding pair net of opening and closing both legs. docs/README.skills.md is updated with npm run build.

Why it is not something the model already does

The answer depends on live order books and current funding, which a model cannot know. The skill tells Copilot which endpoint answers which question, what to ask the user for, how to report the reading time, and to report errors instead of estimating from memory.

Validation

  • npm run skill:validate: all 464 skills valid, including this one.
  • npm run build: only docs/README.skills.md changes (one row).
  • Documented calls run on 2026-11-16 13:01 UTC: best_venue?pair=BTC&size_usd=25000 returned Lighter, 1.22 USD (0.49 bps) for the round trip, runners-up Variational 2.50 USD and Extended 13.67 USD, with the book time; delta_neutral?pair=ETH&size_usd_per_leg=10000&days=7 returned long Grvt / short ApeX, 145.68 USD net after entry and exit costs.

Requirements and limits

No account and no API key. Read-only GET requests; the skill never places orders, signs or pays. Four endpoints are paid per call (USDC on Base, x402); without payment they return HTTP 402 with their price, and the skill tells Copilot to report that and stop.

Affiliation

I publish this on behalf of Dinero en la Mesa, which operates the API. Venue results include account-opening referral links of ours; they never change the ranking, which is by cost only, and the skill presents them as optional.


Type of Contribution

  • New instruction file.
  • New prompt file.
  • New agent file.
  • New plugin.
  • New skill file.
  • New agentic workflow.
  • New canvas extension.
  • Update to existing instruction, prompt, agent, plugin, skill, workflow, or canvas extension.
  • Other (please specify):

Additional Notes

Not yet tested inside GitHub Copilot itself (box left unticked): the documented API calls were run directly and their results are above. Happy to adjust scope, wording or format.


By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.

@dineroenlamesa
dineroenlamesa requested review from a team as code owners November 16, 2026 13:08
Copilot AI adaptive review requested due to automatic review settings November 16, 2026 13:08
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

🚦 Submission status: ⏳ Awaiting automation

Risk tier: merge-risk:medium — New or substantially changed resource without privileged execution
Required to merge: passing submission-gate checks plus 1 approval from reviewers with write access.

Why this tier
  • Adds 1 file(s), e.g. skills/perp-dex-costs/SKILL.md
  • Changes 104 lines (low-risk limit is 40)

Automated checks

Check Status Details
Line endings 🔧 Infrastructure failure Waiting for a maintainer to approve workflow runs for this PR · logs
Spelling 🔧 Infrastructure failure Waiting for a maintainer to approve workflow runs for this PR · logs
Generated README consistency 🔧 Infrastructure failure Waiting for a maintainer to approve workflow runs for this PR · logs
Skill validation 🔧 Infrastructure failure Waiting for a maintainer to approve workflow runs for this PR · logs
Skill lint (vally) 🔧 Infrastructure failure Waiting for a maintainer to approve workflow runs for this PR · logs
Risk scan 🔧 Infrastructure failure Waiting for a maintainer to approve workflow runs for this PR · logs
Contributor reputation 🔧 Infrastructure failure The check did not report a result for this commit
Duplicate resource scan ⚠️ Failed (advisory, non-blocking) Waiting for a maintainer to approve workflow runs for this PR · logs
PR quality signal ⚠️ Failed (advisory, non-blocking) Waiting for a maintainer to approve workflow runs for this PR · logs

Action needed

  • 🔧 Line endings, Spelling, Generated README consistency, Skill validation, Skill lint (vally), Risk scan, Contributor reputation hit an automation problem that is not caused by your contribution. Comment /rerun-checks to retry; maintainers are notified if it keeps failing.
  • ⚠️ Advisory checks did not complete (Duplicate resource scan, PR quality signal). This does not block the PR.

Review

  • Approvals: 0/1
  • Assigned reviewer: not assigned yet — comment /request-review to ask for one
  • Review target date: not set
  • Still needed: 1 more approval(s)
  • No staffed reviewer pool owns these files yet; any reviewer with write access counts as the domain reviewer.

Commands

Command Who What it does
/rerun-checks PR author, maintainers Re-runs failed or incomplete checks and re-evaluates this gate
/request-review PR author, maintainers Asks the review rotation to assign a reviewer (adds needs-reviewer)

Updated for 0092f23 · gate run · This comment is maintained automatically — see submission gate docs.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The skill unconditionally asks for order size even for funding-rate and airdrop endpoints that do not require it; input collection should depend on the selected endpoint.

1 open issue
What changed in this PR

Adds a skill to the Copilot resource catalog for checking perpetual DEX trading costs, funding rates, and order-book depth through a read-only API.

Changes:

  • Documents endpoint selection, required inputs, examples, and result reporting.
  • Defines payment restrictions, data limitations, and referral disclosures.
  • Adds the skill to the generated catalog.
File Description
skills/​perp-dex-costs/​SKILL.md Defines the pre-trade analysis workflow and API usage safeguards.
docs/​README.skills.md Adds the skill’s description and installation command.

Review effort: Balanced (dynamic)

Comment thread skills/perp-dex-costs/SKILL.md Resolved
@dineroenlamesa dineroenlamesa changed the title Add perp-dex-costs skill: pre-trade cost and funding check for perp DEXs Add perp-dex-costs skill: pre-trade cost and funding check for perp DEXs 🤖🤖🤖 Nov 16, 2026
Copilot AI adaptive review requested due to automatic review settings November 16, 2026 15:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The leveraged-trading recommendations depend on third-party financial assumptions and live-data handling that require domain and service validation beyond repository review and direct API calls.

No open issues 🎉

1 resolved since last review

Review effort: Balanced (dynamic)

@aaronpowell

Copy link
Copy Markdown
Contributor

Thanks for contributing. This skill is built around the Dinero en la Mesa service you operate: it directs users to your endpoint, includes paid x402 calls and MCP setup, asks the API to count calls from Copilot, and returns your venue referral links. The upstream agent-kit README describes the same free-tools-to-Pro offering and referral path; its license also distinguishes MIT-licensed code from data governed by your service terms. Because the skill routes Copilot users into that commercial service and referral funnel, it is not suitable for this collection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants