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.
npx skills add mpsuesser/pi-effect-harness --skill effect-context-witnessgit clone --depth 1 https://github.com/mpsuesser/pi-effect-harnessWrote 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/skills/mpsuesser/pi-effect-harness/effect-context-witness)<a href="https://agentmods.dev/skills/mpsuesser/pi-effect-harness/effect-context-witness"><img src="https://agentmods.dev/badge/skills/mpsuesser/pi-effect-harness/effect-context-witness/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/skills/mpsuesser/pi-effect-harness/effect-context-witness"><img src="https://agentmods.dev/badge/skills/mpsuesser/pi-effect-harness/effect-context-witness.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.00022 | $0.01647 |
| Opus 5 | $0.00011 | $0.00823 |
| Sonnet 5 | $0.00004 | $0.00329 |
| Haiku 4.5 | $0.00002 | $0.00165 |
Grade A, and why
effect-context-witness 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 11d 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 — 275 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Context Witness Pattern
Choose between witness (existence) and capability (behavior) patterns for Context.Service definitions.
Coupling: Hard vs Soft
Some coupling is necessary and good - but move it from hard to soft coupling.
Hard Coupling (Schema)
Field exists in the schema - tightly coupled to domain model:
import { Schema } from 'effect';
// ❌ HARD COUPLING - Serial is part of the schema
export const PaymentIntent = Schema.Struct({
id: Schema.String,
serial: Schema.String, // In schema = hard coupled
amount: Schema.BigInt
});
// Every PaymentIntent MUST have a serial
// Serialization/validation requires serial
// Cannot create without providing serial
// Schema change needed to remove/change serial
Soft Coupling (Witness)
Field removed from schema, only injected in code:
import { Schema, Context, Effect, Logger } from 'effect';
declare const generateId: () => string;
// ✅ SOFT COUPLING - Serial not in schema
export const PaymentIntent = Schema.Struct({
id: Schema.String,
amount: Schema.BigInt
// No serial field!
});
// Serial is a witness - required but injected via Context
class Serial extends Context.Service<Serial, string>()('Serial') {}
const createPaymentIntent = (amount: bigint) =>
Effect.gen(function* () {
const serial = yield* Serial; // Injected from context
// Use serial in business logic, logging, etc.
// but it's not part of the persisted data
yield* Logger.info(`Creating payment intent ${serial}`);
return PaymentIntent.make({ id: generateId(), amount });
});
// Type: Effect<PaymentIntent, never, Serial>
Key insight: schema (hard coupling) => witness (soft coupling)
By removing the field from the schema and injecting it only where needed, you:
- Keep domain models minimal
- Avoid unnecessary persistence
- Easy to test (provide test serial)
- Easy to remove/change (just change injection)
- Explicit dependencies in type signature
When to use witnesses:
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.
- 11d ago First seen · 275 lines · 22 tokens per session scan A a81c6c252289
effect-context-witness is a skill published in the GitHub repository mpsuesser/pi-effect-harness (24 stars, last pushed 3mo ago), licensed MIT. It adds 22 tokens to every session and 1,647 once invoked, about $0.0001 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 skills, from other repositories
effect-patterns-building-apis
Effect-TS patterns for Building Apis. Use when working with building apis in Effect-TS applications.
effect-patterns-concurrency
Effect-TS patterns for Concurrency. Use when working with concurrency in Effect-TS applications.
effect-patterns-building-data-pipelines
Effect-TS patterns for Building Data Pipelines. Use when working with building data pipelines in Effect-TS applications.
effect-patterns-error-management
Effect-TS patterns for Error Management. Use when working with error management in Effect-TS applications.
effect-patterns-making-http-requests
Effect-TS patterns for Making Http Requests. Use when working with making http requests in Effect-TS applications.
effect-patterns-observability
Effect-TS patterns for Observability. Use when working with observability in Effect-TS applications.