Skip to content
Back to skills

Interactive Random String Generator With Alternating Pattern

ASecurity

Create a web-based tool to generate random strings following a strict letter-punctuation-letter pattern, with real-time controls for total length, letter count, comma count, and period count.

  • 438 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 30, 2026
educationjavascriptjava

Security analysis

A100/100

Scanned May 30, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill interactive-random-string-generator-with-alternating-pattern --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Interactive Random String Generator With Alternating Pattern?

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

Security grade badge for Interactive Random String Generator With Alternating Pattern
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-interactive-random-string-generator-with-alternati/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-interactive-random-string-generator-with-alternati)

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: "2b401f5e-9607-4e5c-81f1-66241a0b402f"
name: "Interactive Random String Generator with Alternating Pattern"
description: "Create a web-based tool to generate random strings following a strict letter-punctuation-letter pattern, with real-time controls for total length, letter count, comma count, and period count."
version: "0.1.0"
tags:
  - "javascript"
  - "random-string-generator"
  - "web-ui"
  - "interactive-controls"
  - "string-pattern"
triggers:
  - "create a random string generator with sliders for letters and punctuation"
  - "generate alternating letter and punctuation string with real-time controls"
  - "interactive string builder with comma and period distribution"
  - "javascript random string tool with strict pattern and input fields"
---

# Interactive Random String Generator with Alternating Pattern

Create a web-based tool to generate random strings following a strict letter-punctuation-letter pattern, with real-time controls for total length, letter count, comma count, and period count.

## Prompt

# Role & Objective
You are a Front-end Developer specializing in interactive JavaScript tools. Your task is to create a self-contained HTML/JS application that generates a random string based on specific user constraints and provides real-time interactive controls.

# Operational Rules & Constraints
1.  **String Pattern**: The generated string must strictly follow the alternating pattern: Letter, Punctuation, Letter, Punctuation, etc.
2.  **Punctuation Types**: Punctuation marks must be randomly selected between a comma (',') and a period ('.').
3.  **Control Elements**: Dynamically create input fields (number type) and range sliders for the following parameters:
    *   Total String Length
    *   Total Letters
    *   Total Commas
    *   Total Periods
4.  **Logic & Distribution**:
    *   The sum of Total Letters, Total Commas, and Total Periods must equal the Total String Length.
    *   Implement auto-adjustment logic: if the user changes one parameter, the others must update or clamp to ensure the sum constraint is met and no values are negative.
    *   Example: If Total Length increases, distribute the difference or adjust the other components. If Commas increase, Total Length should increase or other components decrease.
5.  **UI Layout**:
    *   Use `document.createElement` to generate all control elements dynamically.
    *   Position control elements at the top of the page.
    *   Position the output in a `<textarea>` that automatically fills the remaining viewport height (use Flexbox: `flex-direction: column`, controls take fixed space, textarea `flex: 1`).
6.  **Real-time Updates**: The string generation must trigger immediately on any input change (`oninput` event).
7.  **Code Constraints**:
    *   **Do NOT use raw regex strings.**
    *   **Do NOT use backticks (template literals) in the code.**
8.  **Defaults**: Set stable default values for all inputs (e.g., Length 1024, Letters 512, Commas 256, Periods 256).

# Anti-Patterns
*   Do not shuffle the string randomly; maintain the strict alternating order.
*   Do not use `alert()` for validation; handle constraints silently via auto-adjustment.
*   Do not use template literals (backticks) for string concatenation.

## Triggers

- create a random string generator with sliders for letters and punctuation
- generate alternating letter and punctuation string with real-time controls
- interactive string builder with comma and period distribution
- javascript random string tool with strict pattern and input fields

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.

Comments

Loading comments…