[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BQXBNS6FHBGPEW30XYZ47G":3,"skill-same:01M7BQXBNS6FHBGPEW30XYZ47G":46},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M7BQXBNS6FHBGPEW30XYZ47G","nlp-research-repo-package-installment",null,"Align Python version and repo-declared dependencies (requirements.txt \u002F environment.yml) before installing packages for NLP research code reproduction.","linyouxue\u002Fskill-repair-benchmark","linyouxue","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F216151464?v=4","01M7BJEVCXKD74KH6FG9CBVSQB","林宥学","01M7BJEVE02NP217V93BKZFC0J",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fdata\u002Fskillsbench87\u002Freferences\u002Fsimpo-code-reproduction\u002Fskills\u002Fnlp-research-repo-package-installment\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: nlp-research-repo-package-installment\nversion: \"1.3\"\ndescription: Align Python version and repo-declared dependencies (requirements.txt \u002F environment.yml) before installing packages for NLP research code reproduction.\n---\n\n# NLP Research Repo Package Installment\n\nWhen reproducing an NLP research repo, **always align the environment to the repo’s declared dependencies first**. Most failures come from **Python version mismatch** or installing packages without following `requirements.txt` \u002F `environment.yml`.\n\n## What to do (must run before any install)\n\n1. **Read the repo dependency files**\n- Prefer `environment.yml` \u002F `environment.yaml` (often pins **Python** + channels + non-pip deps)\n- Otherwise use `requirements.txt` (pip deps)\n- If both exist, treat `environment.yml` as the base, `requirements.txt` as supplemental unless README says otherwise\n\n2. **Log the current environment (Python version is critical)**\n- First identify the exact output path requested by the task for environment provenance. Use that exact path; do not substitute a generic filename.\n- Record:\n  - `\u003Cselected-python> -VV`\n  - `\u003Cselected-python> -m pip --version`\n  - `\u003Cselected-python> -m pip freeze`\n- The provenance file must describe the **same interpreter used to run the reproduction test**, not the system interpreter if a project-specific environment is required.\n\n3. **Compare & decide — this is a blocking gate**\n- If the repo declares a specific Python major\u002Fminor, the test\u002Freproduction **MUST run under that major\u002Fminor**.\n- Do not continue with dependency installation, unit tests, result generation, or final provenance logging while the selected interpreter does not match the repo declaration.\n- If environment creation fails, repair the environment setup. **Never fall back to a different system Python merely because setup is inconvenient or blocked by PEP 668.**\n- Prefer installing from the repo’s dependency files (avoid random upgrades), then run a quick import\u002Fsmoke test.\n\n### PEP 668 \u002F environment-creation recovery\n\nIf `python3 -m pip install ...` fails with `externally-managed-environment`, that is an environment-setup failure, not permission to abandon the required Python version.\n\nUse an isolated installer\u002Fenvironment path. For example, when `uv` is needed:\n\n```bash\npython3 -m pip install --user --break-system-packages uv\nexport PATH=\"$HOME\u002F.local\u002Fbin:$PATH\"\nuv python install \u003Crequired-python-version>\nuv venv --python \u003Crequired-python-version> \u002Fopt\u002Frepro-env\n```\n\nThen use the environment's interpreter explicitly for every subsequent command:\n\n```bash\n\u002Fopt\u002Frepro-env\u002Fbin\u002Fpython -VV\n\u002Fopt\u002Frepro-env\u002Fbin\u002Fpython -m pip install ...\n\u002Fopt\u002Frepro-env\u002Fbin\u002Fpython -m \u003Cproject-test-module>\n```\n\nDo not switch back to bare `python` unless `command -v python` and `python -VV` prove that it is the intended project interpreter.\n\n## SimPO reproduction: Python 3.10 is mandatory\n\nFor the SimPO repository used by `simpo-code-reproduction`, the repository itself is authoritative:\n\n- `environment.yml` pins `python=3.10.14` and `python_abi=3.10`.\n- The repository README also instructs creating the environment with Python 3.10.\n\nTherefore this task has a non-bypassable environment gate. Create one project Python 3.10 environment and use it consistently for installation, execution, output generation, and provenance. Do not silently fall back to the system Python after a setup failure.\n\n**Blocking completion invariant:** before editing or running the unit test, `\u002Froot\u002FSimPO\u002Frich\u002F__init__.py` must exist. Importing `rich` only from the selected virtual environment does not satisfy this invariant. An independent Python 3.10 replay uses `\u002Froot\u002FSimPO` on `PYTHONPATH` but does not inherit that virtual environment's private `site-packages`; therefore the repository-visible copy is required in every permission branch.\n\n1. Select the environment path according to actual write permissions. Use `\u002Fopt\u002Fpy310` when `\u002Fopt` is writable; otherwise use the writable `\u002Froot\u002Fpy310` path. A permission failure at `\u002Fopt` is a signal to take the documented writable branch, not to abandon Python 3.10:\n\n```bash\nif test -w \u002Fopt; then\n  export PY310_ENV=\u002Fopt\u002Fpy310\nelse\n  export PY310_ENV=\u002Froot\u002Fpy310\nfi\nuv python install 3.10.14\nuv venv --python 3.10.14 \"$PY310_ENV\"\n\"$PY310_ENV\u002Fbin\u002Fpython\" -m ensurepip --upgrade\nexport PY310=\"$PY310_ENV\u002Fbin\u002Fpython\"\n```\n\n2. Use **only `$PY310 -m pip`** to install dependencies. Follow `environment.yml` \u002F repository metadata rather than a guessed minimal subset, and include the complete imports required by the unit-test path. A successful direct run is not sufficient if an independent clean replay would fail with `ModuleNotFoundError`. For this SimPO stack, verify the full trainer import path, including `rich`:\n\n```bash\n\"$PY310\" -c \"import torch, transformers, trl, accelerate, datasets, rich\"\n\"$PY310\" -c \"from trl.trainer import CPOTrainer; from rich.console import Console, Group\"\n```\n\n3. **Mandatory before the first unit-test run, regardless of whether `\u002Fopt\u002Fpy310` or `\u002Froot\u002Fpy310` was selected:** install `rich` and its pure-Python dependencies into the repository path. Execute this exact block even when `\"$PY310\" -c \"import rich\"` already succeeds:\n\n```bash\n\"$PY310\" -m pip install --no-cache-dir --upgrade --target \u002Froot\u002FSimPO \"rich==11.2.0\"\ntest -f \u002Froot\u002FSimPO\u002Frich\u002F__init__.py\nPYTHONPATH=\u002Froot\u002FSimPO \"$PY310\" -c \\\n  \"import rich; from rich.console import Console, Group; from trl.trainer import CPOTrainer; assert rich.__file__.startswith('\u002Froot\u002FSimPO\u002F')\"\n```\n\nTreat any failure in this block as an unfinished environment setup: repair it before touching `simpo_loss`. Do not edit the provided unit-test or validation files to make imports pass. Resolve dependency visibility through the environment and repository path.\n\n4. Before running `unit_test\u002Funit_test_1.py`, verify the exact interpreter:\n\n```bash\n\"$PY310\" -VV\n```\n\nThe output must contain `Python 3.10`. If it does not, stop and repair the environment.\n\n5. Run the SimPO unit test using that exact interpreter and the repository on `PYTHONPATH`. Do not run it with the default Python 3.12 interpreter:\n\n```bash\ncd \u002Froot\u002FSimPO\nPYTHONPATH=\u002Froot\u002FSimPO \"$PY310\" \u002Froot\u002FSimPO\u002Funit_test\u002Funit_test_1.py\n```\n\n6. Generate `\u002Froot\u002Floss.npz` from that Python 3.10 execution.\n7. The task requests `\u002Froot\u002Fpython_info.txt`; write it with the same selected interpreter:\n\n```bash\n\"$PY310\" -VV > \u002Froot\u002Fpython_info.txt\n\"$PY310\" -m pip freeze >> \u002Froot\u002Fpython_info.txt\ngrep -qi '^Python 3\\.10' \u002Froot\u002Fpython_info.txt\ntest -f \u002Froot\u002Floss.npz\n```\n\n8. **Clean-replay gate before finishing:** first repeat both repository-visible checks from step 3. Then remove only the generated `\u002Froot\u002Floss.npz`, rerun the exact command from step 5 with `$PY310`, and confirm that it recreates `\u002Froot\u002Floss.npz` without installing anything else.\n\nDo not finish the task if the final provenance file says Python 3.11, 3.12, or any other non-3.10 interpreter; if the selected environment is missing required imports; if `\u002Froot\u002FSimPO\u002Frich\u002F__init__.py` is absent; if `rich.__file__` does not resolve under `\u002Froot\u002FSimPO`; or if the clean replay fails, even when an earlier numerical loss appeared correct.\n","# NLP Research Repo Package Installment\n\nWhen reproducing an NLP research repo, **always align the environment to the repo’s declared dependencies first**. Most failures come from **Python version mismatch** or installing packages without following `requirements.txt` \u002F `environment.yml`.\n\n## What to do (must run before any install)\n\n1. **Read the repo dependency files**\n- Prefer `environment.yml` \u002F `environment.yaml` (often pins **Python** + channels + non-pip deps)\n- Otherwise use `requirements.txt` (pip deps)\n- If both exist, treat `environment.yml` as the base, `requirements.txt` as supplemental unless README says otherwise\n\n2. **Log the current environment (Python version is critical)**\n- First identify the exact output path requested by the task for environment provenance. Use that exact path; do not substitute a generic filename.\n- Record:\n  - `\u003Cselected-python> -VV`\n  - `\u003Cselected-python> -m pip --version`\n  - `\u003Cselected-python> -m pip freeze`\n- The provenance file must describe the **same interpreter used to run the reproduction test**, not the system interpreter if a project-specific environment is required.\n\n3. **Compare & decide — this is a blocking gate**\n- If the repo declares a specific Python major\u002Fminor, the test\u002Freproduction **MUST run under that major\u002Fminor**.\n- Do not continue with dependency installation, unit tests, result generation, or final provenance logging while the selected interpreter does not match the repo declaration.\n- If environment creation fails, repair the environment setup. **Never fall back to a different system Python merely because setup is inconvenient or blocked by PEP 668.**\n- Prefer installing from the repo’s dependency files (avoid random upgrades), then run a quick import\u002Fsmoke test.\n\n### PEP 668 \u002F environment-creation recovery\n\nIf `python3 -m pip install ...` fails with `externally-managed-environment`, that is an environment-setup failure, not permission to abandon the required Python version.\n\nUse an isolated installer\u002Fenvironment path. For example, when `uv` is needed:\n\n```bash\npython3 -m pip install --user --break-system-packages uv\nexport PATH=\"$HOME\u002F.local\u002Fbin:$PATH\"\nuv python install \u003Crequired-python-version>\nuv venv --python \u003Crequired-python-version> \u002Fopt\u002Frepro-env\n```\n\nThen use the environment's interpreter explicitly for every subsequent command:\n\n```bash\n\u002Fopt\u002Frepro-env\u002Fbin\u002Fpython -VV\n\u002Fopt\u002Frepro-env\u002Fbin\u002Fpython -m pip install ...\n\u002Fopt\u002Frepro-env\u002Fbin\u002Fpython -m \u003Cproject-test-module>\n```\n\nDo not switch back to bare `python` unless `command -v python` and `python -VV` prove that it is the intended project interpreter.\n\n## SimPO reproduction: Python 3.10 is mandatory\n\nFor the SimPO repository used by `simpo-code-reproduction`, the repository itself is authoritative:\n\n- `environment.yml` pins `python=3.10.14` and `python_abi=3.10`.\n- The repository README also instructs creating the environment with Python 3.10.\n\nTherefore this task has a non-bypassable environment gate. Create one project Python 3.10 environment and use it consistently for installation, execution, output generation, and provenance. Do not silently fall back to the system Python after a setup failure.\n\n**Blocking completion invariant:** before editing or running the unit test, `\u002Froot\u002FSimPO\u002Frich\u002F__init__.py` must exist. Importing `rich` only from the selected virtual environment does not satisfy this invariant. An independent Python 3.10 replay uses `\u002Froot\u002FSimPO` on `PYTHONPATH` but does not inherit that virtual environment's private `site-packages`; therefore the repository-visible copy is required in every permission branch.\n\n1. Select the environment path according to actual write permissions. Use `\u002Fopt\u002Fpy310` when `\u002Fopt` is writable; otherwise use the writable `\u002Froot\u002Fpy310` path. A permission failure at `\u002Fopt` is a signal to take the documented writable branch, not to abandon Python 3.10:\n\n```bash\nif test -w \u002Fopt; then\n  export PY310_ENV=\u002Fopt\u002Fpy310\nelse\n  export PY310_ENV=\u002Froot\u002Fpy310\nfi\nuv python install 3.10.14\nuv venv --python 3.10.14 \"$PY310_ENV\"\n\"$PY310_ENV\u002Fbin\u002Fpython\" -m ensurepip --upgrade\nexport PY310=\"$PY310_ENV\u002Fbin\u002Fpython\"\n```\n\n2. Use **only `$PY310 -m pip`** to install dependencies. Follow `environment.yml` \u002F repository metadata rather than a guessed minimal subset, and include the complete imports required by the unit-test path. A successful direct run is not sufficient if an independent clean replay would fail with `ModuleNotFoundError`. For this SimPO stack, verify the full trainer import path, including `rich`:\n\n```bash\n\"$PY310\" -c \"import torch, transformers, trl, accelerate, datasets, rich\"\n\"$PY310\" -c \"from trl.trainer import CPOTrainer; from rich.console import Console, Group\"\n```\n\n3. **Mandatory before the first unit-test run, regardless of whether `\u002Fopt\u002Fpy310` or `\u002Froot\u002Fpy310` was selected:** install `rich` and its pure-Python dependencies into the repository path. Execute this exact block even when `\"$PY310\" -c \"import rich\"` already succeeds:\n\n```bash\n\"$PY310\" -m pip install --no-cache-dir --upgrade --target \u002Froot\u002FSimPO \"rich==11.2.0\"\ntest -f \u002Froot\u002FSimPO\u002Frich\u002F__init__.py\nPYTHONPATH=\u002Froot\u002FSimPO \"$PY310\" -c \\\n  \"import rich; from rich.console import Console, Group; from trl.trainer import CPOTrainer; assert rich.__file__.startswith('\u002Froot\u002FSimPO\u002F')\"\n```\n\nTreat any failure in this block as an unfinished environment setup: repair it before touching `simpo_loss`. Do not edit the provided unit-test or validation files to make imports pass. Resolve dependency visibility through the environment and repository path.\n\n4. Before running `unit_test\u002Funit_test_1.py`, verify the exact interpreter:\n\n```bash\n\"$PY310\" -VV\n```\n\nThe output must contain `Python 3.10`. If it does not, stop and repair the environment.\n\n5. Run the SimPO unit test using that exact interpreter and the repository on `PYTHONPATH`. Do not run it with the default Python 3.12 interpreter:\n\n```bash\ncd \u002Froot\u002FSimPO\nPYTHONPATH=\u002Froot\u002FSimPO \"$PY310\" \u002Froot\u002FSimPO\u002Funit_test\u002Funit_test_1.py\n```\n\n6. Generate `\u002Froot\u002Floss.npz` from that Python 3.10 execution.\n7. The task requests `\u002Froot\u002Fpython_info.txt`; write it with the same selected interpreter:\n\n```bash\n\"$PY310\" -VV > \u002Froot\u002Fpython_info.txt\n\"$PY310\" -m pip freeze >> \u002Froot\u002Fpython_info.txt\ngrep -qi '^Python 3\\.10' \u002Froot\u002Fpython_info.txt\ntest -f \u002Froot\u002Floss.npz\n```\n\n8. **Clean-replay gate before finishing:** first repeat both repository-visible checks from step 3. Then remove only the generated `\u002Froot\u002Floss.npz`, rerun the exact command from step 5 with `$PY310`, and confirm that it recreates `\u002Froot\u002Floss.npz` without installing anything else.\n\nDo not finish the task if the final provenance file says Python 3.11, 3.12, or any other non-3.10 interpreter; if the selected environment is missing required imports; if `\u002Froot\u002FSimPO\u002Frich\u002F__init__.py` is absent; if `rich.__file__` does not resolve under `\u002Froot\u002FSimPO`; or if the clean replay fails, even when an earlier numerical loss appeared correct.\n",{"name":5,"version":24,"description":7},"1.3","main","cdcb6d230f3b15c3c33f8a2bdd16439f43602cbe","evaluation\u002Fdata\u002Fskillsbench87\u002Freferences\u002Fsimpo-code-reproduction\u002Fskills\u002Fnlp-research-repo-package-installment",1,"https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark","https:\u002F\u002Fgithub.com\u002Flinyouxue","2026-11-14 20:28:35",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add linyouxue\u002Fskill-repair-benchmark --skill nlp-research-repo-package-installment",{"tool":38,"command":39},"bunx","bunx skills add linyouxue\u002Fskill-repair-benchmark --skill nlp-research-repo-package-installment",{"tool":41,"command":42},"pnpm","pnpm dlx skills add linyouxue\u002Fskill-repair-benchmark --skill nlp-research-repo-package-installment","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fdata\u002Fskillsbench87\u002Freferences\u002Fsimpo-code-reproduction\u002Fskills\u002Fnlp-research-repo-package-installment\u002FSKILL.md",true,[],[47,54,61,68,73,78],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":19},"01M7E1HGVRY73NBJ022CJG13X6","video-frame-extraction","Extract frames from video files and save them as images using OpenCV","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fvideo-frame-extraction\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M7E1HAG5R7CJ9C8NYJS771MB","openai-vision","Analyze images and multi-frame sequences using OpenAI GPT vision models","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fopenai-vision\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M7E1H7DADKB6QBWKC2KQ63SZ","image-ocr","Extract text content from images using Tesseract OCR via Python, including structured field extraction from receipts and forms","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fimage-ocr\u002FSKILL.md",[],[],{"skillNo":69,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M7E1H0WBNT43TENGQY7AVZHD","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fvideo-frame-extraction\u002FSKILL.md",[],[],{"skillNo":74,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M7E1GTC7D4N4Q2EF03875J9E","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fopenai-vision\u002FSKILL.md",[],[],{"skillNo":79,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7E1GQ92CWFMGH53KSSE4WER","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fimage-ocr\u002FSKILL.md",[],[]]