a5c-ai/babysitter / library/specializations/algorithms-optimization/skills/prime-sieve-generator
prime-sieve-generator
VerifiedGenerate optimized prime sieves and factorization routines
SKILL.md
View on GitHub---
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"]
}
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |