{"skills":[{"name":"Scale bread using baker\u2019s percentages","description":"Keep hydration and salt consistent when changing flour quantity, including the flour and water already inside a preferment.","content":"# Scale bread using baker\u2019s percentages\n\nKeep hydration and salt consistent when changing flour quantity, including the flour and water already inside a preferment.\n\n## When to use this skill\n\n- Someone wants a sourdough or yeasted loaf scaled to a different flour weight or a target dough weight.\n- A recipe gives baker's percentages and the person needs gram weights.\n- Someone wants to know how much flour, water and salt to add to the starter they keep.\n\n## When not to use it\n\n- Cakes, biscuits and batters. Use the cake tin or recipe resize skills; baker's percentages are a bread convention.\n- Diagnosing proofing, fermentation or oven problems. The arithmetic fixes quantities, not timings or temperatures.\n- Starters containing milk, sugar or a commercial mix, unless their composition is given.\n\n## What you need\n\n- Formula with ingredient masses or percentages, flour types, and any starter's mass and hydration.\n- Target total flour or target dough mass, and the amount of starter to retain. Use grams or state the source units.\n\n## Ask before you start\n\nIf any of these are missing or unclear, ask before doing the work.\n\n- Do you want a set total flour weight or a set total dough weight?\n- What hydration and salt percentage do you want, and are they percentages of all the flour, including the starter's?\n- How much starter or preferment will you use, what is its hydration (water as a percentage of its own flour), and is it only flour and water?\n\n## Method\n\n1. Confirm the basis. Overall percentages count all flour and water, including what is in the preferment, with total flour as 100%. If a recipe treats the preferment as a separate ingredient, convert to overall figures before scaling.\n2. Split the preferment. With hydration h as a fraction, its flour = mass \u00f7 (1 + h) and its water = mass minus that flour. A 200 g starter at 100% holds 100 g of each; at 80% it holds 111.1 g flour and 88.9 g water.\n3. Find total flour. For a flour target use it directly. For a dough-weight target divide the weight by the sum of the overall percentages as decimals, with flour as 1 (70% water and 2% salt sum to 1.72).\n4. Total water = total flour \u00d7 hydration and salt = total flour \u00d7 salt %. Keep milk, eggs and butter separate from hydration unless the recipe gives their water content.\n5. Subtract the preferment's flour and water to get what to add, counting its contents once. If its hydration is unknown, give the total dough weight and salt but leave added flour and water unresolved ('unknown-starter'). If an addition would be negative, flag 'incompatible-target'.\n6. Check by rebuilding the dough: added plus preferment flour equals total flour, added plus preferment water divided by total flour equals the hydration, and all parts add up to the dough weight. Round to one decimal gram only at the end.\n\n## Checks before you deliver\n\n- Adding starter as well as 100% of the intended flour double-counts its contents.\n- Starter hydration is relative to the flour inside the starter. A 100% starter is half water by mass.\n- Dividing a 1,000 g dough target by 1.72 and then adding the 200 g starter on top makes a 1,200 g dough.\n- Rounding total flour before deriving the rest: at 1000 \u00f7 1.72 the salt is 11.6 g, not 12 g.\n\n## How to present the result\n\nStart with what to weigh: 'To your 200 g starter add 481.4 g flour, 307 g water and 11.6 g salt.' Then a small table with rows for flour, water and salt and columns for total, in the starter and to add, followed by the check line (total dough weight and hydration). If anything is unresolved, say which figure is missing.\n\n## Worked example\n\n**Request:** Scale this simple dough while keeping my starter amount.\n\n**Supplied material:**\n\n```text\nTarget total flour 1000 g. Hydration 70%, salt 2%. Retain 200 g of flour-and-water, salt-free starter at 100% hydration. No other ingredients.\n```\n\n**Answer:** To the 200 g starter, add 900 g flour, 600 g water and 20 g salt. The starter supplies another 100 g each of flour and water, making 1,720 g of dough at 70% hydration.\n\n## Structured output for tests\n\nFor an ordinary job, answer in the format above and point back to the supplied evidence. Use this structure only for the test cases published with this skill, or when someone asks for structured JSON.\n\nReturn add_flour_g, add_water_g, add_salt_g, and dough_g rounded to one decimal; starter_g is the retained starter mass. For missing composition use null only where the result cannot be determined. Return issue as null, 'unknown-starter' or 'incompatible-target'. Assume a flour-and-water, salt-free starter only when stated.\n\n## Sources\n\n- [King Arthur Baking: baker's percentage](https:\/\/www.kingarthurbaking.com\/pro\/reference\/bakers-percentage): The professional reference sets flour at 100%, defines hydration on flour weight, breaks a poolish into its flour and water to give an overall formula, and scales to a new dough weight by dividing it by the sum of the percentages. The skill's dough-weight method follows this.\n- [The Perfect Loaf: introduction to baker's percentages](https:\/\/www.theperfectloaf.com\/reference\/introduction-to-bakers-percentages): A practitioner's worked sourdough example that counts the levain's flour and water in the total formula and derives the levain's own percentages from the flour inside it. It shows the starter split the skill uses.\n\nTest cases and an answer checker for this skill: https:\/\/skills.raq.com\/skills\/scale-bread-by-bakers-percentage\n","scope":"contextual","trigger_keywords":["Scale bread using baker\u2019s percentages","scale-bread-by-bakers-percentage","scale bread by bakers percentage","How do I scale this sourdough recipe up to 1 kg of flour?","How do I scale this sourdough recipe up to 1 kg of flour","baker's percentage","baker\u2019s percentage","bakers percentages"],"is_private":true,"is_active":true,"scripts":[{"name":"scale-bread-by-bakers-percentage-check","description":"Compare a saved JSON answer with a published test. Pass tests\/case-1\/expected.json (or another case) and the path to your answer.","language":"python","filename":"scale-bread-by-bakers-percentage-check.py","content":"from pathlib import Path\nimport runpy\n\nrunpy.run_path(str(Path(__file__).parent \/ 'tests' \/ 'check.py'), run_name='__main__')\n","supporting_files":[{"path":"SKILL.md","content":"---\nname: scale-bread-by-bakers-percentage\ndescription: \"Scale a bread formula by baker's percentages, counting the flour and water inside a starter, levain or poolish so hydration and salt stay right. Use when someone asks to scale a dough, hit a target dough weight, convert baker's percentages to grams or work out what to add to their sourdough starter.\"\nlicense: CC-BY-4.0\nmetadata:\n  author: Raq.com\n  version: \"2026-11-22\"\n  homepage: https:\/\/skills.raq.com\/skills\/scale-bread-by-bakers-percentage\n---\n\n# Scale bread using baker\u2019s percentages\n\nKeep hydration and salt consistent when changing flour quantity, including the flour and water already inside a preferment.\n\n## When to use this skill\n\n- Someone wants a sourdough or yeasted loaf scaled to a different flour weight or a target dough weight.\n- A recipe gives baker's percentages and the person needs gram weights.\n- Someone wants to know how much flour, water and salt to add to the starter they keep.\n\n## When not to use it\n\n- Cakes, biscuits and batters. Use the cake tin or recipe resize skills; baker's percentages are a bread convention.\n- Diagnosing proofing, fermentation or oven problems. The arithmetic fixes quantities, not timings or temperatures.\n- Starters containing milk, sugar or a commercial mix, unless their composition is given.\n\n## What you need\n\n- Formula with ingredient masses or percentages, flour types, and any starter's mass and hydration.\n- Target total flour or target dough mass, and the amount of starter to retain. Use grams or state the source units.\n\n## Ask before you start\n\nIf any of these are missing or unclear, ask before doing the work.\n\n- Do you want a set total flour weight or a set total dough weight?\n- What hydration and salt percentage do you want, and are they percentages of all the flour, including the starter's?\n- How much starter or preferment will you use, what is its hydration (water as a percentage of its own flour), and is it only flour and water?\n\n## Method\n\n1. Confirm the basis. Overall percentages count all flour and water, including what is in the preferment, with total flour as 100%. If a recipe treats the preferment as a separate ingredient, convert to overall figures before scaling.\n2. Split the preferment. With hydration h as a fraction, its flour = mass \u00f7 (1 + h) and its water = mass minus that flour. A 200 g starter at 100% holds 100 g of each; at 80% it holds 111.1 g flour and 88.9 g water.\n3. Find total flour. For a flour target use it directly. For a dough-weight target divide the weight by the sum of the overall percentages as decimals, with flour as 1 (70% water and 2% salt sum to 1.72).\n4. Total water = total flour \u00d7 hydration and salt = total flour \u00d7 salt %. Keep milk, eggs and butter separate from hydration unless the recipe gives their water content.\n5. Subtract the preferment's flour and water to get what to add, counting its contents once. If its hydration is unknown, give the total dough weight and salt but leave added flour and water unresolved ('unknown-starter'). If an addition would be negative, flag 'incompatible-target'.\n6. Check by rebuilding the dough: added plus preferment flour equals total flour, added plus preferment water divided by total flour equals the hydration, and all parts add up to the dough weight. Round to one decimal gram only at the end.\n\n## Checks before you deliver\n\n- Adding starter as well as 100% of the intended flour double-counts its contents.\n- Starter hydration is relative to the flour inside the starter. A 100% starter is half water by mass.\n- Dividing a 1,000 g dough target by 1.72 and then adding the 200 g starter on top makes a 1,200 g dough.\n- Rounding total flour before deriving the rest: at 1000 \u00f7 1.72 the salt is 11.6 g, not 12 g.\n\n## How to present the result\n\nStart with what to weigh: 'To your 200 g starter add 481.4 g flour, 307 g water and 11.6 g salt.' Then a small table with rows for flour, water and salt and columns for total, in the starter and to add, followed by the check line (total dough weight and hydration). If anything is unresolved, say which figure is missing.\n\n## Worked example\n\n**Request:** Scale this simple dough while keeping my starter amount.\n\n**Supplied material:**\n\n```text\nTarget total flour 1000 g. Hydration 70%, salt 2%. Retain 200 g of flour-and-water, salt-free starter at 100% hydration. No other ingredients.\n```\n\n**Answer:** To the 200 g starter, add 900 g flour, 600 g water and 20 g salt. The starter supplies another 100 g each of flour and water, making 1,720 g of dough at 70% hydration.\n\n## Structured output for tests\n\nFor an ordinary job, answer in the format above and point back to the supplied evidence. Use this structure only for the test cases published with this skill, or when someone asks for structured JSON.\n\nReturn add_flour_g, add_water_g, add_salt_g, and dough_g rounded to one decimal; starter_g is the retained starter mass. For missing composition use null only where the result cannot be determined. Return issue as null, 'unknown-starter' or 'incompatible-target'. Assume a flour-and-water, salt-free starter only when stated.\n\n## Sources\n\n- [King Arthur Baking: baker's percentage](https:\/\/www.kingarthurbaking.com\/pro\/reference\/bakers-percentage): The professional reference sets flour at 100%, defines hydration on flour weight, breaks a poolish into its flour and water to give an overall formula, and scales to a new dough weight by dividing it by the sum of the percentages. The skill's dough-weight method follows this.\n- [The Perfect Loaf: introduction to baker's percentages](https:\/\/www.theperfectloaf.com\/reference\/introduction-to-bakers-percentages): A practitioner's worked sourdough example that counts the levain's flour and water in the total formula and derives the levain's own percentages from the flour inside it. It shows the starter split the skill uses.\n\nTest cases and an answer checker for this skill: https:\/\/skills.raq.com\/skills\/scale-bread-by-bakers-percentage\n"},{"path":"LICENSE.txt","content":"Original Raq.com instructions and synthetic examples: CC BY 4.0.\nhttps:\/\/creativecommons.org\/licenses\/by\/4.0\/\nAttribution: Raq.com, https:\/\/skills.raq.com\/skills\/scale-bread-by-bakers-percentage\nReferenced third-party materials retain their own terms.\n"},{"path":"examples\/worked-example.md","content":"# A starter contributes to both totals\n\nScale this simple dough while keeping my starter amount.\n\n## Supplied material\n\nTarget total flour 1000 g. Hydration 70%, salt 2%. Retain 200 g of flour-and-water, salt-free starter at 100% hydration. No other ingredients.\n\n## Worked answer\n\nTo the 200 g starter, add 900 g flour, 600 g water and 20 g salt. The starter supplies another 100 g each of flour and water, making 1,720 g of dough at 70% hydration.\n\n## Reasoning\n\nThe 200 g starter already contains 100 g flour and 100 g water.\n"},{"path":"tests\/check.py","content":"\"\"\"Check a saved agent answer locally with Python 3 (standard library only).\"\"\"\nimport json\nimport math\nimport sys\nfrom pathlib import Path\n\n\ndef compare(expected, actual, path=\"$\", accepted=None):\n    if isinstance(expected, bool) or isinstance(actual, bool):\n        if expected is not actual:\n            yield path\n    elif isinstance(expected, (int, float)) and isinstance(actual, (int, float)):\n        if not math.isclose(expected, actual, rel_tol=0, abs_tol=1e-8):\n            yield path\n    elif isinstance(expected, dict) and isinstance(actual, dict):\n        for key in sorted(set(expected) | set(actual)):\n            if key not in expected or key not in actual:\n                yield f\"{path}.{key}\"\n            elif not any(\n                not list(compare(option, actual[key]))\n                for option in (accepted or {}).get(key, [])\n            ):\n                yield from compare(expected[key], actual[key], f\"{path}.{key}\")\n    elif isinstance(expected, list) and isinstance(actual, list):\n        if len(expected) != len(actual):\n            yield f\"{path} (length)\"\n        for i, (left, right) in enumerate(zip(expected, actual)):\n            yield from compare(left, right, f\"{path}[{i}]\")\n    elif type(expected) != type(actual) or expected != actual:\n        yield path\n\n\ndef main():\n    if len(sys.argv) != 3:\n        raise SystemExit(\"Usage: python3 check.py expected.json answer.json\")\n    try:\n        expected, actual = [json.loads(Path(p).read_text(encoding=\"utf-8\")) for p in sys.argv[1:]]\n        alternatives = Path(sys.argv[1]).with_name(\"accepted.json\")\n        accepted = json.loads(alternatives.read_text(encoding=\"utf-8\")) if alternatives.is_file() else {}\n    except (ValueError, OSError) as error:\n        raise SystemExit(str(error))\n    differences = list(compare(expected, actual, accepted=accepted))\n    if differences:\n        raise SystemExit(\"Different fields: \" + \", \".join(differences))\n    print(\"Pass\")\n\n\nif __name__ == \"__main__\":\n    main()\n"},{"path":"tests\/README.md","content":"Give your agent SKILL.md and one request.txt in a fresh session. Keep the expected answer aside. Save the reply as answer.json, then run this from the tests folder:\n\n    python3 check.py case-1\/expected.json answer.json\n\nEach case also has an explanation. Where accepted.json exists, the checker accepts the alternatives listed there.\n"},{"path":"tests\/case-1\/request.txt","content":"Scale this simple dough while keeping my starter amount.\nReturn only the JSON specified in SKILL.md for this test.\n\nTarget total flour 1000 g. Hydration 70%, salt 2%. Retain 200 g of flour-and-water, salt-free starter at 100% hydration. No other ingredients.\n"},{"path":"tests\/case-1\/expected.json","content":"{\n    \"add_flour_g\": 900,\n    \"add_water_g\": 600,\n    \"add_salt_g\": 20,\n    \"dough_g\": 1720,\n    \"starter_g\": 200,\n    \"issue\": null\n}\n"},{"path":"tests\/case-1\/explanation.txt","content":"The 200 g starter already contains 100 g flour and 100 g water.\n"},{"path":"tests\/case-2\/request.txt","content":"Show what can be established before mixing.\nReturn only the JSON specified in SKILL.md for this test.\n\nTarget total flour 500 g with 65% water and 2% salt. Retain 80 g flour-and-water starter, salt-free, hydration unknown. No other ingredients.\n"},{"path":"tests\/case-2\/expected.json","content":"{\n    \"add_flour_g\": null,\n    \"add_water_g\": null,\n    \"add_salt_g\": 10,\n    \"dough_g\": 835,\n    \"starter_g\": 80,\n    \"issue\": \"unknown-starter\"\n}\n"},{"path":"tests\/case-2\/explanation.txt","content":"The overall formula fixes total dough and salt. Only the split between added flour and water is unresolved.\n"},{"path":"tests\/case-3\/request.txt","content":"What do I weigh for a one-kilo dough?\nReturn only the JSON specified in SKILL.md for this test.\n\nTarget dough 1000 g, containing only total flour, 70% water and 2% salt. Retain 200 g of salt-free flour-and-water levain at 100% hydration.\n"},{"path":"tests\/case-3\/expected.json","content":"{\n    \"add_flour_g\": 481.4,\n    \"add_water_g\": 307,\n    \"add_salt_g\": 11.6,\n    \"dough_g\": 1000,\n    \"starter_g\": 200,\n    \"issue\": null\n}\n"},{"path":"tests\/case-3\/explanation.txt","content":"The total flour is 1000\/1.72 g. The levain already contributes 100 g of that flour and 100 g of water.\n"}],"is_active":true,"is_approved":false}]}]}