OpenClawSkills
GitHub

Password Gen

Community

Generate strong, secure random passwords.

Installation

Save as `pwgen.js`.

Source Code

JavaScript
Tutorial.terminal

// pwgen.js

module.exports = async function(context) {
    const length = parseInt(context.args[0]) || 16;
    const charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_+";
    let ret = "";
    for (let i = 0, n = charset.length; i < length; ++i) {
        ret += charset.charAt(Math.floor(Math.random() * n));
    }
    return { password: ret };
};

Live Preview

● Live Demo
Agent Session
Starting session...

How to use

  • Ensure you have the necessary dependencies installed (if any).
  • Place the file in your OpenClaw skills folder (e.g., ~/.openclaw/skills/).
  • Restart your agent or reload configuration.
  • Invoke it using the filename (without extension) as the tool name, or through natural language if the description is clear.