AI & Agents
Agent
js-combine-iterations
Multiple `.filter()` or `.map()` calls iterate the array multiple times. Combine into one loop.
Claude Code
$ npx -y skills add calcom/cal.diy --agent claude-code
Cursor
Cursor also loads subagents from .claude/agents, so copy this file there to use it in Cursor.
Agent definition
js-combine-iterations.mdtitle: Combine Multiple Array Iterations impact: LOW-MEDIUM impactDescription: reduces iterations tags: javascript, arrays, loops, performance
Combine Multiple Array Iterations
Multiple `.filter()` or `.map()` calls iterate the array multiple times. Combine into one loop.
**Incorrect (3 iterations):**
const admins = users.filter(u => u.isAdmin) const testers = users.filter(u => u.isTester) const inactive = users.filter(u => !u.isActive)
**Correct (1 iteration):**
const admins: User[] = []
const testers: User[] = []
const inactive: User[] = []
for (const user of users) {
if (user.isAdmin) admins.push(user)
if (user.isTester) testers.push(user)
if (!user.isActive) inactive.push(user)
} Stats
50,432
Stars
Active
Maintenance
TypeScript
Language
MIT
License
Last commit
Created
50k3 skills95 agents
More agents from other plugins.
CSharpExpert.agent
AgentAn agent designed to assist with software development tasks for .NET projects.
coder
AgentFocused coder - implements exactly the assigned subtask in its worktree
Argon
AgentGoogle cross-vendor agent named for the model it runs — Gemini 4 Argon, Google’s top reasoning model, via…
Questions about js-combine-iterations.
- Which coding agents can use js-combine-iterations?
- js-combine-iterations installs in Claude Code and Cursor: each loads subagents from .claude/agents, so copy the file there. Flowy's auto-invocation runs in Claude Code only.

