home / skills / aidotnet / moyucode / file-hasher
This skill helps you compute cryptographic hashes for files to verify integrity, detect duplicates, and generate checksums.
npx playbooks add skill aidotnet/moyucode --skill file-hasherReview the files below or copy the command above to add this skill to your agents.
---
name: file-hasher
description: 计算文件哈希值(MD5、SHA1、SHA256、SHA512)用于完整性验证和比较。
metadata:
short-description: 计算文件哈希值
source:
repository: https://github.com/python/cpython
license: PSF
---
# File Hasher Tool
## Description
Calculate cryptographic hashes for files to verify integrity, detect duplicates, or generate checksums.
## Trigger
- `/hash` command
- User needs file checksums
- User wants to verify file integrity
## Usage
```bash
# Calculate SHA256 hash
python scripts/file_hasher.py file.zip
# Calculate multiple hash types
python scripts/file_hasher.py file.zip --all
# Verify against known hash
python scripts/file_hasher.py file.zip --verify abc123...
# Hash multiple files
python scripts/file_hasher.py *.zip --algorithm sha256
# Find duplicate files
python scripts/file_hasher.py --find-duplicates ./folder/
```
## Tags
`hash`, `checksum`, `md5`, `sha256`, `integrity`
## Compatibility
- Codex: ✅
- Claude Code: ✅
This skill calculates cryptographic hashes (MD5, SHA-1, SHA-256, SHA-512) for files to support integrity checks, duplicate detection, and checksum generation. It is designed for quick command-style use and scripted workflows. Results can be used to verify downloads, compare versions, or build reproducible validation steps.
The tool reads files in streaming mode and computes one or more hash digests without loading entire files into memory. It supports single-file hashing, multiple algorithms, batch processing (wildcards), verification against a provided hash, and duplicate discovery within a directory. Output is presented as plain checksum strings paired with filenames to make integration and parsing straightforward.
Which algorithms are available?
MD5, SHA-1, SHA-256, and SHA-512 are supported; choose SHA-256 or SHA-512 for secure integrity checks.
Can I verify a file against a provided checksum?
Yes. A verify mode accepts a known hash string and returns match/mismatch so you can automate pass/fail logic.