effect-ai-tool

effect-ai-tool is a skill for Claude Code, Codex from mpsuesser/pi-effect-harness. It costs 50 tokens per session (6,959 once invoked), scanned A, original, MIT.

A toolkit for defining functions that an AI language model can call, including their inputs, outputs, errors, and implementations, using Effect AI.

In plain words
What is it for?
Use it to add application actions to an AI assistant, define user-created or provider-created tools, and connect those tools to Effect handlers.
Why use it?
It gives AI integrations a structured way to validate tool parameters and handle successful or failed tool runs. Multiple tools can be combined into one toolkit.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit Use it to add application actions to an AI assistant, define user-created or provider-created tools, and connect those tools to Effect handlers.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mpsuesser/pi-effect-harness/effect-ai-tool
Install

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.

Any agent
npx skills add mpsuesser/pi-effect-harness --skill effect-ai-tool
Clone the repo
git clone --depth 1 https://github.com/mpsuesser/pi-effect-harness

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for effect-ai-tool

README.md
[![agentmods](https://agentmods.dev/badge/skills/mpsuesser/pi-effect-harness/effect-ai-tool/github.svg)](https://agentmods.dev/skills/mpsuesser/pi-effect-harness/effect-ai-tool)
Your own site
<a href="https://agentmods.dev/skills/mpsuesser/pi-effect-harness/effect-ai-tool"><img src="https://agentmods.dev/badge/skills/mpsuesser/pi-effect-harness/effect-ai-tool/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.

agentmods 80×15 button for effect-ai-tool

Your own site · 80×15
<a href="https://agentmods.dev/skills/mpsuesser/pi-effect-harness/effect-ai-tool"><img src="https://agentmods.dev/badge/skills/mpsuesser/pi-effect-harness/effect-ai-tool.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,959 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00050 $0.06959
Opus 5 $0.00025 $0.03479
Sonnet 5 $0.00010 $0.01392
Haiku 4.5 $0.00005 $0.00696

Measured 9d ago against content hash 8354e9702eb1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

effect-ai-tool scanned grade A with 1 finding 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

const data = yield* service.fetch(location);
harnesses/effect/skills/effect-ai-tool/SKILL.md · 1,091 lines

How it starts

The opening of the file, as written. The whole thing — 1,091 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Effect AI Tool Skill

Use this skill when implementing tools for AI language models using the Effect AI library. This covers tool definition, parameter schemas, success/failure handling, and toolkit composition.

Effect AI Documentation Access

For comprehensive Effect AI documentation, view the Effect v4 repository at packages/ai/

Reference this for:

  • Tool.make, Tool.dynamic, and Tool.providerDefined APIs
  • Toolkit.make for composing multiple tools
  • Schema.Struct(...) for Tool.make parameters
  • Handler implementation patterns
  • OpenAI provider-defined tools via @effect/ai-openai/OpenAiTool

Core Concepts

Tool Anatomy

Effect<A, E, R>
       ↓
Tool<Name, Config, Requirements>

Config := {
  parameters: Schema.Struct<Fields>
  success: Schema<A>
  failure: Schema<E>
  failureMode: "error" | "return"
}

Toolkit Flow

Tool₁, Tool₂, Tool₃
       ↓ Toolkit.make
Toolkit<{tool1: Tool₁, tool2: Tool₂, tool3: Tool₃}>
       ↓ .toLayer(handlers)
Layer<Handlers>
       ↓ Effect.provide
Effect with tool execution capability

Production Harness Pattern: Effectful Local Tool Wrappers

Tool.make is the core user-defined Effect AI tool API. Effect AI also has Tool.dynamic for runtime-discovered tools and Tool.providerDefined for native provider capabilities. In larger coding-agent harnesses, it is common to wrap local tool definitions in an effectful layer so it can capture services once and keep a single Effect.runPromise bridge at the outer async framework boundary.

This wrapper is local to your harness, not part of Effect AI itself.

import { Effect } from 'effect';

export const ReadTool = defineEffect(
	'read',
	Effect.gen(function* () {
		const fs = yield* AppFileSystem.Service;

		const run = Effect.fn('ReadTool.execute')(function* (params: Params) {
			return yield* fs.readFileString(params.path);
		});

		return {
			description: 'Read a file',
			async execute(params: Params) {
				return Effect.runPromise(run(params));
			}
		};
	})
);

Read the full file on GitHub · 1,091 lines

Changes

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.

  1. 9d ago First seen · 1,091 lines · 50 tokens per session scan A 8354e9702eb1

Subscribe to this mod's changes

effect-ai-tool is a skill published in the GitHub repository mpsuesser/pi-effect-harness (24 stars, last pushed 2mo ago), licensed MIT. It adds 50 tokens to every session and 6,959 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.