agentleFS
easyzoomeasyzoom/aix-skills/skills/crc-checksum-integration/SKILL.md

crc-checksum-integration

Skill36 starsChanged 5 months agoMITView on GitHub

Use when implementing, verifying, or debugging CRC, checksum, hash-lite integrity checks, polynomial parameters, endian handling, or protocol frame validation in embedded systems

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 5 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill to integrate CRCs and checksums by making the exact algorithm parameters explicit.

    line 10
  2. Distinctive:

    Use this skill when:

    line 14
  3. Very specific:

    Do not use this skill for cryptographic authentication.

    line 20
  4. Distinctive:

    Write the full CRC tuple. Do not rely on names like CRC-16 unless the parameters are specified.

    line 34
  5. Distinctive:

    Do not rely on names like CRC-16 unless the parameters are specified.

    line 35
  6. Very specific:

    Verify with a golden vector.

    line 37
  7. Very specific:

    Test 123456789 or a protocol-provided frame before using live data.

    line 38
  8. Distinctive:

    Before claiming the integrity check works:

    line 63

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill 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
SKILL.md

CRC Checksum Integration

Overview

Use this skill to integrate CRCs and checksums by making the exact algorithm parameters explicit. Most CRC bugs come from two sides using the same name for different init, reflection, xorout, byte order, or covered range.

When To Use

Use this skill when:

  • The user needs CRC-8, CRC-16, CRC-32, additive checksum, Fletcher, Adler, or protocol frame validation.
  • The issue involves mismatched CRC values, boot image validation, Modbus, CAN, UART packets, storage records, or OTA packages.
  • The target uses hardware CRC units, DMA, endian-sensitive protocols, or streaming updates.

Do not use this skill for cryptographic authentication. Use mbedtls-integration, tinycrypt-integration, or micro-ecc-integration when adversarial tampering matters.

First Questions

Ask for:

  • Algorithm name plus polynomial, width, init, refin, refout, xorout, and check value if known.
  • Exact byte range covered, header/trailer inclusion, padding, and endian order.
  • Whether the implementation is table-driven, bitwise, hardware accelerated, or streaming.
  • Known-good sample input and expected output from the peer device or specification.
  • Current mismatch and where it is observed.

Integration Checklist

  1. Write the full CRC tuple. Do not rely on names like CRC-16 unless the parameters are specified.
  2. Verify with a golden vector. Test 123456789 or a protocol-provided frame before using live data.
  3. Freeze byte coverage. Define start offset, length, skipped fields, padding, escaping, and final byte order.
  4. Match streaming behavior. The incremental API must preserve state exactly across chunks and resets.
  5. Compare hardware and software. Hardware CRC units often need byte reversal, word packing, or final xor handling.
  6. Add negative tests. Flip one bit in payload and metadata to prove the check actually fails.

Common Failures

  • Wrong reflection settings for the named CRC variant.
  • Including the CRC field itself in the covered range.
  • Feeding words into a hardware CRC in host endian instead of wire order.
  • Using a checksum where collision resistance or authenticity is required.
  • Resetting incremental CRC state between chunks.
  • Comparing printed hex values with opposite byte order.

Verification

Before claiming the integrity check works:

  • State the full CRC/checksum parameters and covered byte range.
  • Confirm golden vector output.
  • Confirm peer frame or stored-image sample matches.
  • Confirm corrupted data is rejected.
  • Confirm hardware and software paths match if both exist.

Example

User:

Modbus CRC 算出来总和设备不一样。

Agent:

  1. Checks CRC-16/Modbus parameters, byte coverage, and low-byte-first output.
  2. Runs a known Modbus frame golden vector.
  3. Verifies the serial frame excludes the CRC field while computing.

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.