file-hasher

Compute, verify, and compare file hashes using MD5, SHA-1, SHA-256, SHA-512, and more. Use when checking file integrity, verifying downloads against expected checksums, comparing files for equality, generating checksums for directories, hashing strings, or validating checksum files (sha256sum/md5sum format). Supports BSD and standard output formats, JSON output, multi-algorithm hashing, and recursive directory scanning. No external dependencies.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "file-hasher" with this command: npx skills add Johnnywang2001/file-hasher

File Hasher

Compute, verify, and compare file hashes. Supports all hashlib algorithms. Zero dependencies.

Quick Start

# Hash a file (SHA-256)
python3 scripts/file_hasher.py hash myfile.txt

# Verify a download
python3 scripts/file_hasher.py verify image.iso -e abc123def456...

# Compare two files
python3 scripts/file_hasher.py compare file1.txt file2.txt

Commands

hash

Compute file hash with one or more algorithms:

python3 scripts/file_hasher.py hash file.txt                        # SHA-256
python3 scripts/file_hasher.py hash file.txt -a md5                 # MD5
python3 scripts/file_hasher.py hash file.txt -a md5,sha1,sha256     # Multiple
python3 scripts/file_hasher.py hash *.py --bsd                      # BSD format
python3 scripts/file_hasher.py hash data.bin --json                 # JSON output

verify

Check a file against an expected hash:

python3 scripts/file_hasher.py verify image.iso -e <expected_hash>
python3 scripts/file_hasher.py verify file.tar.gz -e <hash> -a sha512

Exit code 0 = match, 1 = mismatch.

check

Verify files from a checksum file (sha256sum/md5sum/BSD format):

python3 scripts/file_hasher.py check SHA256SUMS
python3 scripts/file_hasher.py check checksums.txt -a md5

Auto-detects algorithm from hash length and BSD format headers.

compare

Compare two files by hash:

python3 scripts/file_hasher.py compare original.bin copy.bin
python3 scripts/file_hasher.py compare a.txt b.txt -a md5

directory

Hash all files in a directory:

python3 scripts/file_hasher.py directory ./src                  # Top level
python3 scripts/file_hasher.py directory ./project -r           # Recursive
python3 scripts/file_hasher.py directory ./dist -r --bsd -a md5 # BSD + MD5

string

Hash a text string directly:

python3 scripts/file_hasher.py string "hello world"
python3 scripts/file_hasher.py string "password" -a md5,sha256,sha512

algorithms

List all available hash algorithms:

python3 scripts/file_hasher.py algorithms

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Maintenance

Maintenance makes home management simple. Record, search, and analyze your data with clear terminal output.

Registry SourceRecently Updated
General

ManualExpert

Professional translator for hardware and technical manuals delivering complete, page-by-page bilingual tables and Word exports for accurate DTP preparation.

Registry SourceRecently Updated
General

Semantic Router

让 AI 代理根据对话内容自动选择最合适的模型。四层识别(系统过滤→关键词→指示词→语义相似度),四池架构(高速/智能/人文/代理),五分支路由,全自动 Fallback 回路。支持 trigger_groups_all 非连续词组命中。

Registry SourceRecently Updated
General

Campaign

Campaign - command-line tool for everyday use

Registry SourceRecently Updated