x402: Skill for Claude Code

.agents/skills/contributing/SKILL.md

contributing is a skill for Claude Code, Codex from coinbase/x402. It costs 52 tokens per session (874 once invoked), scanned A, original, from a forked repository, Apache-2.0.

Contribution guidelines for the x402 codebase. They describe how to prepare changes such as bug fixes, features, payment mechanisms, and extensions while following the project's code and commit practices.

In plain words
What is it for?
Use them when preparing a pull request for the x402 project or implementing a new mechanism, scheme, or extension.
Why use it?
They reduce unnecessary dependencies and broad changes, and help contributors avoid modifying frozen legacy code or duplicating existing utilities.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is coinbase/x402's own configuration. It tells Claude Code and Codex how to work on x402 itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything x402 configures →

Reuse

Borrowing it

Nothing to install: this file belongs to coinbase/x402. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/coinbase/x402/main/.agents/skills/contributing/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/coinbase/x402

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for contributing

README.md
[![agentmods](https://agentmods.dev/badge/skills/coinbase/x402/contributing/github.svg)](https://agentmods.dev/skills/coinbase/x402/contributing)
Your own site
<a href="https://agentmods.dev/skills/coinbase/x402/contributing"><img src="https://agentmods.dev/badge/skills/coinbase/x402/contributing/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for contributing

Your own site · 80×15
<a href="https://agentmods.dev/skills/coinbase/x402/contributing"><img src="https://agentmods.dev/badge/skills/coinbase/x402/contributing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 874 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin fork From a forked repository.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00052 $0.00874
Opus 5.5 $0.00021 $0.00350
Sonnet 5.5 $0.00010 $0.00175
Haiku 4.5 $0.00005 $0.00087

Measured 2d ago against content hash 16e6d643c986, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

contributing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/contributing/SKILL.md · 92 lines

How it starts

The opening of the file, as written. The whole thing — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

Read the full file on GitHub · 92 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 92 lines · 52 tokens per session scan A 16e6d643c986

Subscribe to this mod's changes

contributing is a skill published in the GitHub repository coinbase/x402 (168 stars, last pushed 2d ago), licensed Apache-2.0. It adds 52 tokens to every session and 874 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. It comes from a forked repository.

Related

Other skills, from other repositories