agentsclimarketplace

Prime sieve generator

Skill a5c-ai/babysitter/library/specializations/algorithms-optimization/skills/prime-sieve-generator

Generate optimized prime sieves and factorization routinesFrom its SKILL.md

Install
npx -y skills add a5c-ai/babysitter --skill prime-sieve-generator

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

SKILL.md

1.9 KB, 438 tokens by cl100k_base, as published. Nobody here has run it

Prime Sieve Generator Skill

Purpose

Generate optimized prime sieves and factorization routines for various competitive programming scenarios.

Capabilities

  • Sieve of Eratosthenes (segmented, linear)
  • Smallest prime factor sieve
  • Miller-Rabin primality testing
  • Pollard's rho factorization
  • Precompute prime-related values
  • Generate primes in range

Target Processes

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

Sieve Variants

Basic Sieves

  • Sieve of Eratosthenes O(n log log n)
  • Linear sieve O(n)
  • Segmented sieve (for large ranges)

Factorization Sieves

  • Smallest prime factor (SPF) sieve
  • Mobius function sieve
  • Euler's totient sieve

Primality Testing

  • Miller-Rabin (deterministic for small n)
  • Fermat test
  • Trial division

Factorization

  • Trial division O(sqrt(n))
  • Pollard's rho O(n^1/4)
  • Using SPF sieve O(log n)

Input Schema

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": ["sieve", "primalityTest", "factorization", "spfSieve"]
    },
    "limit": { "type": "integer" },
    "optimizations": { "type": "array" },
    "language": {
      "type": "string",
      "enum": ["cpp", "python", "java"]
    }
  },
  "required": ["type"]
}

Output Schema

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

What ships with it: 1 file

688 B alongside SKILL.md

Keep looking

Skills are one crate of 326,059. 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.