offer

Scaffold a new tariff offer calculator, seed entry, and API wiring.

5|1|Updated Oct 4, 2025
One-click install
npx skills add https://github.com/MyElectricalData/myelectricaldata_new --skill offer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: offer
Source: https://github.com/MyElectricalData/myelectricaldata_new/tree/main/.claude/skills/offer
Command: npx skills add https://github.com/MyElectricalData/myelectricaldata_new --skill offer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates adding a new tariff offer type to the energy offers system by generating the calculator, seeding the pricing types, and wiring it into the API, enabling auto-discovery and end-user usage.

Core Features & Use Cases

  • Create a full calculator class for a new offer code that inherits from BaseOfferCalculator and exposes required attributes.
  • Update seed.py with DEFAULT_PRICING_TYPES and optionally seed default offers.
  • Ensure auto-discovery so the new type appears in the offer-types API and pricing-types endpoint.
  • Validate via step-by-step workflow (01-Explore to 06-Validate) and provide test scaffolding.

Quick Start

Run the interactive workflow to create a new offer type: /offer <CODE> --new

Frequently Asked Questions about offer

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

FAQPage Schema
How do I add a new energy tariff offer type to my API system?

To add a new energy tariff offer type, you scaffold a calculator class inheriting from BaseOfferCalculator, update seed.py with DEFAULT_PRICING_TYPES, and wire the offer into the API. This enables auto-discovery so the new type appears in the offer-types and pricing-types endpoints.

What does scaffolding a tariff calculator class require?

Scaffolding a tariff calculator class requires defining a new class that inherits from BaseOfferCalculator and exposes required pricing attributes. You must read existing offer calculators to understand the pattern, define price fields, and document the process in the API layers.

How do I seed default pricing types for a new energy provider offer?

To seed default pricing types for a new energy provider offer, you update seed.py with DEFAULT_PRICING_TYPES and optionally seed default offers. This ensures the new tariff type is registered and available for end-user consumption through the API.

Can I validate a new tariff offer through a step-by-step workflow?

Yes, you can validate a new tariff offer through a structured step-by-step workflow spanning from 01-Explore to 06-Validate. This process covers planning, implementing, testing, seeding, and validating the new offer through final deployment with test scaffolding.

How does auto-discovery work for new pricing types in the energy offers API?

Auto-discovery for new pricing types works by scaffolding the calculator and updating the seed entry. Once wired into the API, the new offer type automatically appears in the offer-types API and pricing-types endpoint, making it immediately accessible.

What is the process to wire a new tariff offer into the API layer?

Wiring a new tariff offer into the API layer involves creating the calculator class, updating seed.py with DEFAULT_PRICING_TYPES, and documenting the process in the seed and API layers. This ensures the new offer type is auto-discoverable and usable by end-users.