indexing-external-calls

Enforce the Effect API for external I/O in HyperIndex handlers.

2|3|Updated Mar 4, 2026
One-click install
npx skills add https://github.com/moose-code/polymarket-indexer --skill indexing-external-calls-moose-code
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: indexing-external-calls
Source: https://github.com/moose-code/polymarket-indexer/tree/main/.claude/skills/indexing-external-calls
Command: npx skills add https://github.com/moose-code/polymarket-indexer --skill indexing-external-calls-moose-code

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

External calls in HyperIndex handlers risk double execution and inconsistent state; enforcing the Effect API standardizes and safeguards all outbound I/O.

Core Features & Use Cases

  • CreateEffect definitions with typed inputs/outputs using S schemas.
  • Consume effects in handlers via context.effect to ensure preload-safe, idempotent external calls.
  • Support for cache and rateLimit options, and an explicit preload/sequential execution model.

Quick Start

Define an effect with createEffect and call it via context.effect in your Contract.Event handler to safely perform external calls.

Frequently Asked Questions about indexing-external-calls

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent double execution when making external API calls in HyperIndex handlers?

To prevent double execution during external API calls, enforce the Effect API within HyperIndex handlers. Using context.effect standardizes outbound I/O operations and ensures preload-safe, idempotent external interactions.

How do I define typed inputs and outputs for RPCs using S schemas in TypeScript?

You define typed inputs and outputs for RPCs by using createEffect definitions paired with S schemas. This enforces strict input and output validation for external calls before they are consumed by handlers.

Can I configure rate limiting and caching for HTTP requests in HyperIndex?

Yes, you can configure caching and rate limiting for HTTP requests. The Effect API supports configurable cache and rateLimit options to manage external call frequency and response storage within handlers.

What is the difference between preload and sequential execution passes for external calls?

The preload and sequential execution model separates initial data fetching from subsequent processing. Preload guards ensure external calls are idempotent and safely executed during the preload phase before sequential processing begins.

Why do I need to use context.effect for outbound I/O instead of standard async functions?

You need context.effect for outbound I/O to maintain consistent state across HyperIndex passes. Standard async functions risk double execution, whereas context.effect enforces idempotency and integrates with preload guards.