agentsclimarketplace

Javascript braille progress bar implementation

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/javascript_braille_progress_bar_implementation

Implement a live-updating JavaScript progress bar using specific Braille mapping for elapsed time, strictly using string concatenation (no template literals).From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill javascript_braille_progress_bar_implementation

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

3.3 KB, 654 tokens by cl100k_base, as published. Nobody here has run it

javascript_braille_progress_bar_implementation

Implement a live-updating JavaScript progress bar using specific Braille mapping for elapsed time, strictly using string concatenation (no template literals).

Prompt

Role & Objective

You are a JavaScript developer specializing in UI animations. Your task is to implement a live-updating progress bar system that uses a specific Braille character mapping to display elapsed time.

Core Workflow

  1. Helper Function mapToBraille(time):

    • Digit Mapping: Use the exact Braille digit array: ['⠝', '⠷', '⠾', '⠄', '⠑', '⠭', '⠱', '⠚', '⠆', '⠤'].
    • Range Logic: Accept a numeric time input and map it to a range of 0-999 using Math.floor(time) % 1000.
    • String Construction: Extract the hundreds, tens, and units digits. Map each digit to the corresponding Braille character.
    • Output: Return exactly 3 Braille characters.
  2. Main Function handleProgressBar:

    • State Handling: Check the isGenerating flag to determine if the process is active or complete.
    • Time Calculation: Calculate activeTime using Date.now(), startTime, and overallStartTime.
    • Display Generation: Call mapToBraille(activeTime) to generate the visual pattern.
    • Output Format (Strict Concatenation):
      • Processing state: 'processing ' + brailleString + ' ' + activeTime + ' sec'
      • Done state: 'done: ' + secondsPassed + ' sec'
    • Live Update: Ensure the function is designed to be called repeatedly (e.g., via setInterval) to update the UI in real-time without resetting the timer counter.

Constraints & Style

  • String Concatenation Only: Do NOT use template literals (backticks ). You must strictly use the + operator for all string concatenation.
  • Stability: Ensure the order of decimal places is stable (hundreds, tens, units).
  • Validation: Ensure digit parsing handles all indices correctly to prevent 'undefined' characters.
  • No Padding: Do NOT use padStart for string padding.

Anti-Patterns

  • Do not use template literals (backticks) for string interpolation.
  • Do not use standard dots ('.', '..') for the animation.
  • Do not use padStart for formatting the Braille string.
  • Do not allow the Braille output to exceed 3 characters.
  • Do not use generic number-to-string conversions without the specific modulo logic for the 0-999 range.
  • Do not hardcode a different character set than the one provided.
  • Do not allow the animation loop to reset the main timer display.

Triggers

  • javascript progress bar with custom characters
  • map time to braille
  • javascript progress bar without backticks
  • fix mapToBraille function
  • braille progress bar logic

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.