effect-ai-prompt

effect-ai-prompt is a skill for Claude Code, Codex from mpsuesser/pi-effect-harness. It costs 36 tokens per session (4,366 once invoked), scanned A, original, MIT.

A guide to Effect AI's Prompt API, which represents conversations as typed messages and smaller parts such as text, files, and tool results.

In plain words
What is it for?
Use it to create prompts, combine conversation turns, add system instructions, attach files or images, and record tool calls and responses.
Why use it?
It helps keep language-model conversations and their history in the expected structure when building an application.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create prompts, combine conversation turns, add system instructions, attach files or images, and record tool calls and responses.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mpsuesser/pi-effect-harness/effect-ai-prompt
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-prompt
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-prompt

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/mpsuesser/pi-effect-harness/effect-ai-prompt"><img src="https://agentmods.dev/badge/skills/mpsuesser/pi-effect-harness/effect-ai-prompt.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,366 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00036 $0.04366
Opus 5 $0.00018 $0.02183
Sonnet 5 $0.00007 $0.00873
Haiku 4.5 $0.00004 $0.00437

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

Security

Grade A, and why

effect-ai-prompt 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 10d 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.

harnesses/effect/skills/effect-ai-prompt/SKILL.md · 735 lines

How it starts

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

Effect AI Prompt Construction

Master the Effect AI Prompt API for building type-safe conversations with language models.

Import Patterns

CRITICAL: Always use namespace imports:

import * as Prompt from 'effect/unstable/ai/Prompt';
import * as Response from 'effect/unstable/ai/Response';
import { pipe } from 'effect';

When to Use This Skill

  • Constructing messages for language model requests
  • Building multi-turn conversation history
  • Adding system instructions to prompts
  • Integrating tool calls and results into conversations
  • Converting streaming responses to prompt history
  • Managing file/image attachments in messages
  • Implementing custom chat interfaces

Conceptual Model

-- Message hierarchy
type Message = SystemMessage | UserMessage | AssistantMessage | ToolMessage
type Part =
  | TextPart
  | ReasoningPart
  | FilePart
  | ToolCallPart
  | ToolResultPart
  | ToolApprovalRequestPart
  | ToolApprovalResponsePart

-- Composition
Prompt.make       :: RawInput → Prompt
Prompt.concat      :: (Prompt, RawInput) → Prompt
Prompt.setSystem  :: (Prompt, String) → Prompt

-- History transformation
fromResponseParts :: ReadonlyArray<Response.Part> → Prompt

Message Types

Each message has role and content. Content is an array of Part objects.

System Messages

import * as Prompt from 'effect/unstable/ai/Prompt';

// String content only
const system = Prompt.makeMessage('system', {
	content: 'You are a helpful assistant specialized in mathematics.'
});

// Shorthand constructor
const systemShorthand = Prompt.systemMessage({
	content: 'You are a helpful assistant specialized in mathematics.'
});

// System message with options
const systemWithOptions = Prompt.makeMessage('system', {
	content: 'You are an expert coder.',
	options: {
		anthropic: { cache_control: { type: 'ephemeral' } }
	}
});

User Messages

// Text-only user message
const userText = Prompt.makeMessage("user", {
  content: [
    Prompt.makePart("text", { text: "What is 2+2?" })
  ]
})

// Shorthand constructor
const userShorthand = Prompt.userMessage({
  content: [
    Prompt.makePart("text", { text: "What is 2+2?" })
  ]
})

// Multimodal user message (text + file)
const userMultimodal = Prompt.makeMessage("user", {
  content: [
    Prompt.makePart("text", { text: "What's in this image?" }),
    Prompt.makePart("file", {
      mediaType: "image/jpeg",
      fileName: "photo.jpg",
      data: new Uint8Array([...])
    })
  ]
})

Read the full file on GitHub · 735 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. 10d ago First seen · 735 lines · 36 tokens per session scan A 8398ce7e0f5f

Subscribe to this mod's changes

effect-ai-prompt is a skill published in the GitHub repository mpsuesser/pi-effect-harness (24 stars, last pushed 3mo ago), licensed MIT. It adds 36 tokens to every session and 4,366 once invoked, about $0.0002 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.

Related

Other skills, from other repositories