Calculate Hash
Google AI EdgeOfficialPublished by Google AI Edge
- Skill
- Tool integration
- Software development
- Apache-2.0
- Low risk
- Has scripts
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The calculate-hash skill provides a straightforward mechanism to compute the hash of any given text string. By leveraging a specific JavaScript execution environment, it processes input text and returns the corresponding hash value, facilitating data integrity checks or identifier generation.
What it does
- Computes a hash value for a specified text string.
- Uses a dedicated script to perform the hashing operation.
- Accepts input text via a structured JSON format.
When to use it
- When you need to generate a unique hash for a piece of text.
- When performing data verification or creating identifiers.
- When you require a programmatic way to hash strings within an agent workflow.
Advantages
- Provides a consistent and repeatable hashing process.
- Simple integration into existing agent workflows.
- Supports arbitrary text input for flexible use cases.
Usage examples
- “Calculate hash of 'hello world'”
- The agent returns the computed hash value for the string 'hello world'.
- “What is the hash of the text 'data-integrity-check'?”
- The agent processes the text and provides the resulting hash string.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/google-ai-edge/calculate-hash/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip calculate-hash.zip -d .agents/skills
Documentation by Google AI Edge
Calculate hash
This skill calculates the hash of a given text.
Examples
"Calculate hash of..."
"What is the hash of..."
Instructions
Call the run_js tool with the following exact parameters:
script name:
index.htmldata: A JSON string with the following field
text: the text to calculate hash for
Files
- ATTRIBUTION.mdAdded by AutoGineer899 B
- LICENSELicence file added by AutoGineer11.1 KiB
- SKILL.md406 B
- scripts/index.html959 B
- scripts/index.jsScript1.3 KiB
scripts/index.js
/*
* Copyright 2026 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
async function digestMessage(message) {
const msgUint8 = new TextEncoder().encode(message); // encode as (utf-8) Uint8Array
const hashBuffer = await crypto.subtle.digest('SHA-1', msgUint8); // hash the message
const hashArray = Array.from(new Uint8Array(hashBuffer)); // convert buffer to byte array
const hashHex = hashArray
.map((b) => b.toString(16).padStart(2, '0'))
.join(''); // convert bytes to hex string
return {result: hashHex};
}
window['ai_edge_gallery_get_result'] = async (data) => {
try {
const jsonData = JSON.parse(data);
return JSON.stringify(await digestMessage(jsonData['text']));
} catch (e) {
console.error(e);
return JSON.stringify({error: `Failed to calculate hash: ${e.message}`});
}
};
Requirements and compatibility
Written for: Google AI Edge Gallery
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs Node.js
Security
What our scanner noticed· Low risk
- Scripts that your agent may run
This skill includes scripts that your agent may run. Read them before you use it.
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Google AI Edge
- Publisher
- Google AI Edge (Official)
- Source
- google-ai-edge/gallery · skills/built-in/calculate-hash · commit 3972f06
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Google AI Edge.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download calculate-hash.zip