[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6F1NERCF9Z3J6MSA84YTYGA":3,"skill-same:01M6F1NERCF9Z3J6MSA84YTYGA":63},{"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":23,"publishedAt":36,"linkOnly":37,"markdownContent":38,"markdownBody":39,"frontMatter":40,"refName":41,"commitSha":42,"skillDirectory":43,"forksCount":44,"repositoryHtmlUrl":45,"repositoryHomepageUrl":46,"ownerHtmlUrl":47,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":48,"install":49,"resources":62},"01M6F1NERCF9Z3J6MSA84YTYGA","coding.factor_common_code",null,"Identify and refactor duplicated code into shared functions across Python files","causify-ai\u002Fhelpers","causify-ai","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F121828442?v=4","01M6BZFTHW2MQR7FWK8CDW0DRA","Causify.AI","01M6F1K6CCKKF8YKTBN4ZV509G",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fcausify-ai\u002Fhelpers\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Fcoding.factor_common_code\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[24,25,26,27,28,29,30,31,32,33,34,35],"code","coding","common","coding factor common code","factor","python","refactor","haiku","files","functions","across","shared","2026-11-10 10:12:30",false,"---\ndescription: Identify and refactor duplicated code into shared functions across Python files\nmodel: haiku\n---\n\n# Role\n- You are a senior Python engineer with strong experience in refactoring and\n  codebase hygiene\n\n# Goal\n- I will provide references to one or more Python source files\n- Your task is to:\n  - Read and analyze the code across these files\n  - Identify meaningful duplicated or near-duplicated code blocks that can be\n    safely refactored into shared functions\n  - Report these changes\n  - Ask the user\n\n- You must not change the behavior of the code\n\n# Workflow\n\n## Objectives\n- Detect common logic that appears in multiple places (exact or structurally\n  similar)\n- Propose reusable functions that improve maintainability and readability\n\n## Guidelines\n- Do not suggest functions that are trivial (e.g., fewer than 2-3 meaningful\n  lines)\n- Avoid trivial abstractions and prefer extracting logic that:\n  - Is likely to change in one place in the future\n  - Encapsulates a clear responsibility\n- If similar blocks are not identical, explain briefly why they can still be\n  unified\n- Do not rewrite the full implementation unless explicitly asked, but only focus\n  on identifying and describing refactor opportunities\n\n## Output Format\n- If the user uses the option `--dry_run` then report the output as below\n  instead of executing the refactorings\n- For each proposed refactoring, produce:\n  - Proposed function interface\n    - Function name\n    - Parameters (with brief explanation if non-obvious)\n    - Return value (if any)\n  - Summary of the locations of duplicated code\n    - Use the following format:\n      ```verbatim\n      file1.py: l1-l2, l3-l4, ...\n      file2.py: l5-l8, ...\n      ```\n  - Create a vim quickfix cfile for the locations using the convention in\n    `.claude\u002Fskills\u002Fcfile.rules.md`\n\n## Make Changes\n- Make the changes to remove repeated code\n\n# Conventions\n- Follow the rules in `.claude\u002Fskills\u002Fcoding.rules.md`\n\n# Verification\n- [ ] Confirm proposed functions are non-trivial and each encapsulates a clear\n      responsibility\n- [ ] Confirm the code behavior is unchanged after refactoring\n- [ ] Confirm the cfile locations point to the correct duplicated blocks\n","# Role\n- You are a senior Python engineer with strong experience in refactoring and\n  codebase hygiene\n\n# Goal\n- I will provide references to one or more Python source files\n- Your task is to:\n  - Read and analyze the code across these files\n  - Identify meaningful duplicated or near-duplicated code blocks that can be\n    safely refactored into shared functions\n  - Report these changes\n  - Ask the user\n\n- You must not change the behavior of the code\n\n# Workflow\n\n## Objectives\n- Detect common logic that appears in multiple places (exact or structurally\n  similar)\n- Propose reusable functions that improve maintainability and readability\n\n## Guidelines\n- Do not suggest functions that are trivial (e.g., fewer than 2-3 meaningful\n  lines)\n- Avoid trivial abstractions and prefer extracting logic that:\n  - Is likely to change in one place in the future\n  - Encapsulates a clear responsibility\n- If similar blocks are not identical, explain briefly why they can still be\n  unified\n- Do not rewrite the full implementation unless explicitly asked, but only focus\n  on identifying and describing refactor opportunities\n\n## Output Format\n- If the user uses the option `--dry_run` then report the output as below\n  instead of executing the refactorings\n- For each proposed refactoring, produce:\n  - Proposed function interface\n    - Function name\n    - Parameters (with brief explanation if non-obvious)\n    - Return value (if any)\n  - Summary of the locations of duplicated code\n    - Use the following format:\n      ```verbatim\n      file1.py: l1-l2, l3-l4, ...\n      file2.py: l5-l8, ...\n      ```\n  - Create a vim quickfix cfile for the locations using the convention in\n    `.claude\u002Fskills\u002Fcfile.rules.md`\n\n## Make Changes\n- Make the changes to remove repeated code\n\n# Conventions\n- Follow the rules in `.claude\u002Fskills\u002Fcoding.rules.md`\n\n# Verification\n- [ ] Confirm proposed functions are non-trivial and each encapsulates a clear\n      responsibility\n- [ ] Confirm the code behavior is unchanged after refactoring\n- [ ] Confirm the cfile locations point to the correct duplicated blocks\n",{"model":31,"description":7},"master","804ae3e928c04740cec553be0eb28c8d06ff420e",".claude\u002Fskills\u002Fcoding.factor_common_code",1,"https:\u002F\u002Fgithub.com\u002Fcausify-ai\u002Fhelpers","https:\u002F\u002Fcausify-ai.github.io\u002Fhelpers\u002F","https:\u002F\u002Fgithub.com\u002Fcausify-ai","2026-11-02 21:54:29",{"source":8,"skillName":5,"commands":50,"prompt":60,"zipAvailable":61},[51,54,57],{"tool":52,"command":53},"npx","npx skills add causify-ai\u002Fhelpers --skill coding.factor_common_code",{"tool":55,"command":56},"bunx","bunx skills add causify-ai\u002Fhelpers --skill coding.factor_common_code",{"tool":58,"command":59},"pnpm","pnpm dlx skills add causify-ai\u002Fhelpers --skill coding.factor_common_code","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fcausify-ai\u002Fhelpers\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Fcoding.factor_common_code\u002FSKILL.md",true,[],[64,84,102,114,123,137],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":75,"publishedAt":36},"01M6F209RASRBEK7GBNG5M00K0","tutorial_in_60_mins.propagate_docker_changes","Sync tutorial and class-project Docker files to match project_template","https:\u002F\u002Fgithub.com\u002Fcausify-ai\u002Fhelpers\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Ftutorial_in_60_mins.propagate_docker_changes\u002FSKILL.md",[70],{"categoryNo":71,"categoryName":72,"taxonomyType":73,"taxonomyTypeDesc":74},"01JBSEEDCAT000000000000011","运维与部署","SCENARIO","使用场景",[76,77,78,79,80,81,31,32,82,83],"docker","tutorial","tutorial in 60 mins propagate docker changes","propagate","template","sync","project","match",{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":93,"publishedAt":36},"01M6F207XZ5YDAJ0KNDRE6EN0R","tutorial_in_60_mins.merge_markdown","Merge the content of a markdown file into a Jupyter notebook","https:\u002F\u002Fgithub.com\u002Fcausify-ai\u002Fhelpers\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Ftutorial_in_60_mins.merge_markdown\u002FSKILL.md",[90],{"categoryNo":91,"categoryName":92,"taxonomyType":73,"taxonomyTypeDesc":74},"01JBSEEDCAT000000000000002","文档处理",[94,95,77,96,97,98,31,99,100,101],"markdown","merge","tutorial in 60 mins merge markdown","notebook","jupyter","file","jupyter notebook","content",{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":36},"01M6F2059X95Q1A13HD67E9JRF","tutorial_in_60_mins.format","Format a directory to follow the \"Learn X in 60 Minutes\" tutorial conventions","https:\u002F\u002Fgithub.com\u002Fcausify-ai\u002Fhelpers\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Ftutorial_in_60_mins.format\u002FSKILL.md",[],[109,77,110,111,112,31,113],"tutorial in 60 mins format","format","directory","learn","conventions",{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":36},"01M6F202MDHMNYD5S1YHG2PKZD","tutorial_in_60_mins.create","Create a tutorial directory for the Learn X in 60 Minutes conventions","https:\u002F\u002Fgithub.com\u002Fcausify-ai\u002Fhelpers\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Ftutorial_in_60_mins.create\u002FSKILL.md",[],[121,77,122,112,111,113],"tutorial in 60 mins create","create",{"skillNo":124,"name":125,"nameZh":6,"description":126,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":127,"categories":128,"keywords":129,"publishedAt":36},"01M6F2004BW13GQ59N3RGSAYVN","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",[],[130,131,132,133,134,135,136],"progress","todo","todo reorg in progress","tasks","queue","task","stage",{"skillNo":138,"name":139,"nameZh":6,"description":140,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":141,"categories":142,"keywords":143,"publishedAt":36},"01M6F1ZXN0G6HBD08GT8HE5FYA","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",[],[144,131,134,135,136],"todo reorg headers"]