[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6NVR1FD28FH4KWMVRY91M1E":3,"skill-same:01M6NVR1FD28FH4KWMVRY91M1E":56},{"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":29,"linkOnly":30,"markdownContent":31,"markdownBody":32,"frontMatter":33,"refName":34,"commitSha":35,"skillDirectory":36,"forksCount":14,"repositoryHtmlUrl":37,"repositoryHomepageUrl":6,"ownerHtmlUrl":38,"ownerBlogUrl":39,"ownerDescription":40,"updatedAt":41,"install":42,"resources":55},"01M6NVR1FD28FH4KWMVRY91M1E","modular-code",null,"Modular Code Organization","rubicanjr\u002FFinCognis","rubicanjr","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F234912519?v=4","01M6NT156NND8J474G34SB3923","Rubi","01M6NT15B70RWXE1N3YV0BZY8A",0,"MIT","https:\u002F\u002Fgithub.com\u002Frubicanjr\u002FFinCognis\u002Fblob\u002Fmain\u002Fskills\u002Fmodular-code\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[24,25,26,27,28],"modular","code","modular code","organization","false","2026-11-10 10:12:30",false,"---\nname: modular-code\ndescription: Modular Code Organization\nuser-invocable: false\n---\n\n# Modular Code Organization\n\nWrite modular Python code with files sized for maintainability and AI-assisted development.\n\n## File Size Guidelines\n\n| Lines | Status | Action |\n|-------|--------|--------|\n| 150-500 | Optimal | Sweet spot for AI code editors and human comprehension |\n| 500-1000 | Large | Look for natural split points |\n| 1000-2000 | Too large | Refactor into focused modules |\n| 2000+ | Critical | Must split - causes tooling issues and cognitive overload |\n\n## When to Split\n\nSplit when ANY of these apply:\n- File exceeds 500 lines\n- Multiple unrelated concerns in same file\n- Scroll fatigue finding functions\n- Tests for the file are hard to organize\n- AI tools truncate or miss context\n\n## How to Split\n\n### Natural Split Points\n\n1. **By domain concept**: `auth.py` → `auth\u002Flogin.py`, `auth\u002Ftokens.py`, `auth\u002Fpermissions.py`\n2. **By abstraction layer**: Separate interface from implementation\n3. **By data type**: Group operations on related data structures\n4. **By I\u002FO boundary**: Isolate database, API, file operations\n\n### Package Structure\n\n```\nfeature\u002F\n├── __init__.py      # Keep minimal, just exports\n├── core.py          # Main logic (under 500 lines)\n├── models.py        # Data structures\n├── handlers.py      # I\u002FO and side effects\n└── utils.py         # Pure helper functions\n```\n\n## DO\n\n- Use meaningful module names (`data_storage.py` not `utils2.py`)\n- Keep `__init__.py` files minimal or empty\n- Group related functions together\n- Isolate pure functions from side effects\n- Use snake_case for module names\n\n## DON'T\n\n- Split files arbitrarily by line count alone\n- Create single-function modules\n- Over-modularize into \"package hell\"\n- Use dots or special characters in module names\n- Hide dependencies with \"magic\" imports\n\n## Refactoring Large Files\n\nWhen splitting an existing large file:\n\n1. **Identify clusters**: Find groups of related functions\n2. **Extract incrementally**: Move one cluster at a time\n3. **Update imports**: Fix all import statements\n4. **Run tests**: Verify nothing broke after each move\n5. **Document**: Update any references to old locations\n\n## Current Codebase Candidates\n\nFiles over 2000 lines that need attention:\n- Math compute modules (scipy, mpmath, numpy) - domain-specific, may be acceptable\n- patterns.py - consider splitting by pattern type\n- memory_backfill.py - consider splitting by operation type\n\n## Sources\n\n- [The Hitchhiker's Guide to Python](https:\u002F\u002Fdocs.python-guide.org\u002Fwriting\u002Fstructure\u002F)\n- [Python Project Best Practices - Dagster](https:\u002F\u002Fdagster.io\u002Fblog\u002Fpython-project-best-practices)\n- [Right-Sizing Python Files for AI Editors](https:\u002F\u002Fmedium.com\u002F@eamonn.faherty_58176\u002Fright-sizing-your-python-files-the-150-500-line-sweet-spot-for-ai-code-editors-340d550dcea4)\n- [PEP 8 Style Guide](https:\u002F\u002Fpeps.python.org\u002Fpep-0008\u002F)\n","# Modular Code Organization\n\nWrite modular Python code with files sized for maintainability and AI-assisted development.\n\n## File Size Guidelines\n\n| Lines | Status | Action |\n|-------|--------|--------|\n| 150-500 | Optimal | Sweet spot for AI code editors and human comprehension |\n| 500-1000 | Large | Look for natural split points |\n| 1000-2000 | Too large | Refactor into focused modules |\n| 2000+ | Critical | Must split - causes tooling issues and cognitive overload |\n\n## When to Split\n\nSplit when ANY of these apply:\n- File exceeds 500 lines\n- Multiple unrelated concerns in same file\n- Scroll fatigue finding functions\n- Tests for the file are hard to organize\n- AI tools truncate or miss context\n\n## How to Split\n\n### Natural Split Points\n\n1. **By domain concept**: `auth.py` → `auth\u002Flogin.py`, `auth\u002Ftokens.py`, `auth\u002Fpermissions.py`\n2. **By abstraction layer**: Separate interface from implementation\n3. **By data type**: Group operations on related data structures\n4. **By I\u002FO boundary**: Isolate database, API, file operations\n\n### Package Structure\n\n```\nfeature\u002F\n├── __init__.py      # Keep minimal, just exports\n├── core.py          # Main logic (under 500 lines)\n├── models.py        # Data structures\n├── handlers.py      # I\u002FO and side effects\n└── utils.py         # Pure helper functions\n```\n\n## DO\n\n- Use meaningful module names (`data_storage.py` not `utils2.py`)\n- Keep `__init__.py` files minimal or empty\n- Group related functions together\n- Isolate pure functions from side effects\n- Use snake_case for module names\n\n## DON'T\n\n- Split files arbitrarily by line count alone\n- Create single-function modules\n- Over-modularize into \"package hell\"\n- Use dots or special characters in module names\n- Hide dependencies with \"magic\" imports\n\n## Refactoring Large Files\n\nWhen splitting an existing large file:\n\n1. **Identify clusters**: Find groups of related functions\n2. **Extract incrementally**: Move one cluster at a time\n3. **Update imports**: Fix all import statements\n4. **Run tests**: Verify nothing broke after each move\n5. **Document**: Update any references to old locations\n\n## Current Codebase Candidates\n\nFiles over 2000 lines that need attention:\n- Math compute modules (scipy, mpmath, numpy) - domain-specific, may be acceptable\n- patterns.py - consider splitting by pattern type\n- memory_backfill.py - consider splitting by operation type\n\n## Sources\n\n- [The Hitchhiker's Guide to Python](https:\u002F\u002Fdocs.python-guide.org\u002Fwriting\u002Fstructure\u002F)\n- [Python Project Best Practices - Dagster](https:\u002F\u002Fdagster.io\u002Fblog\u002Fpython-project-best-practices)\n- [Right-Sizing Python Files for AI Editors](https:\u002F\u002Fmedium.com\u002F@eamonn.faherty_58176\u002Fright-sizing-your-python-files-the-150-500-line-sweet-spot-for-ai-code-editors-340d550dcea4)\n- [PEP 8 Style Guide](https:\u002F\u002Fpeps.python.org\u002Fpep-0008\u002F)\n",{"name":5,"description":7,"user-invocable":30},"main","70e1c350500ee750987420bbae48837afa906b7e","skills\u002Fmodular-code","https:\u002F\u002Fgithub.com\u002Frubicanjr\u002FFinCognis","https:\u002F\u002Fgithub.com\u002Frubicanjr","linktr.ee\u002Ffinanskodu","Industrial Engineer & CIO @FinansKodu. Architecting AI-driven financial agents and autonomous workflows. 🏗️ Building systems, not just prompts.","2026-06-09 13:50:15",{"source":8,"skillName":5,"commands":43,"prompt":53,"zipAvailable":54},[44,47,50],{"tool":45,"command":46},"npx","npx skills add rubicanjr\u002FFinCognis --skill modular-code",{"tool":48,"command":49},"bunx","bunx skills add rubicanjr\u002FFinCognis --skill modular-code",{"tool":51,"command":52},"pnpm","pnpm dlx skills add rubicanjr\u002FFinCognis --skill modular-code","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Frubicanjr\u002FFinCognis\u002Fblob\u002Fmain\u002Fskills\u002Fmodular-code\u002FSKILL.md",true,[],[57,78,86,106,136,155],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":68,"publishedAt":29},"01M6NWS9DAXJTADT4T5MB49X8W","workflow-router","Goal-based workflow orchestration - routes tasks to specialist agents based on user goals","https:\u002F\u002Fgithub.com\u002Frubicanjr\u002FFinCognis\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow-router\u002FSKILL.md",[63],{"categoryNo":64,"categoryName":65,"taxonomyType":66,"taxonomyTypeDesc":67},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[69,70,71,72,73,74,75,76,77],"workflow router","workflow","router","orchestration","goals","goal","user","workflow orchestration","tasks",{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":29},"01M6NWS3RETSC0SHP16HP66E14","wiring","Wiring Verification","https:\u002F\u002Fgithub.com\u002Frubicanjr\u002FFinCognis\u002Fblob\u002Fmain\u002Fskills\u002Fwiring\u002FSKILL.md",[],[80,85,28],"verification",{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":95,"publishedAt":29},"01M6NWS0XW9CVQZBDA1EGW0TWC","websocket-patterns","Connection management, room patterns, reconnection strategies, message buffering, and binary protocol design.","https:\u002F\u002Fgithub.com\u002Frubicanjr\u002FFinCognis\u002Fblob\u002Fmain\u002Fskills\u002Fwebsocket-patterns\u002Fskill.md",[92],{"categoryNo":93,"categoryName":94,"taxonomyType":66,"taxonomyTypeDesc":67},"01JBSEEDCAT000000000000015","视觉设计",[96,97,98,99,100,101,102,103,104,105],"websocket","patterns","websocket patterns","design","protocol","management","message","strategies","binary","connection",{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":116,"publishedAt":29},"01M6NWRDQDX9ZNETAWRRMQWV52","visual-verdict","Screenshot comparison QA for frontend development. Takes a screenshot of the current implementation, scores it across multiple visual dimensions, and returns a structured PASS\u002FREVISE\u002FFAIL verdict with concrete fixes. Use when implementing UI from a design reference or verifying visual correctness.","https:\u002F\u002Fgithub.com\u002Frubicanjr\u002FFinCognis\u002Fblob\u002Fmain\u002Fskills\u002Fvisual-verdict\u002FSKILL.md",[112,115],{"categoryNo":113,"categoryName":114,"taxonomyType":66,"taxonomyTypeDesc":67},"01JBSEEDCAT000000000000009","前端开发",{"categoryNo":64,"categoryName":65,"taxonomyType":66,"taxonomyTypeDesc":67},[117,118,119,120,121,122,123,124,125,126,127,128,129,99,130,131,132,133,134,135],"visual","verdict","visual verdict","ui","across","revise","comparison","correctness","implementing","for","fixes","dimensions","frontend","development","qa","screenshot","returns","use","frontend development",{"skillNo":137,"name":138,"nameZh":6,"description":139,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":140,"categories":141,"keywords":142,"publishedAt":29},"01M6NWR8HSNRS7MNDK2J02QYMN","verification-loop","Comprehensive verification system covering build, types, lint, tests, security, and diff review before a PR.","https:\u002F\u002Fgithub.com\u002Frubicanjr\u002FFinCognis\u002Fblob\u002Fmain\u002Fskills\u002Fverification-loop\u002FSKILL.md",[],[143,144,85,145,146,147,148,149,150,151,152,153,154],"verification loop","loop","lint","review","security","pr","system","diff","build","tests","diff review","types",{"skillNo":156,"name":157,"nameZh":6,"description":158,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":159,"categories":160,"keywords":161,"publishedAt":29},"01M6NWR4HHSFR0VR5EXFRWA747","vector-db-patterns","Embedding strategies, ANN algorithms, hybrid search, RAG chunking strategies, and reranking for semantic search and retrieval.","https:\u002F\u002Fgithub.com\u002Frubicanjr\u002FFinCognis\u002Fblob\u002Fmain\u002Fskills\u002Fvector-db-patterns\u002Fskill.md",[],[162,163,164,165,97,166,167,168,169,103,170,171,172,173,174,126,175,176],"vector db patterns","vector db","db","vector","semantic search","search","embedding strategies","algorithms","chunking","semantic","retrieval","embedding","Hybrid Search","hybrid","rag"]