analyze-prime-numbers

analyze-prime-numbers is a skill for Claude Code from pjt222/agent-almanac. It costs 91 tokens per session (3,198 once invoked), scanned A, original, MIT.

A collection of methods for testing whether numbers are prime, finding their prime factors, and studying how primes are distributed. It includes algorithms such as trial division, Miller–Rabin, and the Sieve of Eratosthenes.

In plain words
What is it for?
Use it to test integers, calculate factorizations, list or count primes, and examine the Prime Number Theorem for a chosen range.
Why use it?
It helps select an appropriate method and verify computational results when working with prime numbers.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the agent-almanac plugin — 122 skills, 76 agents shipped together

Good fit Use it to test integers, calculate factorizations, list or count primes, and examine the Prime Number Theorem for a chosen range.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pjt222/agent-almanac/analyze-prime-numbers
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add pjt222/agent-almanac --skill analyze-prime-numbers
Clone the repo
git clone --depth 1 https://github.com/pjt222/agent-almanac

Made for: Claude Code.

Or install agent-almanac, the plugin that ships this one along with the rest of its 122 skills, 76 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for analyze-prime-numbers

README.md
[![agentmods](https://agentmods.dev/badge/skills/pjt222/agent-almanac/analyze-prime-numbers/github.svg)](https://agentmods.dev/skills/pjt222/agent-almanac/analyze-prime-numbers)
Your own site
<a href="https://agentmods.dev/skills/pjt222/agent-almanac/analyze-prime-numbers"><img src="https://agentmods.dev/badge/skills/pjt222/agent-almanac/analyze-prime-numbers/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for analyze-prime-numbers

Your own site · 80×15
<a href="https://agentmods.dev/skills/pjt222/agent-almanac/analyze-prime-numbers"><img src="https://agentmods.dev/badge/skills/pjt222/agent-almanac/analyze-prime-numbers.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 91 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,198 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00091 $0.03198
Opus 5 $0.00046 $0.01599
Sonnet 5 $0.00018 $0.00640
Haiku 4.5 $0.00009 $0.00320

Measured 7d ago against content hash 1dd526c20a0f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

analyze-prime-numbers scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

i18n/caveman-lite/skills/analyze-prime-numbers/SKILL.md · 241 lines

How it starts

The opening of the file, as written. The whole thing — 241 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Analyze Prime Numbers

Analyze prime numbers by selecting and applying the appropriate algorithm for the task at hand: primality testing, integer factorization, or prime distribution analysis. Verify results computationally and relate findings to the Prime Number Theorem.

When to Use

  • Determining whether a given integer is prime or composite
  • Finding the complete prime factorization of an integer
  • Counting or listing primes up to a given bound
  • Verifying the Prime Number Theorem approximation for a specific range
  • Investigating properties of primes in a number-theoretic proof or computation

Inputs

  • Required: The integer(s) to analyze, or a bound for distribution analysis
  • Required: Task type -- one of: primality test, factorization, or distribution analysis
  • Optional: Preferred algorithm (trial division, Miller-Rabin, Sieve of Eratosthenes, Pollard's rho)
  • Optional: Whether to produce a formal proof of primality or a computational verdict
  • Optional: Output format (factor tree, prime list, count, table)

Procedure

Step 1: Determine the Task Type

Classify the request into one of three categories and select the appropriate algorithmic path.

  1. Primality test: Given a single integer n, determine whether n is prime.
  2. Factorization: Given a composite integer n, find its complete prime factorization.
  3. Distribution analysis: Given a bound N, analyze the primes up to N (count, list, gaps, density).

Record the task type and the input value(s).

Got: A clear classification with the input values recorded.

If fail: If the input is ambiguous (e.g., "analyze 60"), ask the user to clarify whether they want a primality test, factorization, or distribution analysis. Default to factorization for composite numbers and primality confirmation for suspected primes.

Step 2: Apply Primality Testing (if task = primality)

Test whether n is prime using an algorithm matched to the size of n.

  1. Handle trivial cases: n < 2 is not prime. n = 2 or n = 3 is prime. If n is even and n > 2, it is composite.

Read the full file on GitHub · 241 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 241 lines · 91 tokens per session scan A 1dd526c20a0f

Subscribe to this mod's changes

analyze-prime-numbers is a skill published in the GitHub repository pjt222/agent-almanac (32 stars, last pushed today), licensed MIT. It adds 91 tokens to every session and 3,198 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

tooluniverse-organic-chemistry

Organic chemistry reasoning guide for reaction product prediction, mechanism analysis (electrophilic/nucleophilic substitution, addition, elimination, pericyclic, radical), and spectroscopy interpretation (1H/13C NMR, IR, MS). Reasons from first principles (electron flow, kinetic vs thermodynamic) rather than…

mims-harvard/ToolUniverse · 86 tokens

evomath-tao

Use this skill whenever the user submits a non-trivial mathematical claim that needs a rigorous proof or audit. Trigger on IMO/Putnam/USAMO/Olympiad-style problems, ML/AI theoretical statements, research conjectures, suspected-false claims, multi-step proofs the user already failed on, proof drafts with possible…

EvoScientist/EvoSkills · 203 tokens

analytics

Queries local analytics across OrchestKit projects for agent usage, skill frequency, hook timing, team activity, session replay, cost estimation, and model delegation trends. Privacy-safe with hashed project IDs. Supports time-range filtering and comparative analysis. Use when reviewing performance, estimating costs…

yonatangross/orchestkit · 62 tokens

astro-dso-doc

Generates a complete, polished HTML documentation page, a processing checklist, an AstroBin post JSON, a PixInsight process icon set (XPSM), AND a ready-to-paste PixInsight project Description field for a deep-sky object (DSO) astrophotography project. Use this skill whenever the user mentions astrophotography, a DSO…

jjmartres/ai-coding-agents · 244 tokens

dsm5

Assess and explain questions about mental health and neurocognitive conditions against DSM-5-TR diagnostic criteria, and guide evidence-based conversations for clinicians, patients, and family members. Use when someone asks about symptoms, possible conditions, differential diagnoses, diagnostic criteria, prevalence…

magnus919/agent-skills · 106 tokens

design-feature

Turn a raw idea or existing feature into a designed product SPEC by completing entity, integration, role, and expectation closure. Upserts never destroy recorded decisions. Triggers: "design-feature", "design this feature", "define product scope".

gtrabanco/agentic-workflow · 51 tokens