hassanzohdy/collection/querying
Claude Code and agent skill by hassanzohdy/collection
- community
Checking that the SKILL.md file is still in the repository.
Tutorial-style guide to filtering and lookup on an `ImmutableCollection` — `where`, `whereIn`, `whereBetween`, `whereNotBetween`, `whereNot`, `whereNull`, `whereNotNull`, `whereEmpty`, `whereNotEmpty`, `whereExists`, `whereNotExists`, `filter`, `reject`, `except`, `not`, `find`, `first`, `last`, `firstWhere`, `lastWhere`. Covers RegExp shorthand, dot-notation paths, AND-chaining vs OR via `filter`, and item `.get(key)` integration with model classes.
Install
npx vskill@latest install hassanzohdy/collection/queryingSKILL.md
Querying a Collection
How to use
where — operator engine
Three call signatures:
RegExp shorthand
Pass a RegExp as the value and the key check becomes a regex test:
Existence vs null vs undefined
| Operator | Matches | |
|---|---|---|
"exists" / "not exists" | key is present / absent on the item object | |
"null" / "is null" | value is strictly null | |
"undefined" / "is undefined" | value is strictly undefined | |
"empty" / "is empty" | value is empty (via @mongez/supportive-is) |
Type checks
Convenience where* shorthand methods
filter — callback-based
reject / except
Returns items for which the callback returns false (inverse of filter):
not — exclude a specific primitive value
find — single item by callback
first / last
firstWhere / lastWhere
Same signature as where, but returns the single matched item instead of a collection:
Key details / Pitfalls
wherealways returns a new collection — it never mutates. Chain as many as needed.- All operators are string literals defined in
src/types.ts. Passing an unrecognised operator returns an empty collection (falls through todefault: return false). - Chained
wherecalls are AND logic — each narrows the previous result. For OR logic, usefilterwith||or union twowhereresults. - Keys support dot notation:
c.where("address.city", "London"). - If items have a
.get(key)method it is used for all keyed lookups — collection integrates seamlessly with model classes. whereInwith a single array argument (no key) tests the item itself:c.whereIn([1, 2, 3])keeps primitive items whose value is in the list.
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/querying/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/querying)