crypto-best-practices

crypto-best-practices is a skill for Claude Code from pedromneto97/custom-skills. It costs 57 tokens per session (3,755 once invoked), scanned A, original, MIT.

A guide to choosing and using encryption, password hashing, secure random numbers, digital signatures and TLS—the methods used to protect data and communications. It recommends established cryptography libraries and safer algorithms.

In plain words
What is it for?
Use it when designing encryption, password storage, key management, digital signatures or secure network connections.
Why use it?
It helps avoid common mistakes such as using outdated encryption, weak keys or unauthenticated encrypted data. These mistakes can let attackers read or alter protected information.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Good fit Use it when designing encryption, password storage, key management, digital signatures or secure network connections.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pedromneto97/custom-skills/crypto-best-practices
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add pedromneto97/custom-skills --skill crypto-best-practices
Clone the repo
git clone --depth 1 https://github.com/pedromneto97/custom-skills

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for crypto-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/pedromneto97/custom-skills/crypto-best-practices/github.svg)](https://agentmods.dev/skills/pedromneto97/custom-skills/crypto-best-practices)
Your own site
<a href="https://agentmods.dev/skills/pedromneto97/custom-skills/crypto-best-practices"><img src="https://agentmods.dev/badge/skills/pedromneto97/custom-skills/crypto-best-practices/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for crypto-best-practices

Your own site · 80×15
<a href="https://agentmods.dev/skills/pedromneto97/custom-skills/crypto-best-practices"><img src="https://agentmods.dev/badge/skills/pedromneto97/custom-skills/crypto-best-practices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,755 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00057 $0.03755
Opus 5 $0.00028 $0.01878
Sonnet 5 $0.00011 $0.00751
Haiku 4.5 $0.00006 $0.00376

Measured 12d ago against content hash 3516c2b75a9a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

crypto-best-practices scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/crypto-best-practices/SKILL.md · 432 lines

How it starts

The opening of the file, as written. The whole thing — 432 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Cryptographic Best Practices

⚠️ Golden Rule

Use a battle-tested library that handles cryptographic composition correctly for you:

  1. NaCl (by Daniel Bernstein)
  2. libsodium (NaCl fork by Frank Denis)
  3. monocypher (libsodium fork by Loup Vaillant)

If you use these libraries, most low-level decisions are already made for you. Only continue reading if forced to make your own choices.


1. Symmetric Encryption

Decision Tree:

  • Do you have access to a Key Management System (KMS)? → Use KMS
  • Otherwise → Use AEAD (Authenticated Encryption with Associated Data)

Recommended algorithms (in order):

  1. NaCl/libsodium/monocypher default
  2. ChaCha20-Poly1305 (faster in software)
  3. AES-GCM (industry standard, faster with AES-NI)
  4. AES-CTR with HMAC (fast in software)

❌ Avoid:

  • AES-CBC, AES-CTR alone (must use AEAD)
  • Block ciphers with 64-bit blocks (Blowfish, 3DES)
  • OFB mode
  • RC4 (broken)

Why AEAD? Prevents forged ciphertexts. A single byte corruption either fails authentication or reveals nothing.


2. Symmetric Key Length

Recommendations for data protection through 2050:

  • Minimum: 128 bits
  • Maximum: 256 bits (no harm in using larger)
Standard Recommendation Notes
NIST 192 bits Conservative government standard
ECRYPT II 256 bits Academic consensus, most conservative
ANSSI 128 bits European standard, adequate
IAD-NSA 256 bits Highest security requirement

If your symmetric key is derived from user input (password):

  • The password must provide at least as many bits of entropy as the target key length
  • Example: 128-bit AES key needs ≥128 bits of entropy in the password

3. Symmetric Signatures (HMAC/MAC)

Use when authenticating but not encrypting (e.g., API requests, message authentication).

Recommended algorithms (in order):

HMAC variants:

  1. HMAC-SHA-512/256 (truncated SHA-512)
  2. HMAC-SHA-512/224 (truncated SHA-512)
  3. HMAC-SHA-384
  4. HMAC-SHA-224
  5. HMAC-SHA-512
  6. HMAC-SHA-256

Read the full file on GitHub · 432 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 432 lines · 57 tokens per session scan A 3516c2b75a9a

Subscribe to this mod's changes

crypto-best-practices is a skill published in the GitHub repository pedromneto97/custom-skills (2 stars, last pushed 2mo ago), licensed MIT. It adds 57 tokens to every session and 3,755 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

skill-authoring

Guide creating Claude Code skills with TDD and persuasion principles. Use for new skill development.

athola/claude-night-market · 22 tokens

claude-md-improver

Audit and improve CLAUDE.md files in repositories. Use when user asks to check, audit, update, improve, or fix CLAUDE.md files. Scans for all CLAUDE.md files, evaluates quality against templates, outputs quality report, then makes targeted updates. Also use when the user mentions "CLAUDE.md maintenance" or "project…

anthropics/claude-plugins-official · 82 tokens

gke-reliability

Improves GKE workload reliability, using PDBs, health probes, and topology spread constraints. Use when configuring GKE workload reliability, setting up PDBs, or configuring GKE health probes (liveness, readiness, startup). Don't use for disaster recovery setup or full cluster backups (use gke-backup-dr instead).

google/skills · 73 tokens

gke-workload-security

Audits, configures, and hardens workload-level security controls for Google Kubernetes Engine (GKE) applications and namespaces. Covers running cluster security audits (auditcluster.sh), configuring Workload Identity Federation (impersonation, KSA/GSA binding, and pod setup), enforcing Network Policies (default-deny…

google/skills · 181 tokens

agent-platform-model-registry

Agent Platform Model Registry Management. Use when you need to upload, list, describe, update, or delete machine learning models (and their versions) in the Agent Platform Model Registry. Don't use for model training, model deployment to endpoints, or managing non-Agent Platform models.

google/skills · 60 tokens

google-cloud-solution-agentic-analytics-spark-knowledge-catalog

Discovers requirements and generates guidance to design and deploy a governed, secure agentic-analytics solution for data that's distributed across Google Cloud, other cloud providers, or on-premises. Data that's outside Google Cloud (such as data from Databricks, Snowflake, Salesforce, SAP, or Oracle systems) is…

google/skills · 138 tokens