add-venue
Skill2 starsChanged 2 days agoMITView on GitHub
Adds a trading venue as a plugin under plugins/, from its API client to the contract suites, fork tests and wiring in the composition root. Use when binference should quote or trade through a new DEX, aggregator or launchpad.
- Installs packages
1 other project uses a version of this.
Adopted by
Most recently taken up by
- emeryberger/CSrankingstheir own version, first seen Nov 9, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- emeryberger/CSrankings★ 3.2ksame name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository26 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- add-chainSkill
- add-mcp-toolSkill
- add-migrationSkill
- add-protocol-operationSkill
- clean-diffSkill
- debug-failureSkill
- handle-security-reportSkill
- releaseSkill
- review-diffSkill
- review-money-pathSkill
- review-testsSkill
- run-testsSkill
- shape-commitSkill
- speed-up-testsSkill
- test-telegramSkill
- tune-ciSkill
- vet-releaseSkill
- write-adrSkill
- binference-toolsSkill
- copy-tradingSkill
- dca-planSkill
- meme-huntingSkill
- safe-swapSkill
- token-due-diligenceSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
The client: Use the venue's official SDK at its latest release when one fits.
- Distinctive: line 17
The docs: Every endpoint, header, limit and error code comes from the venue's own docs.
- Very specific: line 19
The contracts: Every router, spender and executor the venue's calls touch goes into the registry first (add-chain), read on chain.
- Very specific: line 35
Add its dependencies with pnpm add <dep> --filter @binference/<venue>: a dependency is the latest release at least 7 days old, and its pull …
- Distinctive: line 41
Keep the folders that the existing venues use:
- Very specific: line 92
Add the plugin to packages/cli/package.json and create it in packages/cli/src/compose/read-venues.ts.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Add a venue
A venue is a plugin behind the venue port: it quotes, builds the calls of a trade and decodes them back. It never signs, never sends and never decides. The engine's venue host checks everything it builds against the registry and the confirmed terms.
1. Before code
- The client. Use the venue's official SDK at its latest release when one fits. When it does
not (it calls
fetchwithout a timeout, pulls in a second viem, misses errors), write a thin client and record why withwrite-adr, as decision 0105 does. - The docs. Every endpoint, header, limit and error code comes from the venue's own docs. List each error the docs name; the client maps every one.
- The contracts. Every router, spender and executor the venue's calls touch goes into the
registry first (
add-chain), read on chain. - The name. The venue's id is kebab-case and is the plugin's folder name. A new term goes into
docs/GLOSSARY.mdfirst.
2. The plugin's shell
Make plugins/<venue>/ with the files every plugin has; copy their shape from
plugins/kyberswap/:
package.json(@binference/<venue>, private, the@binference/sourceexport condition, a./testingexport),tsconfig.json;AGENTS.mdwith the venue's rules,CLAUDE.mdholding the one line@AGENTS.md, andREADME.md;src/index.tsexporting the factory,src/testing.tsexporting the recorded fixtures.
Add its dependencies with pnpm add <dep> --filter @binference/<venue>: a dependency is the
latest release at least 7 days old, and its pull request says why a Node built-in does not do the
job. Run pnpm check:package-graph --write.
3. The code
Keep the folders that the existing venues use:
src/api/: the one folder that talks to the venue's API, through theHttpport with a signal and a timeout. Every answer passes a zod schema in a*.schema.tsfile and leaves the folder as the plugin's own types. A key is aSecret, never in a URL or a log.src/routes/: the quote. It refuses a route that trades other tokens or another amount, that takes a fee, or that passes a pool hook off the chain's allowlist.src/router/: the build and the decoder. The build carries the host's recipient, deadline and minimum out. A venue whose trade call takes no deadline, such as a launchpad's curve, declaresnoDeadlineon that chain (decision 0180), and its decoder leaves the deadline out. The decoder reads every term the host checks from the calldata; a call in any other shape isunknown_call, never a guess.- A launchpad uses
defineLaunchpadinstead and addssrc/curve/: the curve read from its own contracts, which passescurveReaderContract. A tax its contract takes on the curve goes in the quote'staxBps(decision 0181). A contract each launch makes, such as a token's own curve, is declared by name inlaunchContracts, and the curve read names its address for a token it holds, found through the launchpad's registry contracts (decision 0212). No ceiling lists it. A tax that falls in a launch's first seconds is the quote'ssnipeTaxBps, a part of itstaxBps(decision 0213), and the wallets a launch favors come frominsiders, whose test runsinsiderReaderContract. src/<venue>-venue.ts:defineVenuewith the id and, per chain, the registry contract names, the calls the venue makes (contract and ABI) and the spenders it approves. The Privy ceiling allows only declared calls and spenders, so declare exactly what the venue calls.- A venue that holds the state a token's price comes from declares its price reads:
priceReadanswers the read calls that price a token (a pool's state, a curve's reserves or price), at most four, and a purepricestep over their answers that answersunpriced, orreplanwhen the read no longer holds, never a throw. The price watcher asks every watched token's calls in one Multicall3 call each block, so the calls take no block of their own. A launchpad prices the tokens on its curve; an aggregator that owns no pools declares none, and the chain family's pool reads price its tokens (decision 0192). The venue's test runspriceReaderContract. - Errors are
BinferenceErrorwith codes under the venue's id (<venue>.bad_options).
4. Tests
- Unit tests on answers recorded from the live API, saved in
src/testing/with the day they were recorded. No network. - The venue's own test runs the plugin SDK's contract suites (
quoterContract,txBuilderContract,txDecoderContractfrom@binference/plugin-sdk/testing). src/fork/<venue>-swap.test.tsbuys and sells through the live API on the pinned BSC fork, and checks the wallet's balances after each trade. A venue that needs a key reads it fromBINFERENCE_<VENUE>_*variables in its fork test alone and runs withdescribe.runIfwhen they are set, as the okx plugin does.packages/cli/src/compose/<venue>-venue.test.tsruns the venue through the venue host's checks.
pnpm vitest run plugins/<venue> packages/cli/src/compose/<venue>-venue.test.ts --maxWorkers=2
pnpm test:fork plugins/<venue>/src/fork5. Wire it
- Add the plugin to
packages/cli/package.jsonand create it inpackages/cli/src/compose/read-venues.ts. A venue that needs a key is created only when the owner setvenues.keys.<venue>. - A core venue joins
coreVenuesinpackages/cli/src/init/ceiling-request.ts, so a new install's ceiling holds its calls. - A new config key gets a
.describe()text; runpnpm check:config-schema --write. - Words a person reads (the venue's name in a card, its refusals) are messages in English and Chinese.
- The release notes label the venue
experimentaluntil it has run on the fork suite and with real trades.
chains and the venue host are money-path code: run review-money-path when either changes.
6. Report
The venue, its client choice (SDK or ADR), the contracts it declares, the recorded answers' date, the fork run and the commands you ran.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

