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.
git clone --depth 1 https://github.com/PaulJPhilp/EffectPatternsWrote 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/rules/pauljphilp/effectpatterns/collect-all-results-into-a-list)<a href="https://agentmods.dev/rules/pauljphilp/effectpatterns/collect-all-results-into-a-list"><img src="https://agentmods.dev/badge/rules/pauljphilp/effectpatterns/collect-all-results-into-a-list/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/rules/pauljphilp/effectpatterns/collect-all-results-into-a-list"><img src="https://agentmods.dev/badge/rules/pauljphilp/effectpatterns/collect-all-results-into-a-list.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.00536 | $0.00536 |
| Opus 5 | $0.00268 | $0.00268 |
| Sonnet 5 | $0.00107 | $0.00107 |
| Haiku 4.5 | $0.00054 | $0.00054 |
Grade A, and why
collect-all-results-into-a-list 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 9d 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.
How it starts
The opening of the file, as written. The whole thing — 56 lines — stays where its author put it; the contents beside it link to each section on GitHub.
description: Use Stream.runCollect to execute a stream and collect all its emitted values into a Chunk. globs: "**/*.ts" alwaysApply: true
Collect All Results into a List
Rule: Use Stream.runCollect to execute a stream and collect all its emitted values into a Chunk.
Example
This example creates a stream of numbers, filters for only the even ones, transforms them into strings, and then uses runCollect to gather the final results into a Chunk.
import { Effect, Stream, Chunk } from "effect";
const program = Stream.range(1, 10).pipe(
// Find all the even numbers
Stream.filter((n) => n % 2 === 0),
// Transform them into strings
Stream.map((n) => `Even number: ${n}`),
// Run the stream and collect the results
Stream.runCollect
);
const programWithLogging = Effect.gen(function* () {
const results = yield* program;
yield* Effect.log(
`Collected results: ${JSON.stringify(Chunk.toArray(results))}`
);
return results;
});
Effect.runPromise(programWithLogging);
/*
Output:
Collected results: [
'Even number: 2',
'Even number: 4',
'Even number: 6',
'Even number: 8',
'Even number: 10'
]
*/
Explanation:
A "sink" is a terminal operator that consumes a stream and produces a final Effect. Stream.runCollect is the most fundamental sink. It provides the bridge from the lazy, pull-based world of Stream back to the familiar world of a single Effect that resolves with a standard data structure.
Using Stream.runCollect is essential when:
- You Need the Final Result: The goal of your pipeline is to produce a complete list of transformed items that you need to use in a subsequent step (e.g., to return as a single JSON array from an API).
- Simplicity is Key: It's the most straightforward way to "run" a stream and see its output. It declaratively states your intent: "execute this entire pipeline and give me all the results."
- The Dataset is Bounded: It's designed for streams where the total number of items is known to be finite and small enough to fit comfortably in memory.
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.
- 9d ago First seen · 56 lines · 536 tokens per session scan A 6ad8a1559ee5
collect-all-results-into-a-list is a cursor rule published in the GitHub repository PaulJPhilp/EffectPatterns (796 stars, last pushed 2mo ago), licensed MIT. It adds 536 tokens to every session, about $0.0027 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-08-30.
Other cursor rules, from other repositories
python_clean_code
Python clean code for cookbook flagships and recipes.
workflow
This file provides rules and context for generating or understanding Go code related to a custom Domain Specific Language (DSL) for defining Temporal workflows within this project.
activities
This file provides rules and context for generating or understanding Go code related to Temporal activities within this project with the specific purpose of using a simple DSL to specify workflows.
go-api-development-general-rules
General rules for Go API development using the net/http package, focusing on code quality, security, and best practices.
index
A lightweight, declarative DSL in Go for defining Temporal workflows. This approach uses Go structs to represent workflow logic, separating the definition from the activity implementation.
typescript-code-generation-rules
Rules for generating TypeScript code in Next.js 14 components, including component definition syntax, props definitions, and named/default exports.