[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6BZN9ZX0TGC2R3KVKQBTGAR":3,"skill-same:01M6BZN9ZX0TGC2R3KVKQBTGAR":64},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":37,"linkOnly":38,"markdownContent":39,"markdownBody":40,"frontMatter":41,"refName":42,"commitSha":43,"skillDirectory":44,"forksCount":45,"repositoryHtmlUrl":46,"repositoryHomepageUrl":47,"ownerHtmlUrl":48,"ownerBlogUrl":17,"ownerDescription":17,"updatedAt":49,"install":50,"resources":63},"01M6BZN9ZX0TGC2R3KVKQBTGAR","notebook.refactor_to_utils","Notebook 代码重构至工具库","Move or add notebook code to a *_utils.py library file","将 notebook 中的代码移动或添加到 *_utils.py 库文件中","causify-ai\u002Fhelpers","causify-ai","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F121828442?v=4","01M6BZFTHW2MQR7FWK8CDW0DRA","Causify.AI","01M6BZFTPJ193AB5N089Z82HQG",155,"Apache-2.0",null,"https:\u002F\u002Fgithub.com\u002Fcausify-ai\u002Fhelpers\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Fnotebook.refactor_to_utils\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD5CX980XNXCJKQF70BY","数据分析师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BT7QVANT4709358VEJK53E","代码实现","SCENARIO","使用场景",[31,32,33,34,35,36],"refactor","notebook refactor to utils","code","library","file","haiku","2026-11-10 10:12:30",false,"---\ndescription: Move or add notebook code to a *_utils.py library file\nmodel: haiku\n---\n\n# Goal\n- You are an expert Python developer\n\n- I will pass you a Python file paired with a Jupyter notebook using jupytext\n  in `py:percent` format\n\n# Constraints\n- For all the code follow the rules from `.claude\u002Fskills\u002Fcoding.rules.md`\n\n- Important Notes\n  - Always sync before editing: `uvx jupytext --sync notebook.py`\n  - Always sync after editing: `uvx jupytext --sync notebook.py`\n\n# Scenarios\n- This skill handles two complementary scenarios:\n\n## Scenario 1: Moving Existing Functions to Utils\n- When you need to extract functions from an existing notebook and move them\n  to utils\n\n## Scenario 2: Adding New Code to Utils\n- When you need to add new functions or code to an existing utils file\n  corresponding to the notebook\n\n# Workflow\n\n## Identify or Create the Utils File\n- Find or create the library\u002Futility file that corresponds to the notebook\n  - Naming convention: Notebook name with underscores\n  - E.g., `Lesson94-Information_Theory.ipynb` ->\n    `Lesson94_Information_Theory_utils.py`\n  - E.g., `tutorial_advanced.ipynb` -> `tutorial_advanced_utils.py`\n\n## Organize Code Structure in Utils File\n- The utils file should have a structure that mirrors the flow of the notebook\n- Use section separators to organize code by notebook sections\n  - Example:\n    ```python\n    # #############################################################################\n    # Cell 1: Visual Bin - Population of Marbles\n    # #############################################################################\n\n    def cell1_draw_bin_with_marbles_interactive(...):\n        ...\n\n    def _cell1_helper_function(...):\n        ...\n\n    # #############################################################################\n    # Cell 2: Entropy Calculations\n    # #############################################################################\n\n    def cell2_calculate_entropy(...):\n        ...\n    ```\n\n- Add the functions in the part of the utility file that corresponds to the\n  notebook\n- Group related functions together\n- Use private functions (prefix with `_`) for helpers not called from the\n  notebook\n\n## Move or Add Functions\n\n### For Moving Functions (Scenario 1):\n\n- Follow these steps:\n\n  1. Copy all functions from the notebook to the utils file (without\n     changing code)\n  2. Remove the functions from the notebook\n  3. Update notebook cells to call the utils functions\n\n### For Adding Functions (Scenario 2):\n\n- Follow these steps:\n\n  1. Implement new code directly in the utils file\n  2. Create caller code in the notebook that imports and uses the functions\n  3. Add the code in the appropriate section following the utils file\n     structure\n\n## Update Notebook to Call Utils\n- Replace function implementations with imports and function calls\n- Pattern:\n  ```python\n  import notebook_name_utils as utils\n\n  # In code cells:\n  utils.function_name(...)\n  ```\n\n- Each code cell should be minimal:\n  ```python\n  # Display results of Cell 2 analysis.\n  utils.cell2_calculate_entropy()\n  ```\n\n## Code Reuse\n- Reuse code already existing in the `*_utils.py` file\n- Reuse code already existing in the `helpers` directory\n- Avoid duplication across utils functions\n- Extract common patterns into helper functions\n\n## Sync with Jupytext\n- After all modifications are complete, sync to update both files following the\n  conventions in `# Code Architecture and Responsibility` -> `## Utilities vs.\n  Notebook Responsibilities` in `.claude\u002Fskills\u002Fnotebook.rules.md`:\n  ```bash\n  > uvx jupytext --sync \u003Cpath\u002Fto\u002Fnotebook.py>\n  ```\n\n# Conventions\n- Always follow the conventions and guidelines in\n  `.claude\u002Fskills\u002Fnotebook.rules.md`\n\n# Verification\n- [ ] Confirm no function moved to `*_utils.py` changed behavior\n- [ ] Confirm every notebook cell that used to hold inline code now calls the\n  corresponding utils function\n- [ ] Confirm the `.ipynb` and paired `.py` file are in sync via Jupytext\n","# Goal\n- You are an expert Python developer\n\n- I will pass you a Python file paired with a Jupyter notebook using jupytext\n  in `py:percent` format\n\n# Constraints\n- For all the code follow the rules from `.claude\u002Fskills\u002Fcoding.rules.md`\n\n- Important Notes\n  - Always sync before editing: `uvx jupytext --sync notebook.py`\n  - Always sync after editing: `uvx jupytext --sync notebook.py`\n\n# Scenarios\n- This skill handles two complementary scenarios:\n\n## Scenario 1: Moving Existing Functions to Utils\n- When you need to extract functions from an existing notebook and move them\n  to utils\n\n## Scenario 2: Adding New Code to Utils\n- When you need to add new functions or code to an existing utils file\n  corresponding to the notebook\n\n# Workflow\n\n## Identify or Create the Utils File\n- Find or create the library\u002Futility file that corresponds to the notebook\n  - Naming convention: Notebook name with underscores\n  - E.g., `Lesson94-Information_Theory.ipynb` ->\n    `Lesson94_Information_Theory_utils.py`\n  - E.g., `tutorial_advanced.ipynb` -> `tutorial_advanced_utils.py`\n\n## Organize Code Structure in Utils File\n- The utils file should have a structure that mirrors the flow of the notebook\n- Use section separators to organize code by notebook sections\n  - Example:\n    ```python\n    # #############################################################################\n    # Cell 1: Visual Bin - Population of Marbles\n    # #############################################################################\n\n    def cell1_draw_bin_with_marbles_interactive(...):\n        ...\n\n    def _cell1_helper_function(...):\n        ...\n\n    # #############################################################################\n    # Cell 2: Entropy Calculations\n    # #############################################################################\n\n    def cell2_calculate_entropy(...):\n        ...\n    ```\n\n- Add the functions in the part of the utility file that corresponds to the\n  notebook\n- Group related functions together\n- Use private functions (prefix with `_`) for helpers not called from the\n  notebook\n\n## Move or Add Functions\n\n### For Moving Functions (Scenario 1):\n\n- Follow these steps:\n\n  1. Copy all functions from the notebook to the utils file (without\n     changing code)\n  2. Remove the functions from the notebook\n  3. Update notebook cells to call the utils functions\n\n### For Adding Functions (Scenario 2):\n\n- Follow these steps:\n\n  1. Implement new code directly in the utils file\n  2. Create caller code in the notebook that imports and uses the functions\n  3. Add the code in the appropriate section following the utils file\n     structure\n\n## Update Notebook to Call Utils\n- Replace function implementations with imports and function calls\n- Pattern:\n  ```python\n  import notebook_name_utils as utils\n\n  # In code cells:\n  utils.function_name(...)\n  ```\n\n- Each code cell should be minimal:\n  ```python\n  # Display results of Cell 2 analysis.\n  utils.cell2_calculate_entropy()\n  ```\n\n## Code Reuse\n- Reuse code already existing in the `*_utils.py` file\n- Reuse code already existing in the `helpers` directory\n- Avoid duplication across utils functions\n- Extract common patterns into helper functions\n\n## Sync with Jupytext\n- After all modifications are complete, sync to update both files following the\n  conventions in `# Code Architecture and Responsibility` -> `## Utilities vs.\n  Notebook Responsibilities` in `.claude\u002Fskills\u002Fnotebook.rules.md`:\n  ```bash\n  > uvx jupytext --sync \u003Cpath\u002Fto\u002Fnotebook.py>\n  ```\n\n# Conventions\n- Always follow the conventions and guidelines in\n  `.claude\u002Fskills\u002Fnotebook.rules.md`\n\n# Verification\n- [ ] Confirm no function moved to `*_utils.py` changed behavior\n- [ ] Confirm every notebook cell that used to hold inline code now calls the\n  corresponding utils function\n- [ ] Confirm the `.ipynb` and paired `.py` file are in sync via Jupytext\n",{"model":36,"description":7},"master","39143a859859181eff7e774457997b5278fd9e99",".claude\u002Fskills\u002Fnotebook.refactor_to_utils",170,"https:\u002F\u002Fgithub.com\u002Fcausify-ai\u002Fhelpers","https:\u002F\u002Fcausify.ai","https:\u002F\u002Fgithub.com\u002Fcausify-ai","2026-11-02 02:09:15",{"source":9,"skillName":5,"commands":51,"prompt":61,"zipAvailable":62},[52,55,58],{"tool":53,"command":54},"npx","npx skills add causify-ai\u002Fhelpers --skill notebook.refactor_to_utils",{"tool":56,"command":57},"bunx","bunx skills add causify-ai\u002Fhelpers --skill notebook.refactor_to_utils",{"tool":59,"command":60},"pnpm","pnpm dlx skills add causify-ai\u002Fhelpers --skill notebook.refactor_to_utils","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fcausify-ai\u002Fhelpers\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Fnotebook.refactor_to_utils\u002FSKILL.md",true,[],[65,86,105,122,135,144],{"skillNo":66,"name":67,"nameZh":68,"description":69,"descriptionZh":70,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":71,"categories":72,"keywords":79,"publishedAt":37},"01M6C9ZMM0XSXCHHABMJ9XB1JB","tutorial_in_60_mins.propagate_docker_changes","Docker 文件同步与模板对齐","Sync tutorial and class-project Docker files to match project_template","同步教程和课程项目的 Docker 文件，使其与 project_template 保持一致。","https:\u002F\u002Fgithub.com\u002Fcausify-ai\u002Fhelpers\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Ftutorial_in_60_mins.propagate_docker_changes\u002FSKILL.md",[73,76],{"categoryNo":74,"categoryName":75,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BSTR9G4A4GZ0VB2DFN9490","开发环境与工具链管理",{"categoryNo":77,"categoryName":78,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BVB0FJ0RR8KXYVFTKEA3XX","技术文档工程师",[80,81,82,83,36,84,85],"tutorial in 60 mins propagate docker changes","tutorial","docker","files","template","sync",{"skillNo":87,"name":88,"nameZh":89,"description":90,"descriptionZh":91,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":92,"categories":93,"keywords":98,"publishedAt":37},"01M6C9ZJK8QJ9FNCY39WVF3GMG","tutorial_in_60_mins.merge_markdown","Markdown 合并至 Jupyter Notebook","Merge the content of a markdown file into a Jupyter notebook","将 Markdown 文件的内容合并到 Jupyter Notebook 中。","https:\u002F\u002Fgithub.com\u002Fcausify-ai\u002Fhelpers\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Ftutorial_in_60_mins.merge_markdown\u002FSKILL.md",[94,97],{"categoryNo":95,"categoryName":96,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQ6TK1MPB82068236GSXDE","文档处理",{"categoryNo":77,"categoryName":78,"taxonomyType":23,"taxonomyTypeDesc":24},[99,100,81,101,102,36,35,103,104],"merge","tutorial in 60 mins merge markdown","markdown","jupyter","content","jupyter notebook",{"skillNo":106,"name":107,"nameZh":108,"description":109,"descriptionZh":110,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":111,"categories":112,"keywords":117,"publishedAt":37},"01M6C9ZFYK13ZCT1E8BEEC4NG4","tutorial_in_60_mins.format","60 分钟教程格式规范化","Format a directory to follow the \"Learn X in 60 Minutes\" tutorial conventions","格式化目录，使其遵循「Learn X in 60 Minutes」（60 分钟学会 X）教程约定。","https:\u002F\u002Fgithub.com\u002Fcausify-ai\u002Fhelpers\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Ftutorial_in_60_mins.format\u002FSKILL.md",[113,114],{"categoryNo":77,"categoryName":78,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":115,"categoryName":116,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8CFCW1CKQHXFV91HEWYD9W6","课程开发与教学制作",[118,81,119,120,121,36],"tutorial in 60 mins format","format","directory","learn",{"skillNo":123,"name":124,"nameZh":125,"description":126,"descriptionZh":127,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":128,"categories":129,"keywords":132,"publishedAt":37},"01M6C9ZDKXSBKNKX7M3X4W38G5","tutorial_in_60_mins.create","60 分钟教程目录创建","Create a tutorial directory for the Learn X in 60 Minutes conventions","按照「Learn X in 60 Minutes」（60 分钟学会 X）约定创建教程目录。","https:\u002F\u002Fgithub.com\u002Fcausify-ai\u002Fhelpers\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Ftutorial_in_60_mins.create\u002FSKILL.md",[130,131],{"categoryNo":77,"categoryName":78,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":115,"categoryName":116,"taxonomyType":28,"taxonomyTypeDesc":29},[133,81,134,120,121],"tutorial in 60 mins create","create",{"skillNo":136,"name":137,"nameZh":17,"description":138,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":139,"categories":140,"keywords":141,"publishedAt":37},"01M6BZS5Z0QE03WRS1TM3XJEY9","todo.reorg_in_progress","Reorganize ai_task_queue.md so in-progress tasks, not-started tasks, and mislabeled topic headers sit under the right H1 stage","https:\u002F\u002Fgithub.com\u002Fcausify-ai\u002Fhelpers\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Ftodo.reorg_in_progress\u002FSKILL.md",[],[142,143],"todo reorg in progress","tasks",{"skillNo":145,"name":146,"nameZh":17,"description":147,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":148,"categories":149,"keywords":150,"publishedAt":37},"01M6BZS4CQZ6KK2KQ26SVB7QCS","todo.reorg_headers","Reorganize ai_task_queue.md .md so every H2 topic matches ALL TOPICS and every H3 task sits under the right topic, keeping its H1 stage","https:\u002F\u002Fgithub.com\u002Fcausify-ai\u002Fhelpers\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Ftodo.reorg_headers\u002FSKILL.md",[],[151],"todo reorg headers"]