[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6FJSJ51GVHRD4VVCMV2GSYH":3,"skill-same:01M6FJSJ51GVHRD4VVCMV2GSYH":54},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":22,"publishedAt":27,"linkOnly":28,"markdownContent":29,"markdownBody":29,"frontMatter":30,"refName":31,"commitSha":32,"skillDirectory":33,"forksCount":34,"repositoryHtmlUrl":35,"repositoryHomepageUrl":36,"ownerHtmlUrl":37,"ownerBlogUrl":6,"ownerDescription":38,"updatedAt":39,"install":40,"resources":53},"01M6FJSJ51GVHRD4VVCMV2GSYH","unit-test-starter",null,"ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",66,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fvosslab\u002Fvosslab-skills\u002Funit-test-starter\u002FSKILL.md",[17],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",[23,24,25,26],"test","unit","starter","unit test starter","2026-11-10 10:12:30",false,"# Unit test starter (Python3 + pytest)\n\n## Overview\n\nCreate thorough, deterministic Python 3 unit tests with pytest by scanning the repo for\nPython files, then iterating file-by-file and function-by-function to add tests where\nbehavior is testable without filesystem IO or network access.\n\nThis skill can be slow and may take hours on large repos.\n\n## Hard constraints\n\n- No filesystem IO in tests (no reading\u002Fwriting real files, no `tmp_path`).\n- No network access in tests (no HTTP, sockets, internet APIs).\n- Deterministic tests only (no time\u002Frandomness unless fully mocked).\n- Avoid brittle tests that assert unstable logging\u002Fprinting unless clearly part of the\n  function contract.\n\n## Inputs to request\n\n- Whether to scan the entire repo or exclude known folders (for example generated code,\n  vendored code, or `old\u002F` archives).\n- Whether there are modules that must never be imported during tests (side effects).\n- Any existing pytest config (`pytest.ini`, `pyproject.toml`) and whether tests already\n  exist under `tests\u002F`.\n\n## Workflow\n\n1. Confirm pytest baseline\n   - Prefer pytest for Python 3 repos unless the repo clearly uses something else.\n   - Check for an existing `tests\u002F` folder and any pytest config.\n   - If `tests\u002F` does not exist, create it.\n2. Determine repo root and discovery command\n   - Define `REPO_ROOT` as the current git\u002Fworkspace root.\n   - Discover Python files using `find` (repo-rooted) and iterate in a stable order:\n     ```bash\n     find \"${REPO_ROOT}\" -name \"*.py\" -type f | sort\n     ```\n   - Apply reasonable exclusions when needed (but keep using `find`), for example:\n     `.git\u002F`, `__pycache__\u002F`, `.venv\u002F`, `venv\u002F`, `build\u002F`, `dist\u002F`, `node_modules\u002F`.\n3. Choose a one-to-one test file mapping\n   - Create one pytest file per source file to keep mapping straightforward.\n   - Naming rule (repo-relative path to ASCII-safe filename):\n     - Source: `pkg\u002Fsub\u002Fmod.py`\n     - Test: `tests\u002Ftest_pkg__sub__mod.py`\n   - If a source file is untestable under constraints, still create the test module\n     with a single `pytest.skip(..., allow_module_level=True)` explaining why.\n4. Make imports work (create `tests\u002Fconftest.py` when needed)\n   - Prefer importing modules the same way the repo imports them.\n   - If tests cannot import local modules (no installed package, no package layout),\n     create `tests\u002Fconftest.py` to add `REPO_ROOT` (and optionally `tests\u002F`) to\n     `sys.path`:\n     ```python\n     #!\u002Fusr\u002Fbin\u002Fenv python3\n     \"\"\"\n     Pytest config to ensure local imports work without installation.\n     \"\"\"\n\n     from __future__ import annotations\n\n     # Standard Library\n     import os\n     import sys\n\n     #============================================\n\n\n     REPO_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), \"..\"))\n     if REPO_ROOT not in sys.path:\n     \tsys.path.insert(0, REPO_ROOT)\n\n     TESTS_DIR = os.path.abspath(os.path.dirname(__file__))\n     if TESTS_DIR not in sys.path:\n     \tsys.path.insert(0, TESTS_DIR)\n     ```\n   - Keep `conftest.py` minimal and repo-wide; do not add per-test hacks.\n   - If imports trigger libraries that write caches\u002Fconfig under the user's home\n     directory (for example matplotlib), set environment variables early in\n     `conftest.py` to redirect them to a temp location (avoid asserting on these side\n     effects in tests; this is only to keep the test environment clean).\n5. For each Python file: decide whether it is safe to import\n   - Prefer importable modules over scripts with side effects.\n   - If import triggers work (CLI execution, network, file reads, subprocess), avoid\n     importing at module import-time and mark the test module skipped with a reason.\n   - When possible, test by importing specific functions\u002Fclasses from the module\n     rather than executing the script entrypoint.\n6. For each function\u002Fmethod: triage testability\n   - Enumerate functions and methods (top-level `def`, and simple class methods).\n   - Skip and document functions that:\n     - read\u002Fwrite files or depend on the filesystem (`open`, `pathlib.Path(...).read_*`,\n       `os.listdir`, `glob`, etc.)\n     - call network\u002Finternet (`requests`, `urllib`, `http.client`, `socket`, etc.)\n     - spawn processes (`subprocess`, `os.system`)\n     - depend on real time or randomness and cannot be safely mocked\n     - require complex external services or heavyweight frameworks\n7. Write tests for testable functions (table-driven first)\n   - Prefer `@pytest.mark.parametrize` for input\u002Foutput grids.\n   - Cover, at minimum:\n     - 1 to 3 \"core\" cases (typical inputs)\n     - 1 edge case (empty, None, boundary, unusual whitespace, extremes)\n     - 1 negative case when the function explicitly rejects inputs or raises\n   - Assertions:\n     - Use plain `assert` for values\u002Finvariants.\n     - Use `pytest.raises(ExpectedError)` for exceptions.\n     - Use `match=` only when the message is stable and part of the contract.\n   - Avoid duplicating the full function logic in the test; assert observable results\n     and key branches.\n8. Keep tests deterministic\n   - Do not let tests depend on the local machine environment.\n   - If the module reads environment variables, use `monkeypatch` to set them.\n   - If a function depends on `time.time()` or `random.*`, monkeypatch those calls so\n     results are stable.\n9. Run tests incrementally (long-running allowed)\n   - Prefer targeted runs while generating tests:\n     ```bash\n     \u002Fopt\u002Fhomebrew\u002Fopt\u002Fpython@3.12\u002Fbin\u002Fpython3.12 -m pytest tests\u002Ftest_pkg__sub__mod.py\n     ```\n   - Expect this process to be long on large repos; keep a simple progress log of:\n     file -> functions tested -> functions skipped (with reasons).\n10. Record changes\n   - If files were created or changed, record the change in\n     [docs\u002FCHANGELOG.md](docs\u002FCHANGELOG.md) when the file exists.\n\n## Output\n\n- A per-file summary (tested functions, skipped functions, and why).\n- New `tests\u002Ftest_*.py` files (one per source file) that match repo style.\n- A `tests\u002Fconftest.py` only when needed for local imports.\n- Commands to run a single test module and the full suite with `python3 -m pytest`.\n\n## Quality bar\n\n- Deterministic, small, and readable tests per source file.\n- No filesystem IO or network access in tests.\n- No speculation: only write tests for behavior you can justify from the code; if\n  unclear, skip with a precise reason in the test module.\n",{},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Fvosslab\u002Fvosslab-skills\u002Funit-test-starter",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":7,"skillName":5,"commands":41,"prompt":51,"zipAvailable":52},[42,45,48],{"tool":43,"command":44},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill unit-test-starter",{"tool":46,"command":47},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill unit-test-starter",{"tool":49,"command":50},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill unit-test-starter","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fvosslab\u002Fvosslab-skills\u002Funit-test-starter\u002FSKILL.md",true,[],[55,67,77,86,92,99],{"skillNo":56,"name":57,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":63,"publishedAt":27},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[60],{"categoryNo":61,"categoryName":62,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000023","Skill与智能体开发",[64,65,66],"model","model hierarchy","model hierarchy skill",{"skillNo":68,"name":69,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":73,"publishedAt":27},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[72],{"categoryNo":61,"categoryName":62,"taxonomyType":20,"taxonomyTypeDesc":21},[74,75,76],"MCP","zoom","zoom mcp",{"skillNo":78,"name":79,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":27},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[83,84,85,75],"sdk","zoom apps sdk","apps",{"skillNo":87,"name":88,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":27},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[88],{"skillNo":93,"name":94,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":98,"publishedAt":27},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[97],{"categoryNo":61,"categoryName":62,"taxonomyType":20,"taxonomyTypeDesc":21},[94],{"skillNo":100,"name":101,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":27},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[101]]