Files
suaveplan/packages/devtools/tooling/install-agent-skills/assets/skills/crypto-cipher/SKILL.md
2026-05-27 23:29:53 +01:00

2.4 KiB

name: crypto-cipher description: Use when implementing or debugging code that uses @suaveplan/crypto-cipher: AEAD cipher primitives with per-primitive selector layout: aes-256-gcm, chacha20-poly1305, xchacha20-poly1305.

@suaveplan/crypto-cipher

Low-level AEAD (Authenticated Encryption with Associated Data) cipher primitives for the @suaveplan/crypto stack. Provides three algorithms — AES-256-GCM, ChaCha20-Poly1305, and XChaCha20-Poly1305 — each as a standalone subpath export for tree-shaking. Nonces are always caller-supplied: the package validates nonce length but never generates randomness internally, keeping the CSPRNG boundary in the caller's control. Implementation flavour ('noble' vs 'native') is selected at build time via crypto.config.ts; all Phase 0 implementations route to @noble/ciphers. Use @suaveplan/crypto for the high-level façade that combines nonce generation, engine selection, and structured error handling; use this package only when you need to supply your own cipher engine implementation.

When to use this skill

  • Implementing or debugging code that imports @suaveplan/crypto-cipher.
  • The task touches: see package README.
  • You need API guidance for this package's exports.

Quick reference

import { /* see API Reference below */ } from "@suaveplan/crypto-cipher";

Dependencies

Workspace dependencies: @suaveplan/crypto-utils, @suaveplan/error, @suaveplan/types

Where to read more

This skill is intentionally short. The package's own documentation is the authoritative source — read these in order:

  1. packages/crypto/crypto-cipher/README.md — overview, install, quick-start, module index
  2. packages/crypto/crypto-cipher/src/**/*.md — co-located docs per implementation file (Purpose, Features, Basic + Advanced examples, full API reference, Implementation notes — all packages ship ≥200 words per module)
  3. packages/crypto/crypto-cipher/package.json exports map — every subpath you can import from

When the user asks an API question, read the relevant co-located .md first; do not answer from training-data memory.

See also

  • @suaveplan/crypto-utils
  • @suaveplan/error
  • @suaveplan/types

This SKILL.md is auto-generated by suaveplan-skills/scripts/generate-skills.ts from the package's README. Do not edit by hand — re-run the generator after the README changes.