Agent skill

Aidd Timing Safe Compare

by paralleldrive in paralleldrive/aidd

Security rule for timing-safe secret comparison. An agent skill from paralleldrive/aidd.

MITAuto-check passedSecurity

Install Aidd Timing Safe Compare

skills CLI
$ npx skills add paralleldrive/aidd --skill aidd-timing-safe-compare -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install paralleldrive/aidd aidd-timing-safe-compare --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/paralleldrive/aidd.git skills-src && mkdir -p .claude/skills && cp -r skills-src/ai/skills/aidd-timing-safe-compare .claude/skills/aidd-timing-safe-compare && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
aidd-timing-safe-compare
GitHub stars
384
Token cost
~575 tokens
SKILL.md length
289 words
Files
4 (incl. references)
Skills in repo
35
Repo updated
First seen
Licence
MIT

At a glance

Security rule for timing-safe secret comparison. An agent skill from paralleldrive/aidd.

  • Works in 3 steps: Hashing removes all prefix structure.… → Raw secrets never appear in logs or… → Fixed-length output eliminates length…
  • Implementing secret comparisons
  • SKILL.md covers Guide and Review
  • Runs JavaScript scripts from its folder

What it does

Aidd Timing Safe Compare is an agent skill from paralleldrive/aidd. Security rule for timing-safe secret comparison. Use SHA3-256 hashing instead of timing-safe compare functions. Use when reviewing or implementing secret comparisons, token validation, CSRF tokens, or API key checks.

Its SKILL.md is about 580 tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `README.md`, `references/vulnerabilities.md` and `timing-safe-compare.test.js`).

It sits in Security, covering Web application vulnerabilities. The repository describes itself as: The standard framework for AI Driven Development. The licence is MIT.

When your agent uses it

  • Implementing secret comparisons
  • Token validation

Example prompts

  • “/aidd-timing-safe-compare”

Requirements

  • Node.js

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Hashing removes all prefix structure. Any bit change fully randomizes the hash. No timing oracle. No hangman.
  2. Raw secrets never appear in logs or errors.
  3. Fixed-length output eliminates length oracle attacks.

What it can do on your machine

Read from SKILL.md and the folder at commit 9a7c8e3. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (JavaScript), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Aidd Timing Safe Compare loads about 575 tokens when it runs, and up to ~1.1k if it reads all its reference files. Until then it costs about 60 tokens; SKILL.md has 289 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~60
When it runs · the whole SKILL.md, loaded when a task matches
~575
With references · SKILL.md plus every file in references/, read only if the agent opens them
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from paralleldrive/aidd at commit 9a7c8e3, republished under its MIT licence (© paralleldrive). 289 words, ~575 tokens.

Download SKILL.mdSave it as .claude/skills/aidd-timing-safe-compare/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
aidd-timing-safe-compare
description
Security rule for timing-safe secret comparison. Use SHA3-256 hashing instead of timing-safe compare functions. Use when reviewing or implementing secret comparisons, token validation, CSRF tokens, or API key checks.

Constraint: Timing Safe Compare

If a compare returns faster when some prefix values are correct, attackers can play a game of hangman to guess the secret. Using statistics, this can still work over a network with timing jitter.

There is no timing safe compare for raw values. Never use:

  • crypto.timingSafeEqual
  • hmac.compare_digest
  • subtle.ConstantTimeCompare
  • XOR accumulation tricks
  • any direct string compare on raw secrets

Always hash both the stored secret token and the candidate token with SHA3-256, then compare the hashes. This rule overrides all library defaults.

See timing-safe compare vulnerabilities for vulnerability reports in the wild.

Reasons:

  1. Hashing removes all prefix structure. Any bit change fully randomizes the hash. No timing oracle. No hangman.
  2. Raw secrets never appear in logs or errors.
  3. Fixed-length output eliminates length oracle attacks.

Patterns {

Guide

(timing safe compare needed?) => Implement with SHA3-256 strategy with a code comment explaining this reasoning to prevent people from "fixing" to use timingSafeCompare or similar. Use SHA3-256 in a named helper, hash both values, then compare digests. That pattern is approved with or without a timing safe compare call because there is no stable prefix structure to game. Do not flag it as a major timing-unsafe finding.

Review

(equality check on raw secrets or plaintext tokens without prior SHA3-256) => raise CRITICAL security bug, "Security and auth token comparisons must be hashed before compare to avoid hangman attacks." (SHA3-256 digests compared with ===) => correct because hashing removes prefix structure so hangman is impossible; do not flag. (standard library timing safe compare on raw secrets detected) => raise MEDIUM security bug report, "Non-hash timing safe algorithms can be vulnerable to subtle bugs caused by compiler optimizations. Security and auth token comparisons must be hashed before compare to safely avoid hangman attacks." }

© paralleldrive, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in ai/skills/aidd-timing-safe-compare of paralleldrive/aidd.

  • SKILL.md
  • README.md
  • references/vulnerabilities.md
  • timing-safe-compare.test.js

Open the folder on GitHubat commit 9a7c8e3

Compare with similar skills

Aidd Timing Safe Compare next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Aidd Timing Safe Compare compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Aidd Timing Safe Compare this skillparalleldrive/aidd384—~575Automated safety check: PassMIT
Security And Hardeningpenpot/penpot61k6 repos~4.7kAutomated safety check: NotesMPL-2.0
Security Auditoreigent-ai/eigent15k—~1.8kAutomated safety check: NotesApache-2.0
Security Reviewjewbetcha/opentrace11618 repos~3.1kAutomated safety check: NotesMIT
Strix Code Vulnerability Scanusestrix/strix67k—~1.1kAutomated safety check: PassApache-2.0
Code Audit3stoneBrother/code-audit8931 repos~2.7kAutomated safety check: PassNone

Similar skills

  • Hardens code against vulnerabilities. An agent skill from penpot/penpot.

    61k GitHub starsUsed in 6 repos~4.7k tokens
    SecurityAuto-check: notes
  • Security Auditor

    eigent-ai/eigent

    Audits source code, dependencies and config files for vulnerabilities and hardcoded secrets, using two bundled Python scanners and an OWASP Top 10 checklist.

    15k GitHub stars~1.8k tokensUpdated today
    SecurityAuto-check: notes
  • Security Review

    jewbetcha/opentrace

    A skill your agent uses when adding authentication, handling user input, working with secrets, creating API endpoints, or implementing payment/sensitive features.

    116 GitHub starsUsed in 18 repos~3.1k tokens
    SecurityAuto-check: notes
  • Runs a Strix white-box security review that reads the source, then exploits what it finds in a sandbox so each reported issue has a proof-of-concept.

    67k GitHub stars~1.1k tokensUpdated yesterday
    SecurityAuto-check passed
  • Code Audit

    3stoneBrother/code-audit

    Professional code security audit skill covering 55+ vulnerability types.

    893 GitHub starsUsed in 1 repo~2.7k tokens
    SecurityAuto-check passed
  • Triages findings from a Strix pentest by severity, fixes each root cause with a minimal change, and re-runs Strix to confirm the exploit no longer works.

    67k GitHub stars~1.5k tokensUpdated yesterday
    SecurityAuto-check passed

More from paralleldrive/aidd

All 35 skills in this repo
  • AIDD Skill Authoring Guide

    paralleldrive/aidd

    Guides creating, reviewing or refactoring AI-Driven Development skills so each one stays minimal, composable and named around a single clear function.

    384 GitHub stars~1.1k tokensUpdated 3 mo ago
    Auto-check passed
  • AIDD UI Layout Patterns

    paralleldrive/aidd

    Enforces a split of UI components into terminal and layout types, with layout components composing others through standard layout tokens, for cleaner structure and fewer re-renders.

    384 GitHub stars~562 tokensUpdated 3 mo ago
    Auto-check passed
  • Adobe Data ECS Plugin Rules

    paralleldrive/aidd

    Enforces @adobe/data/ecs practices when writing Database.Plugin definitions, including property order, plugin composition, services, components, resources and archetypes.

    384 GitHub stars~1.9k tokensUpdated 3 mo ago
    Auto-check passed
  • Error Causes Handling

    paralleldrive/aidd

    Has your agent throw and catch JavaScript and TypeScript errors with the error-causes library, using named causes, preserved originals and routed handlers.

    384 GitHub stars~1.1k tokensUpdated 3 mo ago
    Auto-check passed
  • Teaches the saga pattern with call and put so network requests and side effects stay out of the logic and sagas can be tested without mocks.

    384 GitHub stars~587 tokensUpdated 3 mo ago
    Auto-check passed
  • Lit Element Authoring

    paralleldrive/aidd

    Rules for writing Lit elements in an AIDD project: binding elements on DatabaseElement, observed values, presentation components and action-style callbacks.

    384 GitHub stars~1.2k tokensUpdated 3 mo ago
    Auto-check passed

Categories

Questions about Aidd Timing Safe Compare

What does Aidd Timing Safe Compare do?

Security rule for timing-safe secret comparison. An agent skill from paralleldrive/aidd. Aidd Timing Safe Compare is an agent skill from paralleldrive/aidd. Security rule for timing-safe secret comparison.

When should I use Aidd Timing Safe Compare?

Aidd Timing Safe Compare fits situations like: implementing secret comparisons; token validation.

How do I install Aidd Timing Safe Compare in Claude Code?

Run `npx skills add paralleldrive/aidd --skill aidd-timing-safe-compare -a claude-code`. Or copy the skill folder (ai/skills/aidd-timing-safe-compare in paralleldrive/aidd) into .claude/skills/aidd-timing-safe-compare in your project. Claude Code loads it when a task matches its description.

How do I install Aidd Timing Safe Compare in Codex?

Run `npx skills add paralleldrive/aidd --skill aidd-timing-safe-compare -a codex`. Or copy the skill folder (ai/skills/aidd-timing-safe-compare in paralleldrive/aidd) into .agents/skills/aidd-timing-safe-compare in your project. Codex loads it when a task matches its description.

Can I use Aidd Timing Safe Compare in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add paralleldrive/aidd --skill aidd-timing-safe-compare -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/aidd-timing-safe-compare, .gemini/skills/aidd-timing-safe-compare, .github/skills/aidd-timing-safe-compare and .opencode/skills/aidd-timing-safe-compare in your project.

What does Aidd Timing Safe Compare need to run?

Going by SKILL.md and its folder, Aidd Timing Safe Compare needs JavaScript for the scripts in its folder. Our summary lists: Node.js.

Does Aidd Timing Safe Compare access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Aidd Timing Safe Compare safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Aidd Timing Safe Compare use?

Aidd Timing Safe Compare is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Aidd Timing Safe Compare use?

About 575 tokens (SKILL.md is roughly 2.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 498 tokens, read only when the agent opens those files.

What are the alternatives to Aidd Timing Safe Compare?

Skills that share tags, products or a category with Aidd Timing Safe Compare: Security And Hardening (penpot/penpot, 61k stars), Security Auditor (eigent-ai/eigent, 15k stars), Security Review (jewbetcha/opentrace, 116 stars) and Strix Code Vulnerability Scan (usestrix/strix, 67k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Aidd Timing Safe Compare?

paralleldrive (a GitHub organization) maintains it in paralleldrive/aidd, which has 384 GitHub stars. The repository holds 35 skills in this directory. The repository was last updated on June 12, 2026.

Source: paralleldrive/aidd on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.