Skip to main content
SecurityOfficialCertifiedReviewed Nov 26, 2026

encryption

We earn commissions when you shop through the links below.

Audit and harden encryption across the full stack. Checks data-at-rest encryption (database TDE, field-level AES-256-GCM, file storage SSE, backup encryption), data-in-transit security (TLS 1.2+, HSTS, certificate pinning, mTLS, WebSocket WSS), key management (KMS, envelope encryption.

v2.0.113 installs

Install this skill

No account required. Pick your tool, or use the command that detects it for you.

Run in your terminal. It detects your AI tool.

npx @skills-hub-ai/cli install encryption
Or get the file:
Browse all CLI commands →
Manual setup by platform

Claude Code

~/.claude/skills/encryption/SKILL.md

Setup guide →

Signing

SignedSLSA L2
Signed by
skills-hub.ai distributor
Method
Distributor-signed by skills-hub.aiSigned with the skills-hub.ai Ed25519 distributor key over this exact slug, version and content. Check it with `npx @skills-hub-ai/cli verify`.
Key
skills-hub-ed25519-2026-11
Signed
0Save

Instructions

You are in AUTONOMOUS MODE. Do NOT ask questions. Audit current encryption state, then implement improvements.

TARGET:
$ARGUMENTS

If no arguments provided, perform a full encryption audit and generate an implementation plan. If arguments specify an area (e.g., "password hashing", "TLS", "key rotation"), focus on that area and implement changes.


PHASE 0: TECH STACK DETECTION


Auto-detect the project's technology stack:

  • Language and framework (Node.js, Python, Go, Java, Rust, etc.)
  • Database (PostgreSQL, MySQL, MongoDB, Firestore, DynamoDB, etc.)
  • Cloud provider (AWS, GCP, Azure, self-hosted)
  • Authentication system (Firebase Auth, Auth0, Passport.js, custom)
  • File storage (S3, GCS, local filesystem)
  • Mobile/web platform (affects certificate pinning requirements)
  • Secret management (Vault, AWS Secrets Manager, GCP Secret Manager, env vars)

Record the stack — encryption implementation varies significantly by technology.


PHASE 1: DATA AT REST ENCRYPTION AUDIT


Assess current encryption of stored data:

DATABASE ENCRYPTION:

  • Check if database-level encryption is enabled (TDE for SQL, encryption at rest for cloud DBs)
  • Check database connection strings for SSL/TLS parameters
  • For cloud databases: verify encryption is enabled in config/IaC files

FIELD-LEVEL ENCRYPTION:

  • Identify PII fields in data models (email, phone, SSN, payment info, health data)
  • Check if sensitive fields are encrypted before storage
  • Check encryption algorithm used (AES-256-GCM preferred)
  • Check if initialization vectors (IVs) are unique per record (not reused)
  • Verify encrypted fields are searchable only via exact match or encrypted index

FILE ENCRYPTION:

  • Check if uploaded files are encrypted at rest
  • Check if file storage service has encryption enabled (S3 SSE, GCS encryption)
  • Verify temporary files are cleaned up (not left unencrypted on disk)

BACKUP ENCRYPTION:

  • Check if database backups are encrypted
  • Check if backup encryption keys are separate from primary keys
  • Verify backup retention and key retention align

For each area: current state, gaps, and recommended implementation.


PHASE 2: DATA IN TRANSIT ENCRYPTION AUDIT


Assess encryption of data in motion:

TLS CONFIGURATION:

  • Check TLS version requirements (minimum TLS 1.2, prefer TLS 1.3)
  • Search for disabled certificate verification:
    • Node.js: rejectUnauthorized: false, NODE_TLS_REJECT_UNAUTHORIZED=0
    • Python: verify=False, ssl._create_unverified_context()
    • Go: InsecureSkipVerify: true
    • Java: custom TrustManager accepting all certificates
  • Check for HTTP (not HTTPS) URLs in API calls
  • Check for insecure WebSocket (ws://) connections

SECURITY HEADERS:

  • Strict-Transport-Security (HSTS) — present, max-age >= 31536000, includeSubDomains
  • Content-Security-Policy — restricts resource loading
  • X-Content-Type-Options: nosniff
  • X-Frame-Options: DENY or SAMEORIGIN
  • Referrer-Policy: strict-origin-when-cross-origin or stricter

CERTIFICATE PINNING (mobile apps):

  • Flutter: check for certificate pinning in HTTP client config
  • iOS: check for NSAppTransportSecurity settings in Info.plist
  • Android: check for network_security_config.xml
  • Verify pins are for intermediate certificates (not leaf — avoids rotation issues)

INTERNAL COMMUNICATION:

  • Service-to-service communication encrypted (mTLS or service mesh)
  • Database connections use SSL/TLS
  • Redis/cache connections encrypted
  • Message queue connections encrypted (RabbitMQ, Kafka SSL)

PHASE 3: KEY MANAGEMENT AUDIT AND IMPLEMENTATION


Assess and improve cryptographic key management:

CURRENT STATE AUDIT:

  • Where are encryption keys stored? (env vars, config files, code, KMS)
  • Are keys hardcoded in source code? (Critical finding if yes)
  • Are keys in version control? (Critical finding if yes)
  • Is there a key rotation process?
  • Are different keys used for different purposes (separation of concerns)?

KEY ROTATION STRATEGY:
Generate a key rotation plan based on the detected stack:

For AWS:

- Use AWS KMS for master keys
- Implement envelope encryption: KMS key → data key → encrypt data
- Enable automatic annual rotation for KMS keys
- Data keys rotated per-session or per-record

For GCP:

- Use Cloud KMS for master keys
- Enable automatic rotation (90-day recommended)
- Use envelope encryption pattern
- Separate key rings per environment

For self-hosted / Vault:

- Use HashiCorp Vault Transit secrets engine
- Configure auto-rotation policies
- Implement key versioning for re-encryption
- Set up audit logging for key access

ENVELOPE ENCRYPTION IMPLEMENTATION:
If the project needs field-level encryption, implement the envelope encryption pattern:

  1. Master key stored in KMS (never leaves KMS)
  2. Data Encryption Key (DEK) generated per record or per batch
  3. DEK encrypted by master key, stored alongside encrypted data
  4. On decrypt: KMS decrypts DEK, DEK decrypts data

Provide implementation code specific to the detected stack.


PHASE 4: PASSWORD HASHING AUDIT


Assess password storage security:

ALGORITHM CHECK:

  • Identify the password hashing algorithm in use
  • Rate the algorithm:
    • argon2id — EXCELLENT (preferred, memory-hard)
    • bcrypt — GOOD (widely supported, CPU-hard)
    • scrypt — GOOD (memory-hard)
    • PBKDF2 — ACCEPTABLE (if iteration count >= 600,000 for SHA-256)
    • SHA-256/SHA-512 with salt — WEAK (too fast, upgrade needed)
    • MD5 / SHA-1 — CRITICAL (must replace immediately)
    • Plaintext — CRITICAL (must replace immediately)

CONFIGURATION CHECK:

  • bcrypt: work factor >= 12 (recommended: 12-14)
  • argon2: memory >= 64MB, iterations >= 3, parallelism >= 1
  • scrypt: N >= 2^15, r >= 8, p >= 1
  • PBKDF2: iterations >= 600,000 (SHA-256) or >= 210,000 (SHA-512)

SALT CHECK:

  • Unique salt per password (not global salt)
  • Salt length >= 16 bytes
  • Salt generated with cryptographic RNG

MIGRATION PLAN:
If the current algorithm is weak, generate a migration plan:

  1. Implement new hashing algorithm alongside old
  2. On login: verify with old algorithm, re-hash with new, store new hash
  3. Set deadline for forced password reset for accounts not yet migrated
  4. Remove old algorithm support after migration period

PHASE 5: TOKEN AND API KEY SECURITY


Assess token generation and API key management:

TOKEN GENERATION:

  • JWT signing algorithm (HS256 acceptable, RS256/ES256 preferred for distributed systems)
  • JWT secret strength (>= 256 bits for HMAC, proper key pair for RSA/ECDSA)
  • JWT expiration configured (access tokens: 15-60 minutes, refresh tokens: 7-30 days)
  • Session tokens use crypto.randomBytes(32) or equivalent CSPRNG
  • No Math.random() for security-sensitive tokens
  • OTP/verification codes use cryptographic randomness

API KEY MANAGEMENT:

  • API keys stored hashed (like passwords), not in plaintext
  • API keys scoped to minimum required permissions
  • API key rotation mechanism exists
  • Rate limiting per API key
  • API key revocation capability
  • API keys not logged or exposed in error messages

REFRESH TOKEN SECURITY:

  • Refresh tokens stored securely (httpOnly cookie or secure storage)
  • Refresh token rotation on use (one-time use)
  • Refresh token family tracking (detect stolen tokens)
  • Absolute expiration on refresh tokens

PHASE 6: IMPLEMENTATION


If the $ARGUMENTS request implementation (not just audit), apply fixes:

For each issue found in Phases 1-5:

  1. Implement the fix using the project's existing patterns and dependencies
  2. Add or update configuration as needed
  3. Write migration scripts if data format changes
  4. Verify the fix works (run tests, verify encryption/decryption roundtrip)
  5. Commit each logical change separately with descriptive messages

Priority order for implementation:

  1. Hardcoded secrets → move to environment variables or secret manager
  2. Weak password hashing → upgrade algorithm
  3. Missing TLS verification → enable proper certificate validation
  4. Unencrypted PII → add field-level encryption
  5. Missing security headers → add header middleware
  6. Key rotation → implement rotation strategy

SELF-HEALING VALIDATION (max 2 iterations)


After producing the security analysis, validate thoroughness:

  1. Verify every category in the audit was actually checked (not skipped).
  2. Verify every finding has a specific file:line location.
  3. Verify severity ratings are justified by impact assessment.
  4. Verify no false positives by re-reading flagged code in context.

IF VALIDATION FAILS:

  • Re-audit skipped categories or vague findings
  • Verify or remove false positives
  • Repeat up to 2 iterations

OUTPUT


Encryption Audit Report

Project: [name]
Stack: [detected technologies]
Date: [date]

Summary

AreaStatusFindings
Data at Rest[GOOD/PARTIAL/WEAK/NONE]N issues
Data in Transit[GOOD/PARTIAL/WEAK/NONE]N issues
Key Management[GOOD/PARTIAL/WEAK/NONE]N issues
Password Hashing[GOOD/PARTIAL/WEAK/NONE]N issues
Token Security[GOOD/PARTIAL/WEAK/NONE]N issues
API Key Security[GOOD/PARTIAL/WEAK/NONE]N issues

Critical Findings (fix immediately)

[Hardcoded secrets, plaintext passwords, disabled TLS, etc.]

Recommendations

[Ordered list by priority with implementation guidance]

Implementation Plan

PriorityAreaActionEffortDependencies
P0SecretsMove to env vars1 hourNone
P1PasswordsUpgrade to argon24 hoursMigration script
P2PIIField-level encryption1 dayKMS setup

Changes Made (if implementation was performed)

[List of commits with descriptions of what was implemented]


NEXT STEPS


After reviewing the encryption audit:

  • "Run /secure to verify overall security posture after encryption improvements."
  • "Run /soc2 to check Confidentiality (C1) controls with new encryption."
  • "Run /gdpr to verify PII encryption meets compliance requirements."
  • "Run /pentest to verify secrets are no longer exposed."
  • "Set up automated key rotation on the schedule recommended above."

SELF-EVOLUTION TELEMETRY


After producing output, record execution metadata for the /evolve pipeline.

Check if a project memory directory exists:

  • Look for the project path in ~/.claude/projects/
  • If found, append to skill-telemetry.md in that memory directory

Entry format:

### /encryption — {{YYYY-MM-DD}}
- Outcome: {{SUCCESS | PARTIAL | FAILED}}
- Self-healed: {{yes — what was healed | no}}
- Iterations used: {{N}} / {{N max}}
- Bottleneck: {{phase that struggled or "none"}}
- Suggestion: {{one-line improvement idea for /evolve, or "none"}}

Only log if the memory directory exists. Skip silently if not found.
Keep entries concise — /evolve will parse these for skill improvement signals.


DO NOT


  • Do NOT store or log encryption keys, passwords, or secrets in the output.
  • Do NOT downgrade existing encryption (e.g., replacing AES-256 with AES-128).
  • Do NOT implement custom cryptographic algorithms — use well-vetted libraries.
  • Do NOT use ECB mode for block ciphers — use GCM or CBC with HMAC.
  • Do NOT generate keys with Math.random() or non-cryptographic PRNGs.
  • Do NOT disable TLS verification as a "fix" for certificate issues.
  • Do NOT commit secrets even temporarily — use environment variables from the start.
  • Do NOT implement encryption without a decryption/migration path.
This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Reviews (0)

Browse all →
design-animateAdd purposeful motion with modern CSS (scroll-driven animations, view transitions, @starting-style) or Flutter implicit animations, with reduced-motion support. Triggers: add animation, animate, add motion, transitions, scroll animation.80 installsdesign-auditRead-only design quality audit (WCAG 2.2 accessibility, performance, theming, responsive, anti-patterns) with scored, prioritized fixes. Triggers: 'audit design', 'check accessibility', 'a11y audit', 'design review', 'UI quality check'.63 installssecureRead-only full-stack security posture assessment with a 0-100 risk score: dependency CVEs, dangerous code patterns, auth gaps, config and secrets, PII handling; routes to deeper skills. Triggers: 'security posture', 'how secure is this', 'security scan', 'risk score'.58 installsdesign-polishFinal quality pass before shipping: fixes alignment, spacing, type hierarchy, color consistency, interactive states and motion timing to match the existing design language. Triggers: 'polish the UI', 'make it pixel perfect', 'final design pass'.57 installsdiagramGenerate Mermaid architecture diagrams from the codebase: C4 context/container, sequence diagrams for key flows, ER from schemas, module dependency graphs. Triggers: 'architecture diagram', 'ERD', 'sequence diagram', 'dependency graph', 'C4 diagram'.57 installsresponsiveAudit and fix responsive design across breakpoints: fixed widths, overflow and horizontal scroll, non-responsive images, small touch targets, unreadable type, layouts that don't adapt. Triggers: 'fix mobile layout', 'responsive audit', 'horizontal scroll', 'breaks on mobile'.50 installs

More from Skills Hub

View source →
security-reviewEvidence-based security audit of a codebase: auth and authz gaps, IDOR, JWT/OAuth flaws, injection, data exposure, secrets and session issues, with exploit scenarios and fixes. Triggers: security review, audit auth, find vulnerabilities.199 installsunit-testFind untested code, write unit tests covering edge cases, error paths and boundaries in the project's own style, run them and fix failures. Triggers: add unit tests, increase coverage, test edge cases, test error handling.170 installshumanizerRewrite AI-drafted content so it reads human: cut filler and hedging, vary sentence length, curb em dashes, add specifics and voice. Triggers: humanize this, remove AI tells, sounds like ChatGPT, make it sound human.139 installsweb-gameScaffold a production-ready browser game (Phaser, PixiJS or Three.js) with Vite, TypeScript, input, audio, saves, responsive canvas and itch.io/PWA deploy. Triggers: web game, browser game, html5 game, phaser game, pixi game, three.js game.135 installsflutterBuild a complete Flutter app from a video, screenshots, description or /mvp output, matching the observed UI and flows, with tests. Triggers: flutter app, build a mobile app, build from video/screenshots, clone this app, make an app like, recreate this UI.129 installsdesign-to-codeTurn a design into production frontend code in four phases: design-system tokens and components, responsive layout, dark mode, then a UX audit that fixes what it finds. Triggers: implement this design, Figma to code, design to code, build the UI from this.127 installs

More Security skills

Browse category →

Frequently asked questions about encryption

What does the encryption skill do?

Audit and harden encryption across the full stack. Checks data-at-rest encryption (database TDE, field-level AES-256-GCM, file storage SSE, backup encryption), data-in-transit security (TLS 1.2+, HSTS, certificate pinning, mTLS, WebSocket WSS), key management (KMS, envelope encryption. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the encryption skill?

Run `npx @skills-hub-ai/cli install encryption` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/encryption/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does encryption work with?

encryption runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the encryption skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use encryption after installing it?

In Claude Code, type `/encryption` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the encryption skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.