sourdough-formulas

Centralize sourdough calculations for baker's percentages, hydration, and scaling.

Updated Dec 17, 2025
One-click install
npx skills add https://github.com/scottolmer/sourdoughsuitenew --skill sourdough-formulas
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sourdough-formulas
Source: https://github.com/scottolmer/sourdoughsuitenew/tree/main/.claude/skills/sourdough-formulas
Command: npx skills add https://github.com/scottolmer/sourdoughsuitenew --skill sourdough-formulas

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Centralizes sourdough calculation utilities to eliminate duplication across calculators and ensure consistent, maintainable results for the SourdoughSuite app.

Core Features & Use Cases

  • Baker's Percentage Functions:
    • calculateAmountFromPercentage(flourWeight, percentage)
    • calculatePercentageFromAmount(ingredientWeight, flourWeight)
  • Hydration Functions:
    • calculateHydrationPercent(waterWeight, flourWeight)
    • calculateWaterNeeded(waterWeight, targetHydration)
    • calculateFlourNeeded(waterWeight, targetHydration)
  • Scaling Functions:
    • calculateScaleFactor(original, target)
    • scaleAmount(amount, scaleFactor)
  • Starter/Preferment Functions:
    • decomposeLevain(totalLevainWeight, hydration)
    • calculateStarterPercentage(starterFlour, totalFlour)
    • calculatePrefermentFlour(totalFlour, prefermentPercent)
  • Dough Weight Functions:
    • calculatePreBakeWeight(postBakeWeight, bakingLossPercent)
    • calculateWeightLoss(preBakeWeight, postBakeWeight)
    • calculateWeightLossPercent(preBakeWeight, postBakeWeight)
  • Temperature Functions:
    • calculateWaterTemperature(targetDDT, roomTemp, flourTemp, starterTemp, frictionFactor)
  • Utility Functions:
    • roundTo(value, decimals = 1)
    • formatWeight(grams, decimals = 0)
    • formatPercent(percent, decimals = 1)
    • validatePositiveNumber(value, fieldName)
    • validatePercentage(value, fieldName)

Quick Start

Use the sourdough-formulas library to perform core calculations by importing from src/utils/sourdoughCalculations.ts, then call the desired functions (e.g., calculateAmountFromPercentage, formatWeight) in your calculator screens or tests.

Frequently Asked Questions about sourdough-formulas

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

FAQPage Schema
How do I calculate baker's percentages and hydration for sourdough recipes in TypeScript?

To calculate baker's percentages and hydration in TypeScript, use the centralized utility library to compute ingredient ratios, scale recipes, and derive water weight from target hydration percentages. It provides dedicated functions like calculateHydrationPercent and calculateAmountFromPercentage for consistent sourdough math.

What is the best way to scale sourdough dough weights and calculate baking loss?

The best way to scale dough weights and calculate baking loss is using a dedicated utility library that applies scale factors to original amounts and computes post-bake weight loss percentages. This ensures accurate scaling across different batch sizes without manual calculation errors.

Can I use this sourdough calculation library in a React Native project?

Yes, you can use this sourdough calculation library in a React Native project. It requires only standard TypeScript utilities and can be imported directly from the source file to power calculator screens and recipe workflows without additional dependencies.

How do you calculate water temperature for a target dough temperature?

You calculate water temperature for a target dough temperature by using the desired dough temperature formula, which factors in room temperature, flour temperature, starter temperature, and a friction factor. The calculateWaterTemperature function automates this thermal calculation.

Does this library include functions for decomposing levain and preferment calculations?

Yes, the library includes functions for decomposing levain and preferment calculations. You can use decomposeLevain to break down total levain weight by hydration, and calculatePrefermentFlour to determine the flour needed based on a preferment percentage of total flour.

Why do I need a centralized utility library for sourdough math instead of writing custom calculations?

You need a centralized utility library for sourdough math to eliminate calculation duplication, ensure consistent results across calculators, and enable safer refactoring. It provides well-tested functions for baker's percentages and hydration, preventing mathematical inconsistencies in your application.