Skip to content
Back to skills

Effect Queues Background Mepuka Adjunct

ASecurity

Queue and PubSub patterns, background fibers, and graceful shutdown. Use for decoupling producers/consumers.

  • 755 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added February 8, 2026
documentationbashapidocumentation

Works with

  • api

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill effect-queues-background-mepuka-adjunct --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Effect Queues Background Mepuka Adjunct?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Effect Queues Background Mepuka Adjunct
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-effect-queues-background-mepuka-adjunct/badge)](https://www.skillsdirectory.com/skills/majiayu000-effect-queues-background-mepuka-adjunct)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: effect-queues-background
description: Queue and PubSub patterns, background fibers, and graceful shutdown. Use for decoupling producers/consumers.
allowed-tools: Read, Grep, Glob, Edit, Write
---

# Queues, PubSub & Background

## When to use
- Decoupling producers/consumers with backpressure
- Broadcasting events to multiple subscribers
- Running background loops with graceful shutdown

## Queue (bounded)
```ts
import { Queue } from "effect"
const q = yield* Queue.bounded<string>(32)
yield* Queue.offer(q, "job")
const job = yield* Queue.take(q)
```

## PubSub (broadcast)
```ts
import { PubSub } from "effect"
const ps = yield* PubSub.bounded<string>(32)
yield* PubSub.publish(ps, "evt")
```

## Background Fiber
```ts
const fiber = yield* Effect.fork(loop)
yield* Fiber.interrupt(fiber)
```

## Guidance
- Prefer bounded queues to apply natural backpressure
- Use multiple workers by forking consumers
- Ensure background fibers are interrupted during shutdown

## Pitfalls
- Unbounded queues lead to memory growth
- Silent background failures → add logging/metrics

## Cross-links
- Concurrency for pools and interruption
- Time/Logging for observability of background tasks

## Local Source Reference

**CRITICAL: Search local Effect source before implementing**

The full Effect source code is available at `docs/effect-source/`. Always search the actual implementation before writing Effect code.

### Key Source Files
- Queue: `docs/effect-source/effect/src/Queue.ts`
- PubSub: `docs/effect-source/effect/src/PubSub.ts`
- Fiber: `docs/effect-source/effect/src/Fiber.ts`

### Example Searches
```bash
# Find Queue patterns
grep -F "bounded" docs/effect-source/effect/src/Queue.ts
grep -F "offer" docs/effect-source/effect/src/Queue.ts
grep -F "take" docs/effect-source/effect/src/Queue.ts

# Study PubSub operations
grep -F "publish" docs/effect-source/effect/src/PubSub.ts
grep -F "subscribe" docs/effect-source/effect/src/PubSub.ts

# Find background fiber patterns
grep -F "fork" docs/effect-source/effect/src/Fiber.ts
grep -F "interrupt" docs/effect-source/effect/src/Fiber.ts

# Look at Queue test examples
grep -F "Queue." docs/effect-source/effect/test/Queue.test.ts
```

### Workflow
1. Identify the Queue or PubSub API you need
2. Search `docs/effect-source/effect/src/Queue.ts` or `PubSub.ts` for the implementation
3. Study the types and backpressure patterns
4. Look at test files for usage examples
5. Write your code based on real implementations

**Real source code > documentation > assumptions**

## References
- Agent Skills overview: https://www.anthropic.com/news/skills
- Skills guide: https://docs.claude.com/en/docs/claude-code/skills

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in documentation →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.