hassanzohdy/collection/math-aggregation
Claude Code and agent skill by hassanzohdy/collection
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Tutorial-style "when to use which math method" guide for `@mongez/collection` — totaling, averaging, finding min/max/median, counting by predicate or by key, applying per-item arithmetic (`plus`/`minus`/`multiply`/`divide`/`modulus`/`increment`/`decrement`/`double`/`half`), parity filters (`even`/`odd`/`evenIndexes`/`oddIndexes`).
Install
npx vskill@latest install hassanzohdy/collection/math-aggregationSKILL.md
Math & Aggregation
How to use
Aggregate reducers
All four accept an optional key string (dot-notation supported) to operate on a field rather than the item itself.
count — conditional count
countValue — exact value occurrences
countBy — frequency map per key value
Per-item arithmetic — plus, minus, multiply, divide, modulus
Two overloads each:
- Primitive items — single
amountargument. - Keyed field —
(key, amount)arguments; returns a new collection with that field updated on each item.
increment / decrement — shorthand ±1
double / half — shorthand ×2 and ÷2
even / odd — filter by numeric value parity
evenIndexes / oddIndexes — filter by position parity
Key details / Pitfalls
min/maxon an empty collection return0(matching@mongez/reinforcementsconvention). On a non-empty collection they find the true minimum/maximum, so a collection of all-positive numbers will not incorrectly return0formax.sum,average, andmediandelegate directly to@mongez/reinforcements' helpers.- Keyed arithmetic does not mutate plain-object items.
plus("age", 5)shallow-clones each plain-object item viacloneForSetbefore callingset(clone, key, value), so the originals in the source collection are safe. Class instances and nested object references are still passed through by reference (the clone is shallow) — deep-clone the input first if deep immutability is required. dividethrowsError("Cannot divide by zero")andmodulusthrowsError("Cannot have a modulus of zero")when the divisor is0.- All per-item math methods return a new collection — they do not mutate
this.items.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/math-aggregation/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/hassanzohdy/collection/math-aggregation)