Basic Arithmetic — Formal Specification

Generate randomized arithmetic quiz questions and validate integer answers via API.

Updated Mar 14, 2026
One-click install
npx skills add https://github.com/sudarshansudarshan/tenali --skill basic-arithmetic-formal-specification
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Basic Arithmetic — Formal Specification
Source: https://github.com/sudarshansudarshan/tenali/tree/main/supermarket/basicarith
Command: npx skills add https://github.com/sudarshansudarshan/tenali --skill basic-arithmetic-formal-specification

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a deterministic server-backed quiz generator and validator to practice and assess basic arithmetic skills involving addition, subtraction, and multiplication with positive and negative integers.

Core Features & Use Cases

  • Randomized Question Generation: Generates questions at three difficulty levels (easy, medium, hard) with a 40% independent negation chance per operand.
  • Server Validation & API: Offers /basicarith-api/question to fetch JSON-formatted questions and /basicarith-api/check to validate integer answers by recomputing results.
  • Gameplay UX: Includes on-screen NumPad, global keyboard shortcuts, a timer, auto-advance on correct answers, and a results table for review; useful for classroom practice, self-assessment, or timed drills.

Quick Start

Start a medium 10-question quiz that includes negative numbers and mixed operators.

Frequently Asked Questions about Basic Arithmetic — Formal Specification

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I practice arithmetic with negative numbers?

You can practice arithmetic with negative numbers using randomized quiz questions that apply a 40% independent negation chance per operand. The Skill generates mixed addition, subtraction, and multiplication problems across easy, medium, and hard difficulty levels for classroom or self-assessment drills.

Can I fetch randomized arithmetic quiz questions through an API?

Yes, you can fetch randomized arithmetic quiz questions via the /basicarith-api/question endpoint, which returns JSON objects containing id, a, b, op, prompt, and answer. The /basicarith-api/check endpoint validates integer answers by recomputing results using +, U+2212, and U+00D7 operators.

Does the arithmetic quiz support an on-screen NumPad and timer?

Yes, the arithmetic quiz supports an on-screen NumPad, global keyboard shortcuts, a timer, and auto-advance on correct answers. It also provides a results table for review, making it suitable for timed classroom drills or self-assessment.

What is the best way to validate integer answers for basic arithmetic operations?

The best way to validate integer answers is using the /basicarith-api/check endpoint, which recomputes results using +, U+2212, and U+00D7 operators and compares Number(answer) for exact integer matches. This ensures deterministic server-backed validation.

Are there limitations on the arithmetic operations supported by the quiz?

The quiz is limited to addition, subtraction, and multiplication operations; it does not support division. Questions are restricted to integer operands and exact integer matches, with no fractional or decimal answer validation available.