Skip to content

About

Crossly API rules for every AI coding agent: AGENTS.md plus Cursor, Copilot, Windsurf, Cline, Gemini CLI, Zed and Aider rules for building on the Crossly crosslisting and reselling API. One source, CI-checked.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

Crossly AI rules

ci release license

Rules that keep AI coding agents from making the classic mistakes when they write code against the Crossly API: a personal access token shipped in a React bundle, a webhook verified against JSON.stringify(req.body), dollars added up as floats, a list that stops after page one, a 429 retried in a tight loop.

One source, src/rules.md, generated into every agent's native format. CI fails if a generated file drifts from the source, and checks every endpoint the rules mention against the live OpenAPI specs.

What the rules cover

  • Credentials per surface: seller vs buyer API; crossly_pat_… and OAuth tokens server-side only; crossly_pk_… publishable keys are the only Crossly credential allowed in frontend code; least-privilege scopes; OAuth with PKCE.
  • Money: …Cents fields are integer cents, listing and order amounts are dollars, never float arithmetic.
  • Webhooks: verify Crossly-Signature against the raw body, constant-time, 300 s tolerance, dedupe on the event id.
  • Pagination: page / limit (max 100), { data, pagination }, stop when data.length < limit.
  • Errors: the { error: { code, message, details }, correlationId } envelope, 401 vs 403, what never to retry.
  • Rate limits: quotas per plan, Retry-After, Idempotency-Key on retried writes.
  • Crossposting is asynchronous: poll platformListings.

Install

Clone this repository (or download the release zip), then from your project's root:

/path/to/crossly-ai-rules/install.sh cursor          # one agent
/path/to/crossly-ai-rules/install.sh all             # every agent
/path/to/crossly-ai-rules/install.sh                 # auto-detect (.cursor/, .github/, ...), else AGENTS.md

It never overwrites a file you already have unless you pass --force; merge by hand instead.

Agent File Notes
OpenAI Codex, OpenCode, Jules, Amp, … AGENTS.md The cross-agent standard; also read by Cursor, Zed and the Copilot coding agent
Cursor .cursor/rules/crossly.mdc alwaysApply: true
GitHub Copilot .github/copilot-instructions.md Repository custom instructions
Windsurf .windsurf/rules/crossly.md trigger: always_on; kept under Windsurf's 12,000-character limit
Cline .clinerules/crossly.md
Roo Code .roo/rules/crossly.md
Gemini CLI GEMINI.md
Zed .rules Zed reads the first rules file it finds, and .rules comes first
Aider CONVENTIONS.md Load with aider --read CONVENTIONS.md or read: CONVENTIONS.md in .aider.conf.yml
JetBrains Junie .junie/guidelines.md

Claude Code reads AGENTS.md too, but the richer option is the plugin with task skills and the MCP server: /plugin marketplace add crossly-dev/crossly-skills (crossly-dev/crossly-skills).

Contributing

Edit src/rules.md, never a generated file, then:

node scripts/build.mjs                 # regenerate every agent's file
node scripts/build.mjs --check         # what CI runs
node scripts/check-endpoints.mjs       # every /v1 path in the rules exists in the live specs

Every statement must come from the OpenAPI specs (https://crossly.net/openapi/seller.json, https://crossly.net/openapi/buyer.json), the SDK sources or https://crossly.net/docs. If it can't be confirmed, leave it out.

Links

License

MIT

About

Crossly API rules for every AI coding agent: AGENTS.md plus Cursor, Copilot, Windsurf, Cline, Gemini CLI, Zed and Aider rules for building on the Crossly crosslisting and reselling API. One source, CI-checked.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages