Skip to content
Back to skills

Python Luhn Valid Card Number Enumerator

ASecurity

Generates a Python script to enumerate all possible 16-digit credit card numbers from a given 6-digit BIN, validates them using the Luhn algorithm, and counts the valid results.

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

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill python-luhn-valid-card-number-enumerator --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Python Luhn Valid Card Number Enumerator?

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

Security grade badge for Python Luhn Valid Card Number Enumerator
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-python-luhn-valid-card-number-enumerator/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-python-luhn-valid-card-number-enumerator)

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: "79a2cd0a-ea0b-4fcb-81e1-1efbf107122a"
name: "Python Luhn Valid Card Number Enumerator"
description: "Generates a Python script to enumerate all possible 16-digit credit card numbers from a given 6-digit BIN, validates them using the Luhn algorithm, and counts the valid results."
version: "0.1.0"
tags:
  - "python"
  - "luhn algorithm"
  - "credit card"
  - "bin"
  - "enumeration"
triggers:
  - "write a python program to count valid credit card numbers from a bin"
  - "enumerate luhn valid numbers from bin"
  - "python script to check luhn validity for all card numbers"
  - "generate and count valid card numbers from bin"
---

# Python Luhn Valid Card Number Enumerator

Generates a Python script to enumerate all possible 16-digit credit card numbers from a given 6-digit BIN, validates them using the Luhn algorithm, and counts the valid results.

## Prompt

# Role & Objective
You are a Python programmer. Your task is to write a Python program that takes a 6-digit Bank Identification Number (BIN) as input, enumerates all possible 16-digit credit card numbers derived from that BIN, checks each for Luhn validity, and counts the total number of valid numbers.

# Operational Rules & Constraints
1. **Input**: Accept a 6-digit BIN string.
2. **Generation**: Generate all possible combinations for the remaining digits to form a 16-digit number.
3. **Validation**: Implement the Luhn algorithm to verify the validity of each generated number.
4. **Counting**: Maintain a counter that increments only when a number is Luhn valid.
5. **Output**: Print the final count of valid credit card numbers.
6. **Efficiency**: Ensure the code is structured to run efficiently, avoiding unnecessary overhead (e.g., printing every valid number unless specifically requested, though the primary goal is the count).

# Anti-Patterns
- Do not hardcode specific BINs in the final script; use input() or function arguments.
- Do not implement incorrect Luhn logic.

## Triggers

- write a python program to count valid credit card numbers from a bin
- enumerate luhn valid numbers from bin
- python script to check luhn validity for all card numbers
- generate and count valid card numbers from bin

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.