Agent Skills: Number Theory Toolkit Skill

Provide number theory algorithm implementations and guidance

UncategorizedID: a5c-ai/babysitter/number-theory-toolkit

Install this agent skill to your local

pnpm dlx add-skill https://github.com/a5c-ai/babysitter/tree/HEAD/plugins/babysitter/skills/babysit/process/specializations/algorithms-optimization/skills/number-theory-toolkit

Skill Files

Browse the full folder contents for number-theory-toolkit.

Download Skill

Loading file tree…

plugins/babysitter/skills/babysit/process/specializations/algorithms-optimization/skills/number-theory-toolkit/SKILL.md

Skill Metadata

Name
number-theory-toolkit
Description
Provide number theory algorithm implementations and guidance

Number Theory Toolkit Skill

Purpose

Provide implementations and guidance for number theory algorithms commonly used in competitive programming.

Capabilities

  • Modular arithmetic operations
  • Extended Euclidean algorithm
  • Chinese Remainder Theorem
  • Modular inverse and exponentiation
  • FFT/NTT for polynomial multiplication
  • Linear sieve implementations

Target Processes

  • number-theory-algorithms
  • prime-algorithms
  • combinatorics-counting

Algorithm Catalog

Modular Arithmetic

  • Modular exponentiation (binary exp)
  • Modular inverse (Fermat/Extended GCD)
  • Modular square root (Tonelli-Shanks)

GCD and Extensions

  • Euclidean algorithm
  • Extended Euclidean algorithm
  • Linear Diophantine equations

Chinese Remainder Theorem

  • CRT for coprime moduli
  • General CRT

FFT/NTT

  • Fast Fourier Transform
  • Number Theoretic Transform
  • Polynomial multiplication

Input Schema

{
  "type": "object",
  "properties": {
    "algorithm": { "type": "string" },
    "parameters": { "type": "object" },
    "language": {
      "type": "string",
      "enum": ["cpp", "python", "java"]
    },
    "modulo": { "type": "integer" }
  },
  "required": ["algorithm"]
}

Output Schema

{
  "type": "object",
  "properties": {
    "success": { "type": "boolean" },
    "code": { "type": "string" },
    "explanation": { "type": "string" },
    "complexity": { "type": "string" }
  },
  "required": ["success"]
}