IPCA & IGP-M — Motor de Reajuste Contratual

Calculate contractual price adjustments using IPCA and IGP-M from public APIs.

Updated Mar 4, 2026
One-click install
npx skills add https://github.com/joabeoliveira/skills --skill ipca-igp-m-motor-de-reajuste-contratual
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: IPCA & IGP-M — Motor de Reajuste Contratual
Source: https://github.com/joabeoliveira/skills/tree/main/.skills/ipca-igpm-API
Command: npx skills add https://github.com/joabeoliveira/skills --skill ipca-igp-m-motor-de-reajuste-contratual

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill solves the complex, error-prone task of calculating contractual price adjustments by leveraging official Brazilian indices (IPCA and IGP-M) retrieved through public APIs, ensuring precise and auditable results.

Core Features & Use Cases

  • Index-based recalculation: computes reajustes using IPCA (Número-Índice) or IGP-M (monthly variation) with correct defasagem rules and optional deflation handling.
  • APIs & data sources: integrates with IBGE SIDRA and Banco Central SGS to fetch index data, includes strict validation (Zod) and precise decimal arithmetic (Prisma Decimal) for storage and downstream computations.
  • Use Case: when a contract anniversary requires a price update, automatically fetches the relevant index values, applies the multiplier, and returns the updated amount for persistence and reporting.

Quick Start

Run a reajuste calculation by providing the original monetary value, the base period (YYYYMM), and the current period (YYYYMM) to obtain the updated amount.

Frequently Asked Questions about IPCA & IGP-M — Motor de Reajuste Contratual

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

FAQPage Schema
How do I calculate contractual price adjustments using IPCA and IGP-M?

To calculate contractual price adjustments, provide the original monetary value, base period, and current period in YYYYMM format. The skill fetches IPCA and IGP-M index data via public APIs and applies the multiplier to return the updated amount.

What data sources are used for fetching IPCA and IGP-M index values?

IPCA and IGP-M index values are fetched from IBGE SIDRA and Banco Central SGS public APIs. The skill retrieves Número-Índice for IPCA and monthly variation for IGP-M to compute accurate contractual updates.

Does the skill handle defasagem rules for contract reajuste calculations?

Yes, the skill handles defasagem rules for contract reajuste calculations. It correctly applies the required defasagem logic for IPCA and IGP-M indices and includes optional deflation handling for precise adjustments.

How does the skill ensure decimal precision during index-based recalculation?

The skill ensures decimal precision during index-based recalculation by using exact decimal arithmetic without intermediate rounding. It integrates Prisma Decimal for storage and downstream computations alongside strict Zod schema validation.

Can I use this skill for rent adjustments and private agreements, or only public contracts?

You can use this skill for rent adjustments and private agreements, as well as public contracts. It applies to any contract requiring index-based updates using IPCA or IGP-M, provided you supply the base and current periods.

Why does my traditional rounding method fail for IPCA and IGP-M reajuste?

Traditional rounding fails for IPCA and IGP-M reajuste because it introduces intermediate precision errors. The skill enforces strict decimal arithmetic without intermediate rounding and validates data with a strict schema to ensure auditable results.