pqblocks-skills / rules
Cursor rule0 starsChanged 8 days agoApache-2.0View on GitHub
Post-quantum cryptography and quantum-inspired optimisation with PQBlocks packages. Apply when code touches RSA, ECDSA, ECDH, X25519, JWT signing, key exchange, file encryption, CBOM, CNSA 2.0, ML-KEM, ML-DSA, SLH-DSA, QUBO or Ising.
- Installs packages
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 4,157 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.
The file
We split this pqblocks.mdc into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
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 9
Use the documented API only: Before writing code with a PQBlocks package, read its page under https://pqblocks.github.io/packages/ (or call …
- Distinctive: line 11
Never hand-roll post-quantum cryptography: Use the packages; they wrap maintained implementations (liboqs, pyca/cryptography).
- Very specific: line 15
Randomness from the OS only: Never pass a seed argument when generating production keys.
- Distinctive: line 22
Install lines: use the exact install line listed for each package.
≈ “Common” is an estimate: at least 1 in 5 of the 6,668 Cursor rule 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.
Files
--- description: Post-quantum cryptography and quantum-inspired optimisation with PQBlocks packages. Apply when code touches RSA, ECDSA, ECDH, X25519, JWT signing, key exchange, file encryption, CBOM, CNSA 2.0, ML-KEM, ML-DSA, SLH-DSA, QUBO or Ising. globs: alwaysApply: false --- # PQBlocks 1. **Use the documented API only.** Before writing code with a PQBlocks package, read its page under https://pqblocks.github.io/packages/ (or call the `get_snippet` tool of the `pqblocks-mcp` server). Every quickstart there was executed against the package. Never guess function names. 2. **Never hand-roll post-quantum cryptography.** Use the packages; they wrap maintained implementations (liboqs, pyca/cryptography). 3. **Hybrid by default during the transition:** ML-KEM-768 + X25519 for key establishment, ML-DSA-65 + Ed25519 for signatures. Downgrade to classical-only must be explicit. 4. **Randomness from the OS only.** Never pass a `seed` argument when generating production keys; seeds exist for reproducible tests. 5. **Never log or return secret keys or shared secrets** (logs, exceptions, HTTP responses, `repr`). 6. **Say exactly what is true.** PQBlocks packages implement FIPS 203/204/205 and test against official vectors where they exist. They are **not** FIPS 140-3 / CMVP validated, not externally audited, and pre-1.0. Never call them certified, validated, audited or quantum-proof. 7. **Quantum-inspired packages are optimisation, not cryptography.** Never place them in a security path. 8. **Install lines:** use the exact install line listed for each package; most install from GitHub until their PyPI release is published. ## Which package for which task | Task | Package | Install | Import | |---|---|---|---| | ML-KEM / ML-DSA / SLH-DSA primitives (keygen, encapsulate, sign) | [`pqblocks-primitives`](https://pqblocks.github.io/packages/primitives/) | `pip install pqblocks-primitives` | `pqblocks_primitives` | | Hybrid ML-KEM-768 + X25519 key establishment, native speed | [`pqblocks-core`](https://pqblocks.github.io/packages/core/) | `pip install git+https://github.com/PQBlocks/hybrid-sdk` | `pqblocks_core` | | Sign or verify JWTs / JWS with ML-DSA; encrypt JWE with ML-KEM | [`pqblocks-jose`](https://pqblocks.github.io/packages/jose/) | `pip install pqblocks-jose` | `pqblocks_jose` | | Encrypt files or byte strings to a post-quantum public key | [`pqblocks-files`](https://pqblocks.github.io/packages/files/) | `pip install pqblocks-files` | `pqblocks_files` | | Find RSA / ECC / weak hashes in code or a TLS endpoint; CBOM + SARIF | [`pqblocks-scan`](https://pqblocks.github.io/packages/scan/) | `pip install pqblocks-scan` | `pqblocks_scan` | | Python crypto data-flow linting; CBOM + SARIF | [`pqblocks-lint`](https://pqblocks.github.io/packages/lint/) | `pip install pqblocks-lint` | `pqblocks_lint` | | Enrich a CycloneDX CBOM with quantum-safety and CNSA 2.0 tags | [`pqblocks-cbom`](https://pqblocks.github.io/packages/cbom/) | `pip install pqblocks-cbom` | `pqblocks_cbom` | | Crypto-agility readiness score and CI regression gate | [`pqblocks-agility`](https://pqblocks.github.io/packages/agility/) | `pip install pqblocks-agility` | `pqblocks_agility` | | Policy-as-code: fail CI on forbidden algorithms | [`pqblocks-policy`](https://pqblocks.github.io/packages/policy/) | `pip install pqblocks-policy` | `pqblocks_policy` | | Audit which JWE / JOSE algorithms a gateway accepts | [`pqblocks-jwe-audit`](https://pqblocks.github.io/packages/jwe-audit/) | `pip install pqblocks-jwe-audit` | `pqblocks_jwe_audit` | | CNSA 2.0 compliance evidence pack | [`pqblocks-cnsa-evidence`](https://pqblocks.github.io/packages/cnsa-evidence/) | `pip install pqblocks-cnsa-evidence` | `pqblocks_cnsa_evidence` | | Probe a TLS 1.3 endpoint for X25519MLKEM768; hybrid key-schedule checks | [`pqblocks-tls-interop`](https://pqblocks.github.io/packages/tls-interop/) | `pip install pqblocks-tls-interop` | `pqblocks_tls_interop` | | Binary container for ML-KEM ciphertexts and ML-DSA / SLH-DSA signatures | [`pqblocks-wire`](https://pqblocks.github.io/packages/wire/) | `pip install pqblocks-wire` | `pqblocks_wire` | | Five-part hybrid JWE wire layout (serialise / parse only, no encryption) | [`pqblocks-jwe`](https://pqblocks.github.io/packages/jwe/) | `pip install pqblocks-jwe` | `pqblocks_jwe` | | ML-KEM certificate signing request with proof of possession | [`pqblocks-csr-pop`](https://pqblocks.github.io/packages/csr-pop/) | `pip install pqblocks-csr-pop` | `pqblocks_csr_pop` | | Run NIST ACVP vectors against ML-KEM / ML-DSA implementations | [`pqblocks-acvp`](https://pqblocks.github.io/packages/acvp/) | `pip install pqblocks-acvp` | `pqblocks_acvp` | | Reject malformed or wrong-length FIPS 203/204 inputs at a boundary | [`pqblocks-fips-check`](https://pqblocks.github.io/packages/fips-check/) | `pip install pqblocks-fips-check` | `pqblocks_fips_check` | | Verify post-quantum X.509 certificate chains in browser or Node.js | [`pqblocks-browser-pqc-verifier`](https://pqblocks.github.io/packages/browser-pqc-verifier/) | `npm install git+https://github.com/PQBlocks/browser-pqc-verifier` | `@pqblocks/browser-pqc-verifier` | | Build or convert QUBO / Ising models | [`pqblocks-qubo`](https://pqblocks.github.io/packages/qubo/) | `pip install pqblocks-qubo` | `pqblocks_qubo` | | Solve QUBO / Ising / Max-Cut (Simulated Bifurcation) | [`pqblocks-bifurcation`](https://pqblocks.github.io/packages/bifurcation/) | `pip install pqblocks-bifurcation` | `pqblocks_bifurcation` | | Simulated annealing / quantum annealing / population annealing / QIEA solvers | [`pqblocks-anneal-sa`](https://pqblocks.github.io/packages/anneal-sa/), [`pqblocks-anneal-sqa`](https://pqblocks.github.io/packages/anneal-sqa/), [`pqblocks-population-anneal`](https://pqblocks.github.io/packages/population-anneal/), [`pqblocks-qiea`](https://pqblocks.github.io/packages/qiea/) | `pip install pqblocks-anneal-sa` | `pqblocks_anneal_sa` | | Benchmark QUBO / Ising solvers (time-to-solution) | [`pqblocks-qubo-bench`](https://pqblocks.github.io/packages/qubo-bench/) | `pip install pqblocks-qubo-bench` | `pqblocks_qubo_bench` |
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.

