mcpField
J
javascript-ui-math

javascript-ui-math

github.com/lvtd-llcDevelopment142 installsUpdated 7w ago
Repository

About javascript-ui-math

javascript-ui-math is a skill for handling numeric behavior in browser JavaScript. It offers rules, examples, reusable patterns, and a debugging workflow for edge cases such as coercion, precision, rounding, modulo, randomization, and BigInt.

Key features

  1. 01Handles JavaScript numeric edge cases
  2. 02Covers coercion and precision
  3. 03Guidance for modulo and rounding
  4. 04Addresses randomization and BigInt
  5. 05Includes examples and debugging workflow

Use cases

  1. 01Debugging browser calculations with unexpected results
  2. 02Choosing rounding or modulo behavior in UI code
  3. 03Reviewing numeric logic that uses BigInt or randomness

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/lvtd-llc/skills --skill javascript-ui-math

After installing, type/javascript-ui-mathin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

guidelines.md
agents/
openai.yaml
references/
source-map.md
references/ui-numbers/
checklist.md
examples.md
knowledge.md
patterns.md
rules.md
workflows/
debug-ui-number-logic.md

Details

From the project README

JavaScript UI Math

Use this skill for numeric browser behavior that needs predictable edge-case handling. It helps avoid common JavaScript traps around coercion, precision, modulo behavior, rounding, randomization, and BigInt.

Quick Start

  1. Read guidelines.md to select the smallest relevant file set.
  2. Load references/ui-numbers/rules.md for implementation decisions.
  3. Load references/ui-numbers/examples.md when editing code.
  4. Use workflows/debug-ui-number-logic.md for multi-step derivation or debugging.

Contents

ResourcePurpose
guidelines.mdRoutes tasks to the right reference files
references/source-map.mdBook source and chapter/section traceability
references/ui-numbers/knowledge.mdCore concepts and terminology
references/ui-numbers/rules.mdPractical rules, guidelines, and exceptions
references/ui-numbers/examples.mdBad/good examples and refactoring approach
references/ui-numbers/patterns.mdReusable formula and implementation patterns
references/ui-numbers/checklist.mdReview checklist and red flags
workflows/debug-ui-number-logic.mdStep-by-step workflow

Source

Derived from Math for Web Design by Paul McFedries, Chapter 2: Math basics for JavaScript. Citations are tracked in references/source-map.md.

Comments

Markdown supported