{
  "schemaVersion": "1.0",
  "item": {
    "slug": "maths",
    "name": "Pywayne Maths",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/wangyendt/maths",
    "canonicalUrl": "https://clawhub.ai/wangyendt/maths",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/maths",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=maths",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "slug": "maths",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T16:05:26.014Z",
      "expiresAt": "2026-05-14T16:05:26.014Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=maths",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=maths",
        "contentDisposition": "attachment; filename=\"maths-0.1.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "maths"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/maths"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/maths",
    "agentPageUrl": "https://openagent3.xyz/skills/maths/agent",
    "manifestUrl": "https://openagent3.xyz/skills/maths/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/maths/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Pywayne Maths",
        "body": "Mathematical utility functions for number theory, digit analysis, and optimized integer operations."
      },
      {
        "title": "Quick Start",
        "body": "from pywayne.maths import get_all_factors, digitCount, karatsuba_multiplication\n\n# Get all factors of a number\nfactors = get_all_factors(28)\nprint(factors)  # [1, 2, 4, 7, 14, 28]\n\n# Count digit occurrences\ncount = digitCount(100, 1)\nprint(count)  # 21 (digit 1 appears 21 times in 1-100)\n\n# Large integer multiplication\nproduct = karatsuba_multiplication(1234, 5678)\nprint(product)  # 7006652"
      },
      {
        "title": "get_all_factors",
        "body": "Return all factors of a positive integer.\n\nget_all_factors(n: int) -> list\n\nParameters:\n\nn - Positive integer to factorize\n\nReturns:\n\nList of all factors of n\n\nUse Cases:\n\nNumber theory problems\nFinding divisors\nSimplifying fractions\nGreatest common divisor (GCD) calculation\n\nExample:\n\nfrom pywayne.maths import get_all_factors\n\nfactors = get_all_factors(36)\nprint(factors)  # [1, 2, 3, 4, 6, 9, 12, 18, 36]\n\n# Check if number is prime\nn = 17\nfactors = get_all_factors(n)\nif len(factors) == 2:  # Only 1 and itself\n    print(f\"{n} is prime\")\nelse:\n    print(f\"{n} is not prime\")"
      },
      {
        "title": "digitCount",
        "body": "Count occurrences of digit k from 1 to n.\n\ndigitCount(n, k) -> int\n\nParameters:\n\nn - Positive integer, upper bound of counting range\nk - Digit to count (0-9)\n\nReturns:\n\nCount of digit k in range [1, n]\n\nSpecial Case:\n\nWhen k = 0, counts all numbers with trailing zeros after n\n\nUse Cases:\n\nDigit frequency analysis\nNumber theory problems\nData analysis tasks\n\nExample:\n\nfrom pywayne.maths import digitCount\n\n# Count digit 1 from 1 to 100\ncount = digitCount(100, 1)\nprint(count)  # 21\n\n# Count each digit 0-9 in range 1-1000\nfor k in range(10):\n    count = digitCount(1000, k)\n    print(f\"Digit {k}: {count} times\")"
      },
      {
        "title": "karatsuba_multiplication",
        "body": "Multiply two integers using Karatsuba's divide-and-conquer algorithm.\n\nkaratsuba_multiplication(x: int, y: int) -> int\n\nParameters:\n\nx - Integer multiplier\ny - Integer multiplicand\n\nReturns:\n\nProduct of x and y\n\nAlgorithm:\n\nKaratsuba algorithm uses recursive divide-and-conquer to multiply large integers\nTime complexity: O(n^log₂3) ≈ O(n^1.585)\nMore efficient than naive multiplication O(n²) for very large numbers\n\nUse Cases:\n\nLarge integer multiplication\nAlgorithm optimization\nCompetitive programming\nCryptography applications\n\nExample:\n\nfrom pywayne.maths import karatsuba_multiplication\n\n# Compare with standard multiplication\na, b = 123456789, 987654321\nresult = karatsuba_multiplication(a, b)\nprint(result)  # 121932631112635269\n\n# Verify\nassert result == a * b"
      },
      {
        "title": "Prime Number Detection",
        "body": "from pywayne.maths import get_all_factors\n\ndef is_prime(n):\n    factors = get_all_factors(n)\n    return len(factors) == 2 and factors == [1, n]\n\nprint(is_prime(17))   # True\nprint(is_prime(18))   # False"
      },
      {
        "title": "Greatest Common Divisor (GCD)",
        "body": "from pywayne.maths import get_all_factors\n\ndef gcd(a, b):\n    factors_a = set(get_all_factors(a))\n    factors_b = set(get_all_factors(b))\n    common = factors_a & factors_b\n    return max(common)\n\nprint(gcd(24, 36))  # 12"
      },
      {
        "title": "Digit Frequency Analysis",
        "body": "from pywayne.maths import digitCount\n\ndef digit_frequency(n):\n    frequency = {}\n    for k in range(10):\n        frequency[k] = digitCount(n, k)\n    return frequency\n\nprint(digit_frequency(1000))\n# {0: 189, 1: 301, 2: 300, 3: 300, ...}"
      },
      {
        "title": "Large Number Calculations",
        "body": "from pywayne.maths import karatsuba_multiplication\n\n# Very large numbers\nx = 123456789012345678901234567890\ny = 9876543210987654321098765432109876\n\n# Use Karatsuba for efficiency\nproduct = karatsuba_multiplication(x, y)"
      },
      {
        "title": "Notes",
        "body": "get_all_factors returns sorted unique factors\ndigitCount counts from 1 to n inclusive\nkaratsuba_multiplication is optimized for large integers (hundreds+ of digits)\nFor small integers, standard multiplication * may be faster due to overhead"
      }
    ],
    "body": "Pywayne Maths\n\nMathematical utility functions for number theory, digit analysis, and optimized integer operations.\n\nQuick Start\nfrom pywayne.maths import get_all_factors, digitCount, karatsuba_multiplication\n\n# Get all factors of a number\nfactors = get_all_factors(28)\nprint(factors)  # [1, 2, 4, 7, 14, 28]\n\n# Count digit occurrences\ncount = digitCount(100, 1)\nprint(count)  # 21 (digit 1 appears 21 times in 1-100)\n\n# Large integer multiplication\nproduct = karatsuba_multiplication(1234, 5678)\nprint(product)  # 7006652\n\nFunctions\nget_all_factors\n\nReturn all factors of a positive integer.\n\nget_all_factors(n: int) -> list\n\n\nParameters:\n\nn - Positive integer to factorize\n\nReturns:\n\nList of all factors of n\n\nUse Cases:\n\nNumber theory problems\nFinding divisors\nSimplifying fractions\nGreatest common divisor (GCD) calculation\n\nExample:\n\nfrom pywayne.maths import get_all_factors\n\nfactors = get_all_factors(36)\nprint(factors)  # [1, 2, 3, 4, 6, 9, 12, 18, 36]\n\n# Check if number is prime\nn = 17\nfactors = get_all_factors(n)\nif len(factors) == 2:  # Only 1 and itself\n    print(f\"{n} is prime\")\nelse:\n    print(f\"{n} is not prime\")\n\ndigitCount\n\nCount occurrences of digit k from 1 to n.\n\ndigitCount(n, k) -> int\n\n\nParameters:\n\nn - Positive integer, upper bound of counting range\nk - Digit to count (0-9)\n\nReturns:\n\nCount of digit k in range [1, n]\n\nSpecial Case:\n\nWhen k = 0, counts all numbers with trailing zeros after n\n\nUse Cases:\n\nDigit frequency analysis\nNumber theory problems\nData analysis tasks\n\nExample:\n\nfrom pywayne.maths import digitCount\n\n# Count digit 1 from 1 to 100\ncount = digitCount(100, 1)\nprint(count)  # 21\n\n# Count each digit 0-9 in range 1-1000\nfor k in range(10):\n    count = digitCount(1000, k)\n    print(f\"Digit {k}: {count} times\")\n\nkaratsuba_multiplication\n\nMultiply two integers using Karatsuba's divide-and-conquer algorithm.\n\nkaratsuba_multiplication(x: int, y: int) -> int\n\n\nParameters:\n\nx - Integer multiplier\ny - Integer multiplicand\n\nReturns:\n\nProduct of x and y\n\nAlgorithm:\n\nKaratsuba algorithm uses recursive divide-and-conquer to multiply large integers\nTime complexity: O(n^log₂3) ≈ O(n^1.585)\nMore efficient than naive multiplication O(n²) for very large numbers\n\nUse Cases:\n\nLarge integer multiplication\nAlgorithm optimization\nCompetitive programming\nCryptography applications\n\nExample:\n\nfrom pywayne.maths import karatsuba_multiplication\n\n# Compare with standard multiplication\na, b = 123456789, 987654321\nresult = karatsuba_multiplication(a, b)\nprint(result)  # 121932631112635269\n\n# Verify\nassert result == a * b\n\nCommon Applications\nPrime Number Detection\nfrom pywayne.maths import get_all_factors\n\ndef is_prime(n):\n    factors = get_all_factors(n)\n    return len(factors) == 2 and factors == [1, n]\n\nprint(is_prime(17))   # True\nprint(is_prime(18))   # False\n\nGreatest Common Divisor (GCD)\nfrom pywayne.maths import get_all_factors\n\ndef gcd(a, b):\n    factors_a = set(get_all_factors(a))\n    factors_b = set(get_all_factors(b))\n    common = factors_a & factors_b\n    return max(common)\n\nprint(gcd(24, 36))  # 12\n\nDigit Frequency Analysis\nfrom pywayne.maths import digitCount\n\ndef digit_frequency(n):\n    frequency = {}\n    for k in range(10):\n        frequency[k] = digitCount(n, k)\n    return frequency\n\nprint(digit_frequency(1000))\n# {0: 189, 1: 301, 2: 300, 3: 300, ...}\n\nLarge Number Calculations\nfrom pywayne.maths import karatsuba_multiplication\n\n# Very large numbers\nx = 123456789012345678901234567890\ny = 9876543210987654321098765432109876\n\n# Use Karatsuba for efficiency\nproduct = karatsuba_multiplication(x, y)\n\nNotes\nget_all_factors returns sorted unique factors\ndigitCount counts from 1 to n inclusive\nkaratsuba_multiplication is optimized for large integers (hundreds+ of digits)\nFor small integers, standard multiplication * may be faster due to overhead"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/wangyendt/maths",
    "publisherUrl": "https://clawhub.ai/wangyendt/maths",
    "owner": "wangyendt",
    "version": "0.1.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/maths",
    "downloadUrl": "https://openagent3.xyz/downloads/maths",
    "agentUrl": "https://openagent3.xyz/skills/maths/agent",
    "manifestUrl": "https://openagent3.xyz/skills/maths/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/maths/agent.md"
  }
}