autogenerate-formulas

Convert F-* formula specifications into Python functions with unit tests.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/foolishimp/ai_sdlc_method --skill autogenerate-formulas
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: autogenerate-formulas
Source: https://github.com/foolishimp/ai_sdlc_method/tree/main/plugins/code-skills/skills/generation/autogenerate-formulas
Command: npx skills add https://github.com/foolishimp/ai_sdlc_method --skill autogenerate-formulas

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pytest.

What problem does it solve?

Manually coding mathematical formulas, date calculations, or algorithms is prone to errors and requires careful, repetitive testing. This skill ensures accuracy and consistency.

Core Features & Use Cases

  • Formula Implementation: Translates F-* specifications into executable functions (e.g., Python).
  • Automated Testing: Generates comprehensive tests for each formula, including edge and boundary cases, to verify correctness.
  • Diverse Patterns: Supports arithmetic, date/time, compound interest, percentage, hash, and conversion formulas.
  • Use Case: Provide a formula specification (F-001) for calculating Stripe fees. This skill will generate a Python function calculate_stripe_fee and corresponding tests, ensuring accurate financial calculations.

Quick Start

Autogenerate the Python function and tests for the Stripe fee calculation (F-001) from the attached formula specification.

Frequently Asked Questions about autogenerate-formulas

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

FAQPage Schema
How do I generate Python functions from formula specifications?

Autogenerate production-ready Python functions directly from F-* formula specifications. Provide your formula spec—such as Stripe fee calculations, compound interest, or date arithmetic—and the Skill generates executable functions with type hints, comprehensive docstrings, and full unit test scaffolding.

Can I automatically generate tests for mathematical formulas?

Yes. The Skill generates comprehensive test suites alongside each formula, including edge cases, boundary conditions, and rounding validation. Tests are built with pytest and cover arithmetic accuracy, datetime operations, and decimal precision to two places.

What types of formulas can be converted to Python code?

Arithmetic, date/time, compound interest, percentage reduction, hash, and conversion formulas are supported. Use cases include Stripe fee calculations, token expiry logic, discount computations, and any formula pattern that needs reliable, tested implementation.

How accurate are the generated financial calculations?

Generated functions implement correct rounding to two decimals, fixed-amount constants, and precise datetime arithmetic. Each function includes comprehensive docstrings with examples and is validated by auto-generated unit tests before production use.

Do I need to write test cases manually?

No. The Skill auto-generates pytest-based test scaffolding with edge and boundary case coverage for each formula. You receive both the function and its complete test suite ready to run.