CodeSampleX
同じコードを二度解くのは、もう終わり。
コーディングアシスタントは毎日、同じ公開ライブラリの問題をゼロから解き直しています。ドキュメントを読み、API を推測し、インストールし、コンパイルに失敗し、バージョン差を推測して直し、成功し — そしてセッションが終わればすべて忘れます。CodeSampleX は覚えています。実際の開発環境で何が本当に動き、何が壊れたかを匿名の証拠として集め、検証済みの答えと自分の環境との差分をアシスタントに渡します。
irm https://codesamplex.dev/install.ps1 | iexcurl -fsSL https://codesamplex.dev/install.sh | shコマンド1行、質問は1つだけ。あとはすべて自動です。
- すでに動いた答えクリーンなサンドボックスで contract により検証された最小サンプルです。動くはずという断片ではありません。
- 自分の環境で採点自分のバージョン・ランタイム・実行コンテキスト(Node、ブラウザ、WebView、Electron、ワーカー)に対して結果を格付けします。
- 失敗に正直どこで壊れ、どれだけ頻繁かを示し、原因は確率として提示します。作り話の確信は述べません。
お使いのコーディングエージェントで動きます
- Claude Code
- Codex
- Gemini CLI
- OpenCode
csx init が自動で検出し、MCP サーバーを登録します。設定ファイルを編集する必要はありません。
Any other MCP client works too — Cursor, Windsurf, Cline, Zed, VS Code. csx is a standard stdio MCP server. Run this and paste what it prints; it fills in the absolute path of your install, which a client started by your editor will not find on its own:
csx mcp-configモデルを選びません。同じ互換性エビデンスを Claude、GPT と Codex、Gemini、Llama など MCP ツールを呼べるすべてのモデルが利用できます。
ネットワークの状態
ドキュメントの記述と、契約が実測した結果
各行は、固定コンテナ内でネットワークを切って契約を実行した公開サンプルによる実測です。クリックすると中身を読めます。
-
npm zod 4.4.3, Node 22
信じられていること z.coerce.number() parses a numeric string, rejecting what is not a number.
測定結果 it is Number(input) followed by the number check, not a numeric parser, so "", " ", null, false and [] are all accepted and arrive as 0 — an empty form field or a null column silently becomes zero — while "1e999" is rejected, because Number() overflows it to Infinity.
-
npm bcryptjs 3.0.3, Node 22
信じられていること a password hash covers the whole password.
測定結果 bcrypt truncates at 72 bytes and neither hashSync nor compareSync reports it: a second, different password sharing the first one's 72-byte prefix verifies against that hash, and so does the bare prefix, while 71 bytes does not; the limit is bytes, so 36 accented characters survive and 37 lose their tail, and bcryptjs's own truncates() is a separate call you have to make yourself.
-
npm jose 6.2.8, Node 22
信じられていること RFC 7518 §3.2 says a key “of the same size as the hash output (for instance, 256 bits for HS256) or larger MUST be used with this algorithm”, and jose implements that specification, so a five-byte HMAC secret is expected to be refused somewhere in the stack.
測定結果 jose signs and verifies an HS256 token with a five-byte key and reports nothing, and WebCrypto underneath imports the same 40-bit HMAC key just as willingly, so nothing below the library catches a weak secret either.
ユーザーが増える 実環境が増える 互換性エビデンスが良くなる 答えが良くなる · 2026-08-16T11:05:38Z
動作の流れ
axios 1.12 + Node 22 + pnpm + Windows 11 で axios.post は本当に動くのか。動かないならどの段階で壊れるのか。 公式ドキュメントには答えられません。無数の実環境からの証拠なら答えられます。
- csx 経由でビルドやテストを実行します — コーディングエージェントが代行しても構いません。
- どの公開パッケージ・バージョン・API シンボルが関わり、どの段階が成功/失敗したかを手元で解析します。
- エラーはローカルで fingerprint に整えられます。パス、プロジェクト名、秘密情報、生ログは決して外に出ません。
- 匿名の Evidence バッチが、いま見ている公開互換性マップを作ります。
- エージェントはまず CodeSampleX に尋ね、最も近い検証済みサンプルと自分の環境との差分を受け取ります。
コーディングエージェントは MCP から直接利用します。公開ライブラリのコードを書く前に CodeSampleX に尋ね、その答えでビルドが通ったかを報告します。
いま観測できること
- npm npm, pnpm, yarn PROBABLE パッケージとバージョンビルド・型チェック・テスト結果どの API を使ったかcontract で検証済みのサンプル
- pypi pip, uv PROBABLE パッケージとバージョンビルド・型チェック・テスト結果どの API を使ったかcontract で検証済みのサンプル
- golang go PROBABLE パッケージとバージョンビルド・型チェック・テスト結果どの API を使ったかcontract で検証済みのサンプル
- cargo cargo PROBABLE パッケージとバージョンビルド・型チェック・テスト結果どの API を使ったかcontract で検証済みのサンプル
- composer composer UNKNOWN contract で検証済みのサンプルパッケージとバージョンビルド・型チェック・テスト結果どの API を使ったか
- gem bundler UNKNOWN contract で検証済みのサンプルパッケージとバージョンビルド・型チェック・テスト結果どの API を使ったか
- pub pub UNKNOWN contract で検証済みのサンプルパッケージとバージョンビルド・型チェック・テスト結果どの API を使ったか
- hex mix UNKNOWN contract で検証済みのサンプルパッケージとバージョンビルド・型チェック・テスト結果どの API を使ったか
インストール時の約束
得られるもの
- 公開互換性ナレッジ
- 検証済みコード回答
- ローカルエージェント連携
- 公開サンプルキャッシュ
提供するもの
- 公開パッケージ/バージョンの使用状況
- 検出可能な公開API/シンボルの使用状況
- ビルド/型チェック/テスト結果
- サニタイズ済み失敗フィンガープリント
自動では共有されないもの
- ソースコード
- リポジトリ/プロジェクト名
- ファイル名やパス
- ソースの断片
- シークレットや環境変数
- 非公開パッケージ
- 生のコンパイラ/ランタイムログ