Skip to content
Back to skills

Prime Sieve Generator

ASecurity

Generate optimized prime sieves and factorization routines

  • 1,760 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 2, 2026
ai-agentspythongojavatestingbackend

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 2, 2026

npx -y skills add a5c-ai/babysitter --skill prime-sieve-generator --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Prime Sieve Generator?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Prime Sieve Generator
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/a5c-ai-prime-sieve-generator-babysitter/badge)](https://www.skillsdirectory.com/skills/a5c-ai-prime-sieve-generator-babysitter)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: prime-sieve-generator
description: Generate optimized prime sieves and factorization routines
allowed-tools:
  - Read
  - Write
  - Grep
  - Glob
  - Edit
graph:
  domains: [domain:computer-science]
  specializations: [specialization:algorithms-optimization]
  skillAreas: [skill-area:mathematical-reasoning]
  roles: [role:backend-engineer, role:computational-scientist]
---

# 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

```json
{
  "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

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

Files in this skill

  • README.md688 B
  • SKILL.md1.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.