← Back to Skills Marketplace
Hash Toolkit
by
raghulpasupathi
· GitHub ↗
· v1.0.0
642
Downloads
0
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install hash-toolkit
Description
Content hashing for deduplication with MD5, SHA256, and perceptual hashing
README (SKILL.md)
Hash Toolkit
Multi-algorithm hashing for content deduplication and verification.
Implementation
const crypto = require('crypto');
/**
* Generate hash using specified algorithm
* @param {string|Buffer} content - Content to hash
* @param {string} algorithm - Hash algorithm
* @returns {string} Hash string
*/
function generateHash(content, algorithm = 'sha256') {
const hash = crypto.createHash(algorithm);
hash.update(Buffer.isBuffer(content) ? content : String(content));
return hash.digest('hex');
}
/**
* Generate multiple hashes at once
*/
function generateMultipleHashes(content) {
return {
md5: generateHash(content, 'md5'),
sha1: generateHash(content, 'sha1'),
sha256: generateHash(content, 'sha256'),
sha512: generateHash(content, 'sha512').substring(0, 32) // Truncated
};
}
/**
* Generate perceptual hash (for images/content similarity)
* Simplified implementation
*/
function generatePerceptualHash(content) {
// Simplified perceptual hash
// In production: use actual perceptual hashing algorithm
const normalized = String(content).toLowerCase().replace(/\s+/g, ' ');
return generateHash(normalized, 'sha256').substring(0, 16);
}
/**
* Check if content is duplicate based on hash
*/
function checkDuplicate(contentHash, knownHashes) {
return {
isDuplicate: knownHashes.has(contentHash),
hash: contentHash,
algorithm: 'sha256'
};
}
/**
* Calculate similarity between two hashes
* (for perceptual hashes)
*/
function calculateHashSimilarity(hash1, hash2) {
if (hash1.length !== hash2.length) return 0;
let matches = 0;
for (let i = 0; i \x3C hash1.length; i++) {
if (hash1[i] === hash2[i]) matches++;
}
return matches / hash1.length;
}
// Export for OpenClaw
module.exports = {
generateHash,
generateMultipleHashes,
generatePerceptualHash,
checkDuplicate,
calculateHashSimilarity
};
Usage
// Generate SHA256 hash
const hash = skills.hashToolkit.generateHash(content, 'sha256');
// Generate multiple hashes
const hashes = skills.hashToolkit.generateMultipleHashes(content);
console.log(hashes.md5, hashes.sha256);
// Check for duplicates
const knownHashes = new Set(['abc123...']);
const result = skills.hashToolkit.checkDuplicate(hash, knownHashes);
if (result.isDuplicate) {
console.log('Duplicate content detected');
}
// Perceptual hash for similarity
const phash = skills.hashToolkit.generatePerceptualHash(imageData);
Configuration
{
"defaultAlgorithm": "sha256",
"enablePerceptual": true
}
Usage Guidance
This skill appears to do what it says: local hashing and simple deduplication helpers. It does not request credentials or install software. Before using in production, note these caveats: MD5 and SHA-1 are cryptographically weak — avoid them for security-sensitive integrity or auth; the sha512 result is truncated which reduces entropy and could cause more collisions; the perceptual-hash implementation is only a placeholder and is not suitable for image-similarity detection — use a dedicated pHash/dHash/aHash library; similarity comparison operates on hex characters rather than bit-level Hamming distance. If you need cryptographic guarantees or reliable perceptual matching, replace the placeholder methods with vetted libraries and test on representative data.
Capability Analysis
Type: OpenClaw Skill
Name: hash-toolkit
Version: 1.0.0
The skill bundle provides standard hashing functionalities (MD5, SHA256, etc.) using Node.js's built-in `crypto` module. The code strictly adheres to its stated purpose, performing only cryptographic hashing and comparisons. There are no file system operations, network calls, environment variable access, or child process executions. The `SKILL.md` content is purely descriptive and lacks any prompt injection attempts or instructions for the AI agent to perform malicious actions. The direct use of the `algorithm` parameter in `crypto.createHash()` is a standard design for a hashing utility and does not present a meaningful security risk within the skill itself.
Capability Assessment
Purpose & Capability
Name and description (content hashing, MD5/SHA256, perceptual hashing) match the SKILL.md content. The examples and exported functions implement hashing and duplicate checks; no unrelated binaries, env vars, or external services are requested.
Instruction Scope
All instructions and code are local and self-contained. However, the perceptual hash is a placeholder (lowercasing and hashing) and will not produce meaningful image perceptual hashes; calculateHashSimilarity compares hex-character equality rather than bitwise Hamming distance. generateMultipleHashes includes weaker algorithms (md5, sha1) and truncates sha512 to 32 hex chars, which may mislead users about strength.
Install Mechanism
Instruction-only skill with no install spec and no external downloads. No code is written to disk by an installer. Low installation risk.
Credentials
No environment variables, credentials, or config paths are requested. The required surface is proportional to the stated purpose.
Persistence & Privilege
Does not request always-on inclusion, does not modify other skills or system settings. Normal agent-invocation defaults apply.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install hash-toolkit - After installation, invoke the skill by name or use
/hash-toolkit - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
- Initial release of Hash Toolkit (v1.0.0)
- Provides content hashing with MD5, SHA1, SHA256, and SHA512 algorithms
- Includes simplified perceptual hashing for content similarity detection
- Supports checking for duplicate content using hash comparison
- Exposes utility functions: generateHash, generateMultipleHashes, generatePerceptualHash, checkDuplicate, and calculateHashSimilarity
Metadata
Frequently Asked Questions
What is Hash Toolkit?
Content hashing for deduplication with MD5, SHA256, and perceptual hashing. It is an AI Agent Skill for Claude Code / OpenClaw, with 642 downloads so far.
How do I install Hash Toolkit?
Run "/install hash-toolkit" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Hash Toolkit free?
Yes, Hash Toolkit is completely free (open-source). You can download, install and use it at no cost.
Which platforms does Hash Toolkit support?
Hash Toolkit is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Hash Toolkit?
It is built and maintained by raghulpasupathi (@raghulpasupathi); the current version is v1.0.0.
More Skills