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
Most recently taken up by
- kortix-ai/sunatheir own version, first seen Nov 8, 2026
- kortix-ai/CompanyOStheir own version, first seen Nov 8, 2026
- NVIDIA-NeMo/RLtheir own version, first seen Nov 1, 2026
- ZaxbyHub/opencode-swarmtheir own version, first seen Oct 30, 2026
- manastalukdar/ai-devstudiotheir own version, first seen Oct 13, 2026
- butterbase-ai/butterbase-plugintheir own version, first seen Oct 8, 2026
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.
SentrySkille2e
Run E2E tests for Sentry JavaScript SDK test applications
Also in 3 projects that use this
MicrosoftSkillworktree
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
NVIDIASkilltesting
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
Other versions20 projects use a version of this.
Word for word · 1
- x402-foundation/x402★ 6.8k100% same
Edited · 0
None found.
Wrote their own version · 19
- kortix-ai/suna★ 21ksame name
- kortix-ai/CompanyOS★ 21ksame name
- Blaizzy/mlx-vlm★ 5.8ksame name
- cloudflare/cloudflare-docs★ 5.4ksame name
- crmne/ruby_llm★ 4.5ksame name
- GoogleCloudPlatform/cloud-foundation-fabric★ 2.1ksame name
- NVIDIA-NeMo/RL★ 2.1ksame name
- Dpro-at/Tel-Agent★ 1.1ksame name
- butterbase-ai/butterbase-plugin★ 535same name
- butterbase-ai/butterbase-skills★ 535same name
9 more not listed
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 repository2 other files it gives its agents.
- docs/AGENTS.mdAGENTS.md
- authoring-specsSkill
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
- Very specific: line 10
Before writing anything, check in order whether the standard library (TS: ECMAScript and Node.js built-ins like node:crypto.
- Distinctive: line 11
Always reuse shared and core utilities.
- Distinctive: line 12
No new dependencies if it can be avoided.
- Distinctive: line 18
No abstractions or boilerplate that were not explicitly requested.
- Very specific: line 19
No edits to legacy/v1 code.
- Distinctive: line 23
Write clean, readable code (e.g.
- Distinctive: line 25
No overly defensive code or silent fallbacks.
- Distinctive: line 30
Write comments that help a new reader understand the codebase.
- Distinctive: line 31
Never narrate in-progress work or describe code being replaced.
- Distinctive: line 32
Write onchain - never "on-chain" or "on chain".
- Distinctive: line 33
Don't change/remove existing comments, unless strictly needed due to code changes.
- Distinctive: line 37
Follow the repository AI-assisted contribution policy in CONTRIBUTING.md.
- Distinctive: line 42
When in doubt, ask clarifying questions on the Issue before writing code.
- Distinctive: line 46
Add a test that fails before the fix and passes after it.
- Distinctive: line 47
Don't write tests for what the type system already guarantees.
- Distinctive: line 75
Add a changelog fragment for the SDK you changed.
“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.
Files
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 likenet/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/legacyand thejava/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 pytestPer 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.mdNew mechanism or extension
- New payment mechanism / scheme: see references/new-mechanism.md.
- New extension: see references/new-extension.md.
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.

