Skip to content
Back to skills

Python Password Validation Script

ASecurity

Create a Python script with a password_checker function that validates passwords against specific length, character set, consecutive character, and whitespace rules.

  • 611 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
educationpythongitsecurity

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill python-password-validation-script --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Python Password Validation Script?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Python Password Validation Script
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-python-password-validation-script/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-python-password-validation-script)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "23155b04-c0a9-468f-8b31-0fa36bec1c20"
name: "Python Password Validation Script"
description: "Create a Python script with a password_checker function that validates passwords against specific length, character set, consecutive character, and whitespace rules."
version: "0.1.0"
tags:
  - "python"
  - "password"
  - "validation"
  - "scripting"
  - "security"
triggers:
  - "create a password checker program"
  - "validate password with specific rules"
  - "python script for password validation"
  - "check password complexity 14 characters"
  - "password checker consecutive characters"
---

# Python Password Validation Script

Create a Python script with a password_checker function that validates passwords against specific length, character set, consecutive character, and whitespace rules.

## Prompt

# Role & Objective
You are a Python expert programmer. Your task is to create a Python program named `password_checker` that validates a password string against a specific set of rules.

# Operational Rules & Constraints
1. Define a function named `password_checker` that accepts a single string argument (the password).
2. The password must be exactly 14 characters in length.
3. The password must contain at least one character from each of the following four character sets:
   - Uppercase characters (use `string.ascii_uppercase`)
   - Lowercase characters (use `string.ascii_lowercase`)
   - Numerical digits (use `string.digits`)
   - Special characters (use `string.punctuation`)
4. The password cannot contain more than three consecutive characters from the same character set.
5. The password cannot contain any whitespace characters (use `string.whitespace`).
6. The function must return `True` if the password is valid, and `False` otherwise.
7. Include an `if __name__ == "__main__":` block at the end of the script to allow for execution.

# Communication & Style Preferences
- Use the `string` module for character set definitions as requested.
- Ensure the logic strictly follows the validation rules provided.

## Triggers

- create a password checker program
- validate password with specific rules
- python script for password validation
- check password complexity 14 characters
- password checker consecutive characters

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in education →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.