mcpField
P
password-generator

password-generator

github.com/dkyazzentwatwaSecurity12455 installsUpdated 29w ago
Repository

About password-generator

A Python password-generation skill for people who need customizable passwords or passphrases. It uses cryptographic randomness and includes strength checks and batch output.

Key features

  1. 01Cryptographically secure random generation
  2. 02Custom character sets and requirements
  3. 03Word-based passphrases
  4. 04Password strength checks
  5. 05Bulk generation and CSV output
  6. 06Pronounceable password generation

Use cases

  1. 01Create passwords with specified length and character rules
  2. 02Generate memorable passphrases
  3. 03Check a password’s estimated strength
  4. 04Prepare password batches for a team

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/dkyazzentwatwa/chatgpt-skills --skill password-generator

After installing, type/password-generatorin Claude Code to confirm it loaded.

Bundled filesscripts/password_gen.pyscripts/requirements.txt

Details

From the project README

Password Generator

Generate cryptographically secure passwords and memorable passphrases. Customize character sets, length, and rules. Includes strength checking and bulk generation.

Quick Start

from scripts.password_gen import PasswordGenerator

# Generate password
gen = PasswordGenerator()
password = gen.generate(length=16)
print(password)  # "K#9mPx$vL2nQ@8wR"

# Generate passphrase
passphrase = gen.passphrase(words=4)
print(passphrase)  # "correct-horse-battery-staple"

Features

  • Secure Generation: Uses cryptographically secure random
  • Custom Rules: Character sets, required types, exclusions
  • Passphrases: Word-based memorable passwords
  • Strength Check: Evaluate password strength
  • Bulk Generation: Generate multiple passwords
  • Pronounceable: Generate easier-to-type passwords

API Reference

Basic Generation
gen = PasswordGenerator()

# Default (16 chars, mixed)
password = gen.generate()

# Custom length
password = gen.generate(length=24)
Character Options
# Include/exclude character types
password = gen.generate(
    length=16,
    uppercase=True,
    lowercase=True,
    digits=True,
    symbols=True
)

# Exclude ambiguous characters (0, O, l, 1, etc.)
password = gen.generate(length=16, exclude_ambiguous=True)

# Custom character set
password = gen.generate(length=16, charset="abc123!@#")

# Exclude specific characters
password = gen.generate(length=16, exclude="{}[]")
Requirements
# Require at least N of each type
password = gen.generate(
    length=16,
    min_uppercase=2,
    min_lowercase=2,
    min_digits=2,
    min_symbols=2
)
Passphrases
# Word-based passphrase
passphrase = gen.passphrase(words=4)
# "correct-horse-battery-staple"

# Custom separator
passphrase = gen.passphrase(words=4, separator="_")
# "correct_horse_battery_staple"

# With number
passphrase = gen.passphrase(words=3, include_number=True)
# "correct-horse-42-battery"

# Capitalize words
passphrase = gen.passphrase(words=4, capitalize=True)
# "Correct-Horse-Battery-Staple"
Strength Check
strength = gen.check_strength("MyP@ssw0rd!")
# {
#     'score': 3,           # 0-4 scale
#     'label': 'Strong',    # Weak, Fair, Good, Strong, Very Strong
#     'entropy': 65.2,      # Bits of entropy
#     'feedback': ['Good length', 'Has symbols']
# }
Bulk Generation
# Generate multiple passwords
passwords = gen.generate_bulk(count=10, length=16)

# To CSV
gen.generate_to_csv("passwords.csv", count=100, length=20)

CLI Usage

# Generate single password
python password_gen.py --length 16

# Generate passphrase
python password_gen.py --passphrase --words 4

# Custom options
python password_gen.py --length 20 --no-symbols --exclude-ambiguous

# Bulk generate
python password_gen.py --count 10 --length 16

# Check strength
python password_gen.py --check "MyPassword123!"

# Generate to file
python password_gen.py --count 100 --output passwords.txt
CLI Arguments
ArgumentDescriptionDefault
--lengthPassword length16
--countNumber to generate1
--passphraseGenerate passphraseFalse
--wordsWords in passphrase4
--no-uppercaseExclude uppercaseFalse
--no-lowercaseExclude lowercaseFalse
--no-digitsExclude digitsFalse
--no-symbolsExclude symbolsFalse
--exclude-ambiguousExclude 0, O, l, 1False
--checkCheck password strength-
--outputOutput file-

Examples

Strong Random Password
gen = PasswordGenerator()
password = gen.generate(
    length=20,
    min_uppercase=2,
    min_lowercase=2,
    min_digits=2,
    min_symbols=2
)
print(f"Password: {password}")
print(f"Strength: {gen.check_strength(password)['label']}")
Memorable Passphrase
gen = PasswordGenerator()
passphrase = gen.passphrase(
    words=4,
    capitalize=True,
    include_number=True,
    separator="-"
)
print(passphrase)
# "Tiger-Mountain-42-Sunset-Lake"
PIN Generation
gen = PasswordGenerator()
pin = gen.generate(
    length=6,
    uppercase=False,
    lowercase=False,
    digits=True,
    symbols=False
)
print(f"PIN: {pin}")  # "847291"
Batch for Team
gen = PasswordGenerator()

# Generate passwords for new team members
team = ["alice", "bob", "charlie"]
for member in team:
    password = gen.generate(length=16)
    print(f"{member}: {password}")

Strength Scoring

ScoreLabelDescription
0Very Weak< 28 bits entropy
1Weak28-35 bits
2Fair36-59 bits
3Strong60-127 bits
4Very Strong128+ bits

Dependencies

(No external dependencies - uses Python standard library)

Security Notes

  • Uses secrets module for cryptographic randomness
  • Never logs or stores generated passwords
  • Passphrase wordlist is embedded (no external calls)
  • Strength check is local (no external API)

Comments

Markdown supported