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.
npx skills add hamzabellouch/agent-skills --skill combinatorics-and-discrete-mathgit clone --depth 1 https://github.com/hamzabellouch/agent-skillsWrote 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.
[](https://agentmods.dev/skills/hamzabellouch/agent-skills/combinatorics-and-discrete-math)<a href="https://agentmods.dev/skills/hamzabellouch/agent-skills/combinatorics-and-discrete-math"><img src="https://agentmods.dev/badge/skills/hamzabellouch/agent-skills/combinatorics-and-discrete-math/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.
<a href="https://agentmods.dev/skills/hamzabellouch/agent-skills/combinatorics-and-discrete-math"><img src="https://agentmods.dev/badge/skills/hamzabellouch/agent-skills/combinatorics-and-discrete-math.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00068 | $0.00596 |
| Opus 5.5 | $0.00027 | $0.00238 |
| Sonnet 5.5 | $0.00014 | $0.00119 |
| Haiku 4.5 | $0.00007 | $0.00060 |
Grade A, and why
combinatorics-and-discrete-math 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 today.
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.
How it starts
The opening of the file, as written. The whole thing — 30 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Combinatorics & Discrete Mathematics
Counting
- Rule of sum/product; permutations P(n,k) = n!/(n-k)!; combinations C(n,k); circular arrangements (n-1)!; multiset coefficients C(n+k-1, k).
- Binomial identities: Pascal C(n,k) = C(n-1,k-1) + C(n-1,k); sum C(n,k) = 2^n; Vandermonde; hockey stick; combinatorial proofs by double counting and bijections.
- Inclusion-exclusion; derangements D_n = n! sum_{k} (-1)^k/k!; surjections via Stirling numbers S(n,k) (set partitions), Bell numbers; integer partitions p(n) (Euler's pentagonal recurrence).
- Special sequences: Catalan C_n = C(2n,n)/(n+1) (parenthesizations, Dyck paths, binary trees), Fibonacci (F_n = F_{n-1} + F_{n-2}), Stirling numbers of the first kind, Eulerian numbers.
- Burnside / Polya enumeration for counting up to symmetry.
Extremal & existence
- Pigeonhole: n+1 objects in n boxes; Erdos-Szekeres; Dirichlet approximation.
- Ramsey: R(3,3) = 6, R(4,4) = 18. Probabilistic method: show existence by showing positive probability. Extremal graph theory: Turan's theorem; Sperner; Dilworth; Hall's marriage theorem.
- Invariants and monovariants for process problems; coloring arguments; the pigeonhole of the parity.
Recurrences & generating functions
- Linear recurrence with constant coefficients: characteristic roots -> closed form (Binet for Fibonacci).
- Ordinary generating function G(x) = sum a_n x^n; exponential generating function for labeled structures; partial fractions to extract coefficients; Lagrange inversion; transfer-matrix method; asymptotics via singularity analysis.
- Master theorem for divide-and-conquer T(n) = aT(n/b) + f(n).
Discrete structures
Sets, relations, equivalence classes, partial orders and lattices, Boolean algebra, functions (injective/surjective/bijective), cardinality (countable vs uncountable, Cantor diagonal).
Method
Model as sequences/sets; decide ordered vs unordered, repetition allowed or not; count complement if easier; verify small cases by brute force with scripts/combinatorics.py.
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- today First seen · 30 lines · 68 tokens per session scan A c7735e297393
combinatorics-and-discrete-math is a skill published in the GitHub repository hamzabellouch/agent-skills (8 stars, last pushed today), licensed MIT. It adds 68 tokens to every session and 596 once invoked, about $0.0003 per session on Opus 5.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-10-17.
Other skills, from other repositories
polya-docs
Phase 6 of the Pólya Heuristic Coder: Technical Documentation via Diátaxis Framework (Tutorials, How-To Guides, Reference, Explanation).
agricultural-sciences-professor
Use when a task needs the judgment of a tenure-track or tenured Agricultural Sciences faculty member at a land-grant university — deciding whether to submit a grant this cycle versus wait, allocating time across the teaching/research/extension appointment split, diagnosing a stalled graduate student or field trial, or…
adapted-physical-education-specialist
Use when a task needs the judgment of an Adapted Physical Education Specialist — writing a legally-defensible PE present level and annual goal from motor/fitness assessment data, choosing the right test battery and alternate items for a student's mobility profile, recommending a placement step on the PE…
area-ethnic-cultural-studies-professor
Use when a task needs the judgment of an Area, Ethnic, or Cultural Studies Professor — designing a joint-appointment course load across two departments, prepping a tenure or mid-tenure review file for interdisciplinary scholarship, deciding whether a course survives an enrollment or political-pressure threat…
art-drama-music-professor-postsecondary
Use when a task needs the judgment of a Postsecondary Art, Drama, or Music Professor — diagnosing a jury/crit score that contradicts a semester of formative work, building a studio-art or performance tenure dossier around exhibitions and productions instead of publications, staffing applied one-on-one lessons or crit…
career-technical-education-teacher-postsecondary
Use when a task needs the judgment of a Career/Technical Education Teacher, Postsecondary — defending a shrinking trade or health-science program against a cutback decision, backward-mapping a shop or lab curriculum to an industry credential's exam blueprint, resolving a competency-based grading dispute where a…