{"id":"d7f7a900-34ab-43ce-be51-c5e7fc13ca48","shortId":"4G8FkY","kind":"skill","title":"polyfactory","tagline":"Auto-activate for polyfactory imports, ModelFactory, DataclassFactory, MsgspecFactory, AttrsFactory, Use, Fixture, register_fixture, polyfactory.pytest_plugin, __random_seed__, or coverage(). Use when generating typed mock data for tests or pytest fixtures. Not for production see","description":"# polyfactory\n\nPolyfactory is a typed mock-data factory library: declare `ModelFactory[T]` (or `DataclassFactory`, `MsgspecFactory`, `AttrsFactory`, `TypedDictFactory`) and `.build()` returns a fully-populated, validation-passing instance of `T`. Because the factory inspects the model's annotations and constraints, generated data already respects `msgspec.Meta` ranges, Pydantic `Field` constraints, and attrs validators — no additional fixtures needed for happy-path tests.\n\nIn Litestar projects, polyfactory's pytest plugin is the canonical way to feed `TestClient.post(...)` / `AsyncTestClient.put(...)` payloads. The companion skill `litestar:litestar-testing` covers the request side.\n\n## Code Style Rules\n\n- PEP 604 unions: `T | None`, never `Optional[T]`.\n- **`from __future__ import annotations` rule** — Modules that **define** factory subclasses with introspected `Meta` config (`__model__`, `__random_seed__`, `__set_as_default_factory_for_type__`) are library-like and SHOULD avoid future annotations on the factory module itself if the model class is also defined there. Test modules that *use* factories (call `.build()`, register fixtures) MAY and typically SHOULD use future annotations — they are pure consumer code. The same rule applies as msgspec/dishka/SAQ.\n- One factory per model. Don't reuse a factory across unrelated models — clarity beats DRY when the test fails at 3am.\n- Pick the right factory base by backend: `ModelFactory` (Pydantic), `DataclassFactory`, `MsgspecFactory`, `AttrsFactory`, `TypedDictFactory`. The wrong base silently degrades to attribute-by-attribute introspection and produces lower-quality data.\n- Prefer `register_fixture` over hand-rolled `@pytest.fixture` wrappers — it gives you both the fixture and the factory class with one decorator.\n\n## Quick Reference\n\n### Picking the right factory base\n\n| Model kind | Factory base | Import |\n| --- | --- | --- |\n| `pydantic.BaseModel` | `ModelFactory` | `from polyfactory.factories.pydantic_factory import ModelFactory` |\n| `@dataclass` | `DataclassFactory` | `from polyfactory.factories import DataclassFactory` |\n| `msgspec.Struct` | `MsgspecFactory` | `from polyfactory.factories.msgspec_factory import MsgspecFactory` |\n| `@attrs.define` / `attr.s` | `AttrsFactory` | `from polyfactory.factories.attrs_factory import AttrsFactory` |\n| `TypedDict` | `TypedDictFactory` | `from polyfactory.factories.typed_dict_factory import TypedDictFactory` |\n| Beanie / Odmantic / SQLA | dedicated bases | see [factories.md](references/factories.md) |\n\n### Defining a factory\n\n```python\nfrom dataclasses import dataclass\nfrom polyfactory.factories import DataclassFactory\n\n\n@dataclass\nclass Order:\n    id: int\n    customer_email: str\n    total_cents: int\n    status: str\n\n\nclass OrderFactory(DataclassFactory[Order]):\n    __model__ = Order\n\n\n# Use it\none = OrderFactory.build()\nmany = OrderFactory.batch(10)\n```\n\n`build()` returns a single populated instance. `batch(n)` returns `list[T]` of size `n`. `coverage()` yields one instance per Union/Optional branch — useful for parametrized tests across discriminated unions.\n\n### Customizing fields\n\n```python\nfrom polyfactory import Use\nfrom polyfactory.factories import DataclassFactory\n\n\nclass OrderFactory(DataclassFactory[Order]):\n    __model__ = Order\n\n    # Plain literal — every build returns this exact value\n    status = \"pending\"\n\n    # Callable — re-evaluated per build\n    customer_email = Use(lambda: \"test@example.com\")\n\n    # Random choice — re-evaluated per build\n    total_cents = Use(DataclassFactory.__random__.randint, 100, 10_000)\n```\n\n`Use(callable, *args, **kwargs)` is re-invoked on every `build()`, so each generated instance gets a fresh value.\n\n### Determinism\n\n```python\nclass OrderFactory(DataclassFactory[Order]):\n    __model__ = Order\n    __random_seed__ = 42  # same seed → same output across runs\n```\n\nSet `__random_seed__` (or `__faker__ = Faker(seed=...)` for finer Faker control) when test assertions depend on the exact generated values.\n\n### Default factory registration\n\n```python\nclass CustomerFactory(DataclassFactory[Customer]):\n    __model__ = Customer\n    __set_as_default_factory_for_type__ = True\n\n\n@dataclass\nclass Order:\n    id: int\n    customer: Customer  # automatically populated by CustomerFactory.build()\n\n\nclass OrderFactory(DataclassFactory[Order]):\n    __model__ = Order\n```\n\nWhen `__set_as_default_factory_for_type__ = True`, polyfactory uses that factory whenever the type appears as a field on another model — no manual nesting required.\n\n### Pytest fixture from a factory\n\n```python\nimport pytest\nfrom polyfactory.pytest_plugin import register_fixture\nfrom polyfactory.factories import DataclassFactory\n\n\n@register_fixture\nclass OrderFactory(DataclassFactory[Order]):\n    __model__ = Order\n\n\ndef test_order_total(order_factory: OrderFactory) -> None:\n    order = order_factory.build()\n    assert order.total_cents >= 0\n```\n\n`@register_fixture` turns the class into a pytest fixture (snake-cased class name). The factory itself is still importable as `OrderFactory` for use outside fixtures.\n\n### Cross-referencing fixtures\n\n```python\nimport pytest\nfrom polyfactory import Fixture\nfrom polyfactory.pytest_plugin import register_fixture\n\n\n@register_fixture\nclass CustomerFactory(DataclassFactory[Customer]):\n    __model__ = Customer\n\n\n@register_fixture\nclass OrderFactory(DataclassFactory[Order]):\n    __model__ = Order\n    customer = Fixture(CustomerFactory)  # pull from the customer fixture\n```\n\n`Fixture(OtherFactory)` forwards to another registered factory, making cross-model wiring explicit.\n\n<workflow>\n\n## Workflow\n\n### Step 1: Pick the factory base\n\nMatch the base to your model backend (table above). Wrong base = silent degradation to generic attribute introspection. If your project uses multiple backends (e.g., Pydantic for HTTP DTOs + msgspec for internal events), import each base separately and don't try to share a factory across backends.\n\n### Step 2: Define one factory per model\n\nSubclass the appropriate base, set `__model__`. Keep the factory adjacent to the test files that consume it — typically `tests/factories.py` or `tests/<feature>/factories.py`. Don't put factories in production code paths.\n\n### Step 3: Customize only what the test cares about\n\nIf a field can take any valid value, leave it for the factory to randomize. Override (literal value or `Use(...)`) only fields the assertion depends on. Tests that pin every field defeat the purpose of using a factory.\n\n### Step 4: Register as a pytest fixture (if used widely)\n\nFor factories used in many tests, decorate with `@register_fixture` and consume via the snake-cased fixture name. For one-off use, call `Factory.build()` directly inline.\n\n### Step 5: Wire cross-model relationships\n\nSet `__set_as_default_factory_for_type__ = True` on a base factory and let nested fields be populated automatically, or use `Fixture(OtherFactory)` to forward to a registered fixture explicitly.\n\n### Step 6: Pin determinism only when needed\n\nTests that assert on specific generated values need `__random_seed__`. Tests that assert on shape or invariants (e.g., `total >= 0`) should not — leaving randomization on widens coverage across runs.\n\n</workflow>\n\n<guardrails>\n\n## Guardrails\n\n- **Always set `__model__`.** The factory base reads `__model__` to introspect annotations; without it `.build()` errors at runtime, not at class definition.\n- **Don't override fields you're about to assert on with random values.** Either pin the value (`status = \"pending\"`) or assert on shape, not both.\n- **Don't reuse `__random_seed__` across factories that share a Faker instance.** They will collide and produce unexpected duplicates. Use a different seed per factory or a single shared seeded `__faker__`.\n- **Use the right base for the backend.** `ModelFactory` on a `msgspec.Struct` falls back to generic introspection and can produce values that violate `Meta` constraints. Always use `MsgspecFactory` for msgspec.\n- **Factories belong under `tests/`.** Importing them from production modules ties test data to runtime code and is a refactor hazard.\n- **`coverage()` is a parametrize tool, not a build tool.** It returns one instance per Union/Optional branch, not per field — use it via `pytest.mark.parametrize` to fan out test cases over polymorphic shapes.\n- **`from __future__ import annotations`** — same rule as msgspec / dishka. The module that *defines* the factory + model SHOULD avoid future annotations if the model is runtime-introspected. Test modules that *use* factories MAY freely use future annotations.\n\n</guardrails>\n\n<validation>\n\n## Validation Checkpoint\n\nBefore delivering polyfactory code, verify:\n\n- [ ] Factory base matches the model backend (Pydantic → `ModelFactory`, dataclass → `DataclassFactory`, msgspec → `MsgspecFactory`, attrs → `AttrsFactory`).\n- [ ] `__model__` is set on every factory subclass.\n- [ ] Factories live under `tests/` (or a sibling test-only module), never in production code.\n- [ ] Fields overridden in the factory match what the test asserts on; fields the test does not care about are left for randomization.\n- [ ] If the test asserts on exact values, `__random_seed__` is set; otherwise it is not.\n- [ ] `@register_fixture` is used for factories shared across more than ~2 test files; one-offs call `.build()` inline.\n- [ ] Cross-model relationships use `__set_as_default_factory_for_type__` or `Fixture(OtherFactory)` (not manual nesting in `Use(...)`).\n- [ ] Factory module avoids `from __future__ import annotations` if and only if it co-defines runtime-introspected model classes.\n\n</validation>\n\n<example>\n\n## Example: Litestar handler test with msgspec DTOs and polyfactory\n\n```python\n# tests/factories.py\nfrom polyfactory.factories.msgspec_factory import MsgspecFactory\nfrom polyfactory.pytest_plugin import register_fixture\n\nfrom myapp.events import OrderCreatedEvent  # msgspec.Struct\n\n\n@register_fixture\nclass OrderCreatedEventFactory(MsgspecFactory[OrderCreatedEvent]):\n    __model__ = OrderCreatedEvent\n```\n\n```python\n# tests/test_orders.py\nfrom __future__ import annotations  # consumer module — fine to use future annotations\n\nfrom litestar.testing import AsyncTestClient\n\nimport pytest\n\n\n@pytest.mark.anyio\nasync def test_create_order_emits_event(\n    client: AsyncTestClient,\n    order_created_event_factory: OrderCreatedEventFactory,\n) -> None:\n    payload = order_created_event_factory.build()\n    response = await client.post(\"/orders\", json=payload)\n\n    assert response.status_code == 201\n    assert response.json()[\"id\"] == payload.id\n```\n\nThe factory provides a fully-populated, validation-passing `OrderCreatedEvent`; the test focuses on the request/response contract instead of constructing fake data inline.\n\n</example>\n\n---\n\n## References Index\n\nFor detailed guides, refer to the following documents in `references/`:\n\n- **[Factories](references/factories.md)** — Per-backend factory bases (Pydantic / dataclass / msgspec / attrs / TypedDict / ODM), randomization control (`__random_seed__`, `__faker__`, `__allow_none_optionals__`), `__set_as_default_factory_for_type__` defaults, dynamic factories via `Factory.create_factory`, `coverage()` for discriminated unions.\n- **[Pytest integration](references/pytest-integration.md)** — `@register_fixture`, `Fixture(...)` cross-references, fixture scoping, the `polyfactory.pytest_plugin` module, async fixtures, and the difference between class-decorator and function-decorator forms.\n- **[Litestar patterns](references/litestar-patterns.md)** — Using factories with `TestClient` / `AsyncTestClient`, parametrizing handler tests via `coverage()`, integrating with `litestar-testing` fixtures, msgspec DTOs, advanced-alchemy model factories, and SAQ task payload generation.\n\n---\n\n## Official References\n\n- <https://polyfactory.litestar.dev/>\n- <https://polyfactory.litestar.dev/usage/index.html>\n- <https://polyfactory.litestar.dev/usage/library_factories/index.html>\n- <https://polyfactory.litestar.dev/usage/decorators.html>\n- <https://polyfactory.litestar.dev/usage/fixtures.html>\n- <https://polyfactory.litestar.dev/usage/configuration.html>\n- <https://github.com/litestar-org/polyfactory>\n\n## Shared Styleguide Baseline\n\n- [General Principles](../litestar-styleguide/references/general.md)\n- [Python](../litestar-styleguide/references/python.md)","tags":["polyfactory","litestar","skills","litestar-org","advanced-alchemy","agent-skills","agentskills","ai-agents","claude-code-plugin","claude-code-skills","gemini-cli-extension","htmx"],"capabilities":["skill","source-litestar-org","skill-polyfactory","topic-advanced-alchemy","topic-agent-skills","topic-agentskills","topic-ai-agents","topic-claude-code-plugin","topic-claude-code-skills","topic-gemini-cli-extension","topic-htmx","topic-inertia","topic-litestar","topic-mcp","topic-python"],"categories":["litestar-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/litestar-org/litestar-skills/polyfactory","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add litestar-org/litestar-skills","source_repo":"https://github.com/litestar-org/litestar-skills","install_from":"skills.sh"}},"qualityScore":"0.453","qualityRationale":"deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 7 github stars · SKILL.md body (12,342 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:13:55.348Z","embedding":null,"createdAt":"2026-05-18T13:20:59.674Z","updatedAt":"2026-05-18T19:13:55.348Z","lastSeenAt":"2026-05-18T19:13:55.348Z","tsv":"'/factories.py':773 '/litestar-org/polyfactory':1512 '/litestar-styleguide/references/general.md':1518 '/litestar-styleguide/references/python.md':1520 '/orders':1348 '/usage/configuration.html':1509 '/usage/decorators.html':1503 '/usage/fixtures.html':1506 '/usage/index.html':1497 '/usage/library_factories/index.html':1500 '0':611,930 '000':455 '1':694 '10':375,454 '100':453 '2':746,1225 '201':1354 '3':783 '3am':229 '4':830 '42':485 '5':868 '6':905 '604':130 'across':218,401,490,743,938,992,1222 'activ':4 'addit':91 'adjac':761 'advanc':1483 'advanced-alchemi':1482 'alchemi':1484 'allow':1413 'alreadi':80 'also':179 'alway':941,1042 'annot':75,140,168,197,951,1101,1117,1134,1259,1313,1320 'anoth':566,683 'appear':561 'appli':206 'appropri':754 'arg':458 'assert':505,608,814,913,923,970,982,1187,1203,1351,1355 'async':1328,1447 'asynctestcli':1324,1336,1468 'asynctestclient.put':113 'attr':88,1154,1405 'attr.s':315 'attribut':250,252,714 'attribute-by-attribut':249 'attrs.define':314 'attrsfactori':11,53,241,316,321,1155 'auto':3 'auto-activ':2 'automat':536,892 'avoid':166,1115,1255 'await':1346 'back':1030 'backend':236,705,721,744,1024,1147,1399 'base':234,245,288,292,334,698,701,709,733,755,884,946,1021,1143,1401 'baselin':1515 'batch':382 'beani':330 'beat':222 'belong':1048 'branch':396,1082 'build':56,188,376,424,436,448,466,954,1074,1232 'call':187,863,1231 'callabl':431,457 'canon':108 'care':789,1194 'case':623,855,1094 'cent':359,450,610 'checkpoint':1136 'choic':443 'clariti':221 'class':177,278,351,363,415,477,516,530,540,592,616,624,657,665,960,1272,1302,1454 'class-decor':1453 'client':1335 'client.post':1347 'co':1266 'co-defin':1265 'code':126,202,780,1061,1140,1177,1353 'collid':1001 'companion':116 'config':150 'constraint':77,86,1041 'construct':1379 'consum':201,767,850,1314 'contract':1376 'control':502,1409 'cover':122 'coverag':21,390,937,1067,1428,1473 'creat':1331,1338 'cross':639,688,871,1235,1439 'cross-model':687,870,1234 'cross-refer':1438 'cross-referenc':638 'custom':355,404,437,519,521,534,535,660,662,671,677,784 'customerfactori':517,658,673 'customerfactory.build':539 'data':27,44,79,259,1058,1381 'dataclass':301,343,345,350,529,1150,1403 'dataclassfactori':9,51,239,302,306,349,365,414,417,479,518,542,589,594,659,667,1151 'dataclassfactory.__random__.randint':452 'declar':47 'decor':281,845,1455,1459 'dedic':333 'def':598,1329 'default':156,512,524,549,877,1241,1418,1422 'defeat':822 'defin':144,180,338,747,1110,1267 'definit':961 'degrad':247,711 'deliv':1138 'depend':506,815 'detail':1386 'determin':475,907 'dict':326 'differ':1008,1451 'direct':865 'discrimin':402,1430 'dishka':1106 'document':1392 'dri':223 'dtos':726,1279,1481 'duplic':1005 'dynam':1423 'e.g':722,928 'either':975 'email':356,438 'emit':1333 'error':955 'evalu':434,446 'event':730,1334,1339 'everi':423,465,820,1160 'exact':427,509,1205 'exampl':1273 'explicit':691,903 'factori':45,70,145,157,171,186,210,217,233,277,287,291,298,311,319,327,340,513,525,550,557,576,603,627,685,697,742,749,760,777,803,828,840,878,885,945,993,1011,1047,1112,1129,1142,1161,1163,1182,1220,1242,1253,1286,1340,1360,1395,1400,1419,1424,1427,1465,1486 'factories.md':336 'factory.build':864 'factory.create':1426 'fail':227 'fake':1380 'faker':496,497,501,997,1017,1412 'fall':1029 'fan':1091 'feed':111 'field':85,405,564,793,812,821,889,965,1085,1178,1189 'file':765,1227 'fine':1316 'finer':500 'fixtur':13,15,32,92,190,262,274,573,585,591,613,620,637,641,648,654,656,664,672,678,679,835,848,856,895,902,1216,1246,1294,1301,1436,1437,1441,1448,1479 'focus':1372 'follow':1391 'form':1460 'forward':681,898 'freeli':1131 'fresh':473 'fulli':60,1364 'fully-popul':59,1363 'function':1458 'function-decor':1457 'futur':138,167,196,1099,1116,1133,1257,1311,1319 'general':1516 'generat':24,78,469,510,916,1491 'generic':713,1032 'get':471 'github.com':1511 'github.com/litestar-org/polyfactory':1510 'give':270 'guardrail':940 'guid':1387 'hand':265 'hand-rol':264 'handler':1275,1470 'happi':96 'happy-path':95 'hazard':1066 'http':725 'id':353,532,1357 'import':7,139,293,299,305,312,320,328,344,348,409,413,578,583,588,631,643,647,652,731,1051,1100,1258,1287,1292,1297,1312,1323,1325 'index':1384 'inlin':866,1233,1382 'inspect':71 'instanc':65,381,393,470,998,1079 'instead':1377 'int':354,360,533 'integr':1433,1474 'intern':729 'introspect':148,253,715,950,1033,1124,1270 'invari':927 'invok':463 'json':1349 'keep':758 'kind':290 'kwarg':459 'lambda':440 'leav':799,933 'left':1197 'let':887 'librari':46,162 'library-lik':161 'like':163 'list':385 'liter':422,807 'litestar':100,118,120,1274,1461,1477 'litestar-test':119,1476 'litestar.testing':1322 'live':1164 'lower':257 'lower-qu':256 'make':686 'mani':373,843 'manual':569,1249 'match':699,1144,1183 'may':191,1130 'meta':149,1040 'mock':26,43 'mock-data':42 'model':73,151,176,212,220,289,367,419,481,520,544,567,596,661,669,689,704,751,757,872,943,948,1113,1120,1146,1156,1236,1271,1306,1485 'modelfactori':8,48,237,295,300,1025,1149 'modul':142,172,183,1055,1108,1126,1173,1254,1315,1446 'msgspec':727,1046,1105,1152,1278,1404,1480 'msgspec.meta':82 'msgspec.struct':307,1028,1299 'msgspec/dishka/saq':208 'msgspecfactori':10,52,240,308,313,1044,1153,1288,1304 'multipl':720 'myapp.events':1296 'n':383,389 'name':625,857 'need':93,910,918 'nest':570,888,1250 'never':134,1174 'none':133,605,1342,1414 'odm':1407 'odmant':331 'off':1230 'offici':1492 'one':209,280,371,392,748,860,1078,1229 'one-off':859,1228 'option':135,1415 'order':352,366,368,418,420,480,482,531,543,545,595,597,600,602,606,668,670,1332,1337 'order.total':609 'order_created_event_factory.build':1344 'order_factory.build':607 'ordercreatedev':1298,1305,1307,1369 'ordercreatedeventfactori':1303,1341 'orderfactori':364,416,478,541,593,604,633,666 'orderfactory.batch':374 'orderfactory.build':372 'otherfactori':680,896,1247 'otherwis':1211 'output':489 'outsid':636 'overrid':806,964 'overridden':1179 'parametr':399,1070,1469 'pass':64,1368 'path':97,781 'pattern':1462 'payload':114,1343,1350,1490 'payload.id':1358 'pend':430,980 'pep':129 'per':211,394,435,447,750,1010,1080,1084,1398 'per-backend':1397 'pick':230,284,695 'pin':819,906,976 'plain':421 'plugin':17,105,582,651,1291,1445 'polyfactori':1,6,37,38,102,408,554,646,1139,1281 'polyfactory.factories':304,347,412,587 'polyfactory.factories.attrs':318 'polyfactory.factories.msgspec':310,1285 'polyfactory.factories.pydantic':297 'polyfactory.factories.typed':325 'polyfactory.litestar.dev':1494,1496,1499,1502,1505,1508 'polyfactory.litestar.dev/usage/configuration.html':1507 'polyfactory.litestar.dev/usage/decorators.html':1501 'polyfactory.litestar.dev/usage/fixtures.html':1504 'polyfactory.litestar.dev/usage/index.html':1495 'polyfactory.litestar.dev/usage/library_factories/index.html':1498 'polyfactory.pytest':16,581,650,1290,1444 'polymorph':1096 'popul':61,380,537,891,1365 'prefer':260 'principl':1517 'produc':255,1003,1036 'product':35,779,1054,1176 'project':101,718 'provid':1361 'pull':674 'pure':200 'purpos':824 'put':776 'pydant':84,238,723,1148,1402 'pydantic.basemodel':294 'pytest':31,104,572,579,619,644,834,1326,1432 'pytest.fixture':267 'pytest.mark.anyio':1327 'pytest.mark.parametrize':1089 'python':341,406,476,515,577,642,1282,1308,1519 'qualiti':258 'quick':282 'random':18,152,442,483,493,805,919,934,973,990,1199,1207,1408,1410 'rang':83 're':433,445,462,967 're-evalu':432,444 're-invok':461 'read':947 'refactor':1065 'refer':283,1383,1388,1394,1440,1493 'referenc':640 'references/factories.md':337,1396 'references/litestar-patterns.md':1463 'references/pytest-integration.md':1434 'regist':14,189,261,584,590,612,653,655,663,684,831,847,901,1215,1293,1300,1435 'registr':514 'relationship':873,1237 'request':124 'request/response':1375 'requir':571 'respect':81 'respons':1345 'response.json':1356 'response.status':1352 'return':57,377,384,425,1077 'reus':215,989 'right':232,286,1020 'roll':266 'rule':128,141,205,1103 'run':491,939 'runtim':957,1060,1123,1269 'runtime-introspect':1122,1268 'saq':1488 'scope':1442 'see':36,335 'seed':19,153,484,487,494,498,920,991,1009,1016,1208,1411 'separ':734 'set':154,492,522,547,756,874,875,942,1158,1210,1239,1416 'shape':925,984,1097 'share':740,995,1015,1221,1513 'sibl':1169 'side':125 'silent':246,710 'singl':379,1014 'size':388 'skill':117 'skill-polyfactory' 'snake':622,854 'snake-cas':621,853 'source-litestar-org' 'specif':915 'sqla':332 'status':361,429,979 'step':693,745,782,829,867,904 'still':630 'str':357,362 'style':127 'styleguid':1514 'subclass':146,752,1162 'tabl':706 'take':795 'task':1489 'test':29,98,121,182,226,400,504,599,764,772,788,817,844,911,921,1050,1057,1093,1125,1166,1171,1186,1191,1202,1226,1276,1330,1371,1471,1478 'test-on':1170 'test@example.com':441 'testclient':1467 'testclient.post':112 'tests/factories.py':770,1283 'tests/test_orders.py':1309 'tie':1056 'tool':1071,1075 'topic-advanced-alchemy' 'topic-agent-skills' 'topic-agentskills' 'topic-ai-agents' 'topic-claude-code-plugin' 'topic-claude-code-skills' 'topic-gemini-cli-extension' 'topic-htmx' 'topic-inertia' 'topic-litestar' 'topic-mcp' 'topic-python' 'total':358,449,601,929 'tri':738 'true':528,553,881 'turn':614 'type':25,41,159,527,552,560,880,1244,1421 'typeddict':322,1406 'typeddictfactori':54,242,323,329 'typic':193,769 'unexpect':1004 'union':131,403,1431 'union/optional':395,1081 'unrel':219 'use':12,22,185,195,369,397,410,439,451,456,555,635,719,810,826,837,841,862,894,1006,1018,1043,1086,1128,1132,1218,1238,1252,1318,1464 'valid':63,89,797,1135,1367 'validation-pass':62,1366 'valu':428,474,511,798,808,917,974,978,1037,1206 'verifi':1141 'via':851,1088,1425,1472 'violat':1039 'way':109 'whenev':558 'wide':838 'widen':936 'wire':690,869 'without':952 'workflow':692 'wrapper':268 'wrong':244,708 'yield':391","prices":[{"id":"589d5276-5c29-4d0a-bd6b-d194b4f6cc8b","listingId":"d7f7a900-34ab-43ce-be51-c5e7fc13ca48","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"litestar-org","category":"litestar-skills","install_from":"skills.sh"},"createdAt":"2026-05-18T13:20:59.674Z"}],"sources":[{"listingId":"d7f7a900-34ab-43ce-be51-c5e7fc13ca48","source":"github","sourceId":"litestar-org/litestar-skills/polyfactory","sourceUrl":"https://github.com/litestar-org/litestar-skills/tree/main/skills/polyfactory","isPrimary":false,"firstSeenAt":"2026-05-18T13:20:59.674Z","lastSeenAt":"2026-05-18T19:13:55.348Z"}],"details":{"listingId":"d7f7a900-34ab-43ce-be51-c5e7fc13ca48","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"litestar-org","slug":"polyfactory","github":{"repo":"litestar-org/litestar-skills","stars":7,"topics":["advanced-alchemy","agent-skills","agentskills","ai-agents","claude-code-plugin","claude-code-skills","gemini-cli-extension","htmx","inertia","litestar","mcp","python","sqlspec"],"license":"mit","html_url":"https://github.com/litestar-org/litestar-skills","pushed_at":"2026-05-13T16:04:09Z","description":"Opinionated first-party agent skills, plugins, subagents, slash commands, and MCP servers for the Litestar framework ecosystem — publishable to Claude Code, Gemini CLI, Codex CLI, Cursor, OpenCode, and VS Code/Copilot from a single repo.","skill_md_sha":"f3725c80283a0ef22dd7ca6dfa9c90bd4f0315f9","skill_md_path":"skills/polyfactory/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/litestar-org/litestar-skills/tree/main/skills/polyfactory"},"layout":"multi","source":"github","category":"litestar-skills","frontmatter":{"name":"polyfactory","description":"Auto-activate for polyfactory imports, ModelFactory, DataclassFactory, MsgspecFactory, AttrsFactory, Use, Fixture, register_fixture, polyfactory.pytest_plugin, __random_seed__, or coverage(). Use when generating typed mock data for tests or pytest fixtures. Not for production seeding or property-based testing."},"skills_sh_url":"https://skills.sh/litestar-org/litestar-skills/polyfactory"},"updatedAt":"2026-05-18T19:13:55.348Z"}}