_hash-password
Skill44 starsChanged 57 days agoApache-2.0View on GitHub
Internal helper to hash a password with Node's native scrypt (NOT bcrypt - bcrypt hashes contain $ characters that break shell and env var handling). Delegates to the bundled scripts/hash-password.mjs. Can hash a provided password or generate + hash a random one. Output format is `salt:hash` (hex:hex), shell-safe. Used by add-auth for admin credentials. Never writes secrets to files. Not meant to be invoked directly by users.
- Reads credentials
In this repository88 other files it gives its agents.
- accessibilitySkill
- add-2faSkill
- add-agent-dashboardSkill
- add-aiSkill
- add-analyticsSkill
- add-authSkill
- add-automationSkill
- add-backup-dbSkill
- add-collabSkill
- add-cronSkill
- add-dark-modeSkill
- add-dbSkill
- add-domainSkill
- add-emailSkill
- add-github-authSkill
- add-google-authSkill
- add-i18nSkill
- _add-keyringSkill
- add-mapSkill
- add-notification-centerSkill
- add-push-notificationSkill
- add-pwaSkill
- add-roleSkill
- add-routineSkill
- add-storageSkill
- add-stripeSkill
- add-testSkill
- bootstrapSkill
- _check-depsSkill
- cleanSkill
- _collect-secretSkill
- _convert-to-turborepoSkill
- _create-agentSkill
- _create-cloudflare-workerSkill
- _create-contact-pageSkill
- _create-render-workerSkill
- _create-routineSkill
- _create-workflowSkill
- delete-projectSkill
- _detect-project-rootSkill
- _dns-brevoSkill
- _dns-cloudflareSkill
- _dns-gandiSkill
- _dns-godaddy-manualSkill
- _dns-hostingerSkill
- _dns-infomaniak-manualSkill
- _dns-ionos-manualSkill
- _dns-namecheapSkill
- _dns-ovhSkill
- _dns-porkbunSkill
- _dns-resendSkill
- _dns-squarespace-manualSkill
- eco-auditSkill
- _ensure-aiSkill
- _ensure-vaultSkill
- _generate-secretSkill
- geoSkill
- _get-secretSkill
- gscSkill
- _migrate-workersSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Use plain, non-technical business language.
- Distinctive: line 14
When generating user-facing content for the scaffolded project (UI labels, emails, copy), write it in the user's language too.
- Very specific: line 61
Always: use this helper (never inline scryptSync or bcrypt).
- Distinctive: line 62
Never write the plain password or the hash to a file.
- Distinctive: line 63
Never log hashes or passwords to stdout outside of the dedicated display-once moment.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill 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
Hash Password - Internal helper
Communication
- Detect the user's language from the conversation (the user's own messages, anywhere in the session - not just this invocation: a bare slash command like
/bootstrapcarries no language signal by itself). If nothing in the conversation gives a signal, fall back to the OS locale (node -e "console.log(Intl.DateTimeFormat().resolvedOptions().locale)") before defaulting to English. ALWAYS reply in that language for every user-facing message: questions, progress, confirmations, summaries, errors - including any example text quoted in this skill, which is illustrative and must be translated, never sent verbatim. - Use plain, non-technical business language. Never expose internal script names (*.mjs) or jargon; describe actions in human terms.
- When generating user-facing content for the scaffolded project (UI labels, emails, copy), write it in the user's language too.
- Show progress as a short natural-language checklist (in-progress and done states).
Hash a password with scrypt. Delegates to a bundled Node script - never reimplement inline.
Why scrypt, not bcrypt
bcrypt hashes contain $ (e.g. $2b$10$...). $ is interpreted by shells and mangled by vercel env add, causing silent corruption. scrypt hashes are plain salt:hash hex strings, fully shell-safe and env-var-safe.
If you see bcrypt hashes anywhere in the project ($2a$, $2b$, $2y$ prefixes), refuse and tell the user to rehash in scrypt first.
Invocation
Hash a provided password (password supplied via stdin - never via argv)
HASH=$(printf '%s' "Admin1234!" | node "${CLAUDE_SKILL_DIR}/../../scripts/hash-password.mjs")Returns a single line on stdout: salt:hash (both hex), no trailing newline. Capture it directly in a shell variable.
Generate a random password AND hash it
OUT=$(node "${CLAUDE_SKILL_DIR}/../../scripts/hash-password.mjs" --generate --length 24 --format alphanumeric)Returns two lines on stdout:
password=<plain password>
hash=<salt:hash>Parse them with grep '^password=' <<< "$OUT" / sed 's/^password=//' (or with OUT | awk -F= ...).
The caller must:
- Pass the
hashto_push-env-varsto store it in.envand Vercel. - Display the plain password ONCE to the user in the final summary, with a note that it's not stored anywhere else.
Defaults
--length 24for--generate(24 chars = ~143 bits of entropy, still typeable)--format alphanumericfor--generate(no special chars, comfortable in a terminal)
Rules
- Always use this helper (never inline
scryptSyncorbcrypt). - Never write the plain password or the hash to a file. Keep them in shell variables, pipe them to the next step.
- Never log hashes or passwords to stdout outside of the dedicated display-once moment.
- The scrypt parameters are
salt=16 bytes,keylen=64 bytes. Verification in the project uses the same params (insrc/lib/password.tscreated byadd-auth), withtimingSafeEqualto prevent timing attacks.
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.

