agentleFS
ClickHouseClickHouse/clickhouse-js/skills/clickhouse-js-node-rowbinary/AGENTS.md

clickhouse-js / clickhouse-js-node-rowbinary

AGENTS.md331 starsChanged 33 days agoApache-2.0View on GitHub

Guidance for the clickhouse-js-node-rowbinary package (the RowBinary codec library and agent skill). See the repo-root AGENTS.md for cross-cutting guidance. This package has a symmetric reader/writer codebase. The tests follow a few conventions worth preserving: - Reader and writer tests are separate files. Readers are tested in tests/*.test.ts; writers in tests/*.write.test.ts. Keep the two independent: a writer test must never decode its bytes back through a reader (and vice versa), so a bug on one side cannot mask a bug on…

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 1

    1. ClickHouse/agent-skills★ 563100% same

    Edited · 0

    None found.

    Wrote their own version · 0

    None found.

    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.

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 31,774 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository12 other files it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

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

    Each case is an isolated it() with a fully-inline body: Write the assertion out per case, e.g.

    line 15

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “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
AGENTS.md

Recommendations for AI agents — @clickhouse/rowbinary

Guidance for the clickhouse-js-node-rowbinary package (the RowBinary codec library and agent skill). See the repo-root AGENTS.md for cross-cutting guidance.

This package has a symmetric reader/writer codebase.

Tests

The tests follow a few conventions worth preserving:

  • Reader and writer tests are separate files. Readers are tested in tests/*.test.ts; writers in tests/*.write.test.ts. Keep the two independent: a writer test must never decode its bytes back through a reader (and vice versa), so a bug on one side cannot mask a bug on the other. Writer tests assert the encoded bytes against live ClickHouse output as the source of truth.
  • Each case is an isolated it() with a fully-inline body. Write the assertion out per case, e.g. expect(encode(writer, value)).toEqual(await query("SELECT … FORMAT RowBinary")). Do not hide the assertion behind a thunk-factory helper (it("name", expectFoo(...))), and do not wrap the query in a per-file helper — embed the literal SQL inline, including any SETTINGS clause, so the full query is visible in the test. The only shared helpers are the generic query() (tests/clickhouse.ts, runs SQL → bytes) and encode() (tests/encode.ts, value → bytes). Repeating SQL across cases is fine; reviewability beats DRY here. See tests/Integers.write.test.ts as the canonical example.

No defensive validation in readers/writers

These are hot-path codecs. Do not add runtime validation of input values (isFinite, range/NaN checks, type guards, etc.) to the readX/writeX functions. The data at this level is expected to be correct, and an invalid value is a programming error — document the precondition in the JSDoc instead (see writeUVarint and the writeDate*/writeDateTime writers as the canonical examples). A Math.round-style transform that silently shifts a valid value to the wrong encoding is a correctness bug and must be fixed; rejecting an invalid value is not our job here.

Two narrow exceptions where a check is warranted:

  1. It keeps the protocol in sync. A check belongs in only when skipping it would desync the wire stream — e.g. writeIPv6 requires exactly 16 bytes because a wrong length shifts every subsequent field, and parseIPv6 rejects malformed groups because it can't otherwise produce 16 well-defined bytes. These guard the framing, not the user's data semantics.
  2. The cost is genuinely zero or it can't reach the server. Pure parse-time helpers (string → bytes, before anything is on the wire) may validate, since there's no hot loop and no server to fall back on.

Otherwise, prefer letting the ClickHouse server reject bad bytes server-side over guarding client-side: it already validates, and duplicating that on the encode path costs throughput for no real safety.

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.