agentleFS
coinbasecoinbase/x402/.agents/skills/contributing/SKILL.md

contributing

Skill168 starsChanged 28 days agoApache-2.0View on GitHub

Guidelines and conventions for contributing to the x402 codebase. Use when preparing a PR to the upstream x402-foundation/x402 repository such as fixing a bug or Issue, implementing a new feature, adding a mechanism/scheme or extension.

20 other projects use a version of this; 1 new project in the last 4 weeks, against 0 the 4 before.

Adopted by

Surging: 1 new project took it in the last 4 weeks, none the 4 weeks before.thin data

Week of Sep 13: 0 new projectsWeek of Sep 20: 0 new projectsWeek of Sep 27: 0 new projectsWeek of Oct 4: 0 new projectsWeek of Oct 11: 1 new projectWeek of Oct 18: 0 new projectsWeek of Oct 25: 0 new projectsWeek of Nov 1: 0 new projects
Sep 2026Oct 2026Nov 2026
New projects taking a version of this file each week, over the 8 weeks our latest run read: only 1 in all, so this is a hint, not a trend.

Most recently taken up by

Used with

Projects with it also use e2e, worktree and 1 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • SentrySkill

    e2e

    Run E2E tests for Sentry JavaScript SDK test applications

    Also in 3 projects that use this

  • MicrosoftSkill

    worktree

    Create, reuse or clean up a dedicated git worktree for working on a pull request or a private branch. Use from any PR-scoped workflow that needs an isolated checkout to keep current code and build output untouched.

    Also in 3 projects that use this

  • NVIDIASkill

    testing

    Run Python and Rust tests for physicsnemo-curator using uv + pytest with coverage reporting via pytest-cov, and cargo-nextest for Rust tests. Includes benchmark workflows with pytest-benchmark and criterion.

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

16 rules. 0 are common, 14 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 19 edited versions we read keep these.

  • 14

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Before writing anything, check in order whether the standard library (TS: ECMAScript and Node.js built-ins like node:crypto.

    line 10
  2. Distinctive:

    Always reuse shared and core utilities.

    line 11
  3. Distinctive:

    No new dependencies if it can be avoided.

    line 12
  4. Distinctive:

    No abstractions or boilerplate that were not explicitly requested.

    line 18
  5. Very specific:

    No edits to legacy/v1 code.

    line 19
  6. Distinctive:

    Write clean, readable code (e.g.

    line 23
  7. Distinctive:

    No overly defensive code or silent fallbacks.

    line 25
  8. Distinctive:

    Write comments that help a new reader understand the codebase.

    line 30
  9. Distinctive:

    Never narrate in-progress work or describe code being replaced.

    line 31
  10. Distinctive:

    Write onchain - never "on-chain" or "on chain".

    line 32
  11. Distinctive:

    Don't change/remove existing comments, unless strictly needed due to code changes.

    line 33
  12. Distinctive:

    Follow the repository AI-assisted contribution policy in CONTRIBUTING.md.

    line 37
  13. Distinctive:

    When in doubt, ask clarifying questions on the Issue before writing code.

    line 42
  14. Distinctive:

    Add a test that fails before the fix and passes after it.

    line 46
  15. Distinctive:

    Don't write tests for what the type system already guarantees.

    line 47
  16. Distinctive:

    Add a changelog fragment for the SDK you changed.

    line 75

“Common” is measured: kept by at least 6 in 10 of the 19 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Contributing to x402

Reuse before writing new code

  • Before writing anything, check in order whether the standard library (TS: ECMAScript and Node.js built-ins like node:crypto; Python: the stdlib; Go: packages like net/http, encoding/json, crypto), a native platform feature, or an already-installed dependency already does it; if so, use it.
  • Always reuse shared and core utilities.
  • No new dependencies if it can be avoided.

Keep changes minimal

  • Address a single issue per contribution, not multiple.
  • Targeted edits, minimal diff, atomic commits.
  • No abstractions or boilerplate that were not explicitly requested.
  • No edits to legacy/v1 code; it is effectively frozen (security patches only). This includes the paths typescript/packages/legacy/, go/legacy, python/legacy and the java/ SDK.

Code style

  • Write clean, readable code (e.g. prefer guard clauses over nested conditionals, use descriptive names and small, single-purpose functions).
  • Strong typing, avoid any weak types (any, unknown, and their equivalents in other languages). Research the codebase to find the correct type, reuse existing type definitions rather than redeclaring them and confirm no type errors remain.
  • No overly defensive code or silent fallbacks.
  • Apply DRY only where it reduces complexity; keep single-use logic inline rather than extracting a helper for it.

Comments

  • Write comments that help a new reader understand the codebase.
  • Never narrate in-progress work or describe code being replaced.
  • Write onchain - never "on-chain" or "on chain".
  • Don't change/remove existing comments, unless strictly needed due to code changes.

AI-assisted contributions

Follow the repository AI-assisted contribution policy in CONTRIBUTING.md. Review all AI-generated output before requesting maintainer review.

Working on an Issue

  • Independently reproduce and verify the Issue first.
  • When in doubt, ask clarifying questions on the Issue before writing code.

Bug fixes

  • Add a test that fails before the fix and passes after it.
  • Don't write tests for what the type system already guarantees.
  • Cover edge cases, not only happy path.

Commits and PRs

  • Verifying (signing) ALL commits is strictly required; maintainers will not check a PR otherwise. See GitHub: about commit signature verification.
  • PR description: short and matching the diff; explain what and why; link relevant issues; state the root cause in one paragraph, citing file and line.
  • Justify design decisions where there were ambiguities and discuss the tradeoffs of the approach you picked against the alternatives you considered.

Per-language

Per commit: format, lint, build, test

Format, lint, build, and run unit tests before each commit.

# TypeScript (from typescript/)
pnpm format && pnpm lint && pnpm build && pnpm test

# Go (from go/)
make fmt && make lint && make build && make test

# Python (from python/x402/)
uvx ruff format && uvx ruff check && uv run pytest

Per PR: changelog

Add a changelog fragment for the SDK you changed.

# TypeScript (from typescript/)
pnpm changeset

# Go (from go/)
make changelog-new

# Python (from python/x402/)
uv run towncrier create --content "Fixed ..." <PR>.bugfix.md

New mechanism or extension

  • New payment mechanism / scheme: see references/new-mechanism.md.
  • New extension: see references/new-extension.md.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.