[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6ADRCJ36WGY1AS9CVT7JMHM":3,"skill-same:01M6ADRCJ36WGY1AS9CVT7JMHM":61},{"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":26,"linkOnly":27,"markdownContent":28,"markdownBody":29,"frontMatter":30,"refName":31,"commitSha":32,"skillDirectory":33,"forksCount":34,"repositoryHtmlUrl":35,"repositoryHomepageUrl":36,"ownerHtmlUrl":37,"ownerBlogUrl":38,"ownerDescription":39,"updatedAt":40,"install":41,"resources":54},"01M6ADRCJ36WGY1AS9CVT7JMHM","java-refactoring-extract-method",null,"Refactoring using Extract Methods in Java Language","github\u002Fawesome-copilot","github","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F9919?v=4","01M6AC83DS133TPXFSP1DHNCC6","GitHub","01M6AD3PBDYPK7NVFJNJ66Y8RS",41081,"MIT","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fjava-refactoring-extract-method\u002FSKILL.md",[],[19,20,21,22,23,24,25],"java","java refactoring extract method","refactoring","extract","methods","language","java language","2026-11-10 10:12:30",false,"---\nname: java-refactoring-extract-method\ndescription: 'Refactoring using Extract Methods in Java Language'\n---\n\n# Refactoring Java Methods with Extract Method\n\n## Role\n\nYou are an expert in refactoring Java methods.\n\nBelow are **2 examples** (with titles code before and code after refactoring) that represents **Extract Method**.\n\n## Code Before Refactoring 1:\n```java\npublic FactLineBuilder setC_BPartner_ID_IfValid(final int bpartnerId) {\n\tassertNotBuild();\n\tif (bpartnerId > 0) {\n\t\tsetC_BPartner_ID(bpartnerId);\n\t}\n\treturn this;\n}\n```\n\n## Code After Refactoring 1:\n```java\npublic FactLineBuilder bpartnerIdIfNotNull(final BPartnerId bpartnerId) {\n\tif (bpartnerId != null) {\n\t\treturn bpartnerId(bpartnerId);\n\t} else {\n\t\treturn this;\n\t}\n}\npublic FactLineBuilder setC_BPartner_ID_IfValid(final int bpartnerRepoId) {\n\treturn bpartnerIdIfNotNull(BPartnerId.ofRepoIdOrNull(bpartnerRepoId));\n}\n```\n\n## Code Before Refactoring 2:\n```java\npublic DefaultExpander add(RelationshipType type, Direction direction) {\n     Direction existingDirection = directions.get(type.name());\n     final RelationshipType[] newTypes;\n     if (existingDirection != null) {\n          if (existingDirection == direction) {\n               return this;\n          }\n          newTypes = types;\n     } else {\n          newTypes = new RelationshipType[types.length + 1];\n          System.arraycopy(types, 0, newTypes, 0, types.length);\n          newTypes[types.length] = type;\n     }\n     Map\u003CString, Direction> newDirections = new HashMap\u003CString, Direction>(directions);\n     newDirections.put(type.name(), direction);\n     return new DefaultExpander(newTypes, newDirections);\n}\n```\n\n## Code After Refactoring 2:\n```java\npublic DefaultExpander add(RelationshipType type, Direction direction) {\n     Direction existingDirection = directions.get(type.name());\n     final RelationshipType[] newTypes;\n     if (existingDirection != null) {\n          if (existingDirection == direction) {\n               return this;\n          }\n          newTypes = types;\n     } else {\n          newTypes = new RelationshipType[types.length + 1];\n          System.arraycopy(types, 0, newTypes, 0, types.length);\n          newTypes[types.length] = type;\n     }\n     Map\u003CString, Direction> newDirections = new HashMap\u003CString, Direction>(directions);\n     newDirections.put(type.name(), direction);\n     return (DefaultExpander) newExpander(newTypes, newDirections);\n}\nprotected RelationshipExpander newExpander(RelationshipType[] types,\n          Map\u003CString, Direction> directions) {\n     return new DefaultExpander(types, directions);\n}\n```\n\n## Safety Rules\n\n- Behaviour-preserving only: no functional change, no removed logic, no changed exceptions, side-effect order or visibility of the original method.\n- Baseline first: run the narrowest green test command for the code (`.\u002Fmvnw -q -Dtest=MyTest test`, `.\u002Fgradlew test --tests MyTest`) or `.\u002Fmvnw verify` \u002F `.\u002Fgradlew build`. Re-run it after every extraction. If the baseline is red, stop and report.\n- If the code has no tests, stop and report; propose characterization tests first. Never delete or weaken tests.\n- One extraction per step (one commit each when the user asks for commits) so each is reviewable and revertible.\n- Prefer the IDE refactoring: use an available IDE tool that exposes Extract Method (it handles parameters and return values safely). The Copilot CLI `lsp` tool offers navigation and rename but no code actions, so configuring jdtls through `lsp-setup` does not provide it; otherwise extract by hand and validate with the compiler and tests.\n- Extracted methods are `private` by default. Do not add public\u002Fprotected methods, change the existing signature, or touch generated code (`target\u002F`, `build\u002Fgenerated`, `@Generated`) without asking the user.\n- Watch for: local variables modified in the block (return a value or introduce a small result type), multiple results, checked exceptions, `return`\u002F`break`\u002F`continue` inside the block, and `synchronized`\u002Ftransaction-annotated methods (extracted `private` methods called on `this` bypass Spring proxies and AOP).\n\n## Task\n\nApply **Extract Method** to improve readability, testability, cohesion and consistency.\n\n1. Identify candidate methods (rough guide: > 15 lines, > 10 statements or cyclomatic complexity > 10) and cohesive blocks inside them.\n2. Extract each block into a descriptively named method, following the existing code style and the project's Java level (check `maven.compiler.release` \u002F toolchain; do not use newer syntax).\n3. Add a one-line comment above each new method only if its name does not already convey its purpose.\n4. Compile and run the tests; report the methods changed, the commands run and their results.\n\nOutput complete, compilable code for each changed method.\n\n## Code to be Refactored:\n\nNow, assess all methods with high complexity and refactor them using **Extract Method**\n","# Refactoring Java Methods with Extract Method\n\n## Role\n\nYou are an expert in refactoring Java methods.\n\nBelow are **2 examples** (with titles code before and code after refactoring) that represents **Extract Method**.\n\n## Code Before Refactoring 1:\n```java\npublic FactLineBuilder setC_BPartner_ID_IfValid(final int bpartnerId) {\n\tassertNotBuild();\n\tif (bpartnerId > 0) {\n\t\tsetC_BPartner_ID(bpartnerId);\n\t}\n\treturn this;\n}\n```\n\n## Code After Refactoring 1:\n```java\npublic FactLineBuilder bpartnerIdIfNotNull(final BPartnerId bpartnerId) {\n\tif (bpartnerId != null) {\n\t\treturn bpartnerId(bpartnerId);\n\t} else {\n\t\treturn this;\n\t}\n}\npublic FactLineBuilder setC_BPartner_ID_IfValid(final int bpartnerRepoId) {\n\treturn bpartnerIdIfNotNull(BPartnerId.ofRepoIdOrNull(bpartnerRepoId));\n}\n```\n\n## Code Before Refactoring 2:\n```java\npublic DefaultExpander add(RelationshipType type, Direction direction) {\n     Direction existingDirection = directions.get(type.name());\n     final RelationshipType[] newTypes;\n     if (existingDirection != null) {\n          if (existingDirection == direction) {\n               return this;\n          }\n          newTypes = types;\n     } else {\n          newTypes = new RelationshipType[types.length + 1];\n          System.arraycopy(types, 0, newTypes, 0, types.length);\n          newTypes[types.length] = type;\n     }\n     Map\u003CString, Direction> newDirections = new HashMap\u003CString, Direction>(directions);\n     newDirections.put(type.name(), direction);\n     return new DefaultExpander(newTypes, newDirections);\n}\n```\n\n## Code After Refactoring 2:\n```java\npublic DefaultExpander add(RelationshipType type, Direction direction) {\n     Direction existingDirection = directions.get(type.name());\n     final RelationshipType[] newTypes;\n     if (existingDirection != null) {\n          if (existingDirection == direction) {\n               return this;\n          }\n          newTypes = types;\n     } else {\n          newTypes = new RelationshipType[types.length + 1];\n          System.arraycopy(types, 0, newTypes, 0, types.length);\n          newTypes[types.length] = type;\n     }\n     Map\u003CString, Direction> newDirections = new HashMap\u003CString, Direction>(directions);\n     newDirections.put(type.name(), direction);\n     return (DefaultExpander) newExpander(newTypes, newDirections);\n}\nprotected RelationshipExpander newExpander(RelationshipType[] types,\n          Map\u003CString, Direction> directions) {\n     return new DefaultExpander(types, directions);\n}\n```\n\n## Safety Rules\n\n- Behaviour-preserving only: no functional change, no removed logic, no changed exceptions, side-effect order or visibility of the original method.\n- Baseline first: run the narrowest green test command for the code (`.\u002Fmvnw -q -Dtest=MyTest test`, `.\u002Fgradlew test --tests MyTest`) or `.\u002Fmvnw verify` \u002F `.\u002Fgradlew build`. Re-run it after every extraction. If the baseline is red, stop and report.\n- If the code has no tests, stop and report; propose characterization tests first. Never delete or weaken tests.\n- One extraction per step (one commit each when the user asks for commits) so each is reviewable and revertible.\n- Prefer the IDE refactoring: use an available IDE tool that exposes Extract Method (it handles parameters and return values safely). The Copilot CLI `lsp` tool offers navigation and rename but no code actions, so configuring jdtls through `lsp-setup` does not provide it; otherwise extract by hand and validate with the compiler and tests.\n- Extracted methods are `private` by default. Do not add public\u002Fprotected methods, change the existing signature, or touch generated code (`target\u002F`, `build\u002Fgenerated`, `@Generated`) without asking the user.\n- Watch for: local variables modified in the block (return a value or introduce a small result type), multiple results, checked exceptions, `return`\u002F`break`\u002F`continue` inside the block, and `synchronized`\u002Ftransaction-annotated methods (extracted `private` methods called on `this` bypass Spring proxies and AOP).\n\n## Task\n\nApply **Extract Method** to improve readability, testability, cohesion and consistency.\n\n1. Identify candidate methods (rough guide: > 15 lines, > 10 statements or cyclomatic complexity > 10) and cohesive blocks inside them.\n2. Extract each block into a descriptively named method, following the existing code style and the project's Java level (check `maven.compiler.release` \u002F toolchain; do not use newer syntax).\n3. Add a one-line comment above each new method only if its name does not already convey its purpose.\n4. Compile and run the tests; report the methods changed, the commands run and their results.\n\nOutput complete, compilable code for each changed method.\n\n## Code to be Refactored:\n\nNow, assess all methods with high complexity and refactor them using **Extract Method**\n",{"name":5,"description":7},"main","5269f7ea2d6c3a9bfda5ed878b6726cf509121fd","skills\u002Fjava-refactoring-extract-method",5344,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot","https:\u002F\u002Fawesome-copilot.github.com\u002F","https:\u002F\u002Fgithub.com\u002Fgithub","https:\u002F\u002Fgithub.com\u002Fabout","How people build software.","2026-11-13 02:05:36",{"source":8,"skillName":5,"commands":42,"prompt":52,"zipAvailable":53},[43,46,49],{"tool":44,"command":45},"npx","npx skills add github\u002Fawesome-copilot --skill java-refactoring-extract-method",{"tool":47,"command":48},"bunx","bunx skills add github\u002Fawesome-copilot --skill java-refactoring-extract-method",{"tool":50,"command":51},"pnpm","pnpm dlx skills add github\u002Fawesome-copilot --skill java-refactoring-extract-method","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fjava-refactoring-extract-method\u002FSKILL.md",true,[55],{"path":56,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":59,"sourceHtmlUrl":60},"SKILL.md.tmpl","OTHER","其他",6806,"https:\u002F\u002Fgithub.com\u002Fshengdabai\u002FTony-Claude-Code-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fgstack\u002Flanding-report\u002FSKILL.md.tmpl",[62,97,125,155,188,205],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":76,"publishedAt":26},"01M70KXZNX9ES38N2A8M58ZZMZ","supabase-rls-policies","Write, review, and test Supabase Row Level Security (RLS) policies so that one user cannot read or change another user's rows. Use when creating or changing tables, policies, views, or security definer functions in a Supabase project, when reviewing a migration that touches RLS, or when asked to prove user isolation with pgTAP tests that sign in as two users.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fsupabase-rls-policies\u002FSKILL.md",[68,73],{"categoryNo":69,"categoryName":70,"taxonomyType":71,"taxonomyTypeDesc":72},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",{"categoryNo":74,"categoryName":75,"taxonomyType":71,"taxonomyTypeDesc":72},"01JBSEEDCAT000000000000023","Skill与智能体开发",[77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96],"supabase","rls","supabase rls","supabase rls policies","project","when","review","change","read","write","security","isolation","tables","as","tests","prove","use","users","functions","with",{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":104,"publishedAt":26},"01M70KWA5YWXDV6V8DZ19E3T2Y","skill-distribution-audit","Audit a skill collection before release or investigate installer omissions, archived\u002Ftemplate leakage, duplicate identities, and manifest drift. Reconcile the intended public source set, distribution manifest, and actual discovery output for a specified consumer version. Includes a deterministic set-comparison helper.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fskill-distribution-audit\u002FSKILL.md",[103],{"categoryNo":74,"categoryName":75,"taxonomyType":71,"taxonomyTypeDesc":72},[105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124],"distribution","skill distribution audit","audit","SET","deterministic","installer","for","discovery","comparison","helper","manifest","version","collection","drift","output","investigate","duplicate","template","release","reconcile",{"skillNo":126,"name":127,"nameZh":6,"description":128,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":129,"sourceHtmlUrl":130,"categories":131,"keywords":137,"publishedAt":26},"01M70KCJPFVW7PPQ49CC5R8JGK","logicapps-custom-code-net10-migration","Migrate Azure Logic Apps Standard local-function custom-code projects from .NET 8 to .NET 10. Use for legacy Logic Apps custom-code workspace upgrades, project\u002Fpackage configuration, custom-worker settings, publication, and integrated VS Code debugging. Not for ordinary .NET applications, standalone Azure Functions, Consumption workflows, or cloud deployment.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Flogicapps-custom-code-net10-migration\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Flogicapps-custom-code-net10-migration\u002FSKILL.md",[132],{"categoryNo":133,"categoryName":134,"taxonomyType":135,"taxonomyTypeDesc":136},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[138,139,140,141,142,143,111,81,144,145,146,147,148,149,150,93,151,152,153,154],"custom","code","logicapps custom code net10 migration","migration","projects","standalone","deployment","applications","local","azure","worker","upgrades","package","apps","Legacy","debugging","workflows",{"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":159,"sourceHtmlUrl":160,"categories":161,"keywords":166,"publishedAt":26},"01M6AEBN37RQMXJ3298PEY7PG1","winmd-api-search","Find and explore Windows desktop APIs. Use when building features that need platform capabilities — camera, file access, notifications, UI controls, AI\u002FML, sensors, networking, etc. Discovers the right API for a task and retrieves full type details (methods, properties, events, enumeration values).","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fwinmd-api-search\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fwinmd-api-search\u002FSKILL.md",[162,165],{"categoryNo":163,"categoryName":164,"taxonomyType":71,"taxonomyTypeDesc":72},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":133,"categoryName":134,"taxonomyType":135,"taxonomyTypeDesc":136},[167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,82,182,183,184,185,186,111,23,187],"winmd api search","search","api","windows","desktop","file access","enumeration","ui","ml","file","networking","capabilities","notifications","explore","access","features","full","camera","events","platform","controls",{"skillNo":189,"name":190,"nameZh":6,"description":191,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":192,"licenseFileUrl":193,"sourceHtmlUrl":194,"categories":195,"keywords":201,"publishedAt":26},"01M6AE571R3SC1ZGE202B3NB5S","resemble-detect","Deepfake detection and media safety — detect AI-generated audio, images, video, and text, trace synthesis sources, apply watermarks, verify speaker identity, and analyze media intelligence using Resemble AI","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fresemble-detect\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fresemble-detect\u002FSKILL.md",[196,197,200],{"categoryNo":163,"categoryName":164,"taxonomyType":71,"taxonomyTypeDesc":72},{"categoryNo":198,"categoryName":199,"taxonomyType":71,"taxonomyTypeDesc":72},"01JBSEEDCAT000000000000016","图像与多媒体",{"categoryNo":74,"categoryName":75,"taxonomyType":71,"taxonomyTypeDesc":72},[202,108,176,203,204],"resemble detect","https","identity",{"skillNo":206,"name":207,"nameZh":6,"description":208,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":192,"licenseFileUrl":209,"sourceHtmlUrl":210,"categories":211,"keywords":216,"publishedAt":26},"01M6AE30BSK2HCY4TQQ22Z8JRD","quality-playbook","Run a complete quality engineering audit on any codebase. Derives behavioral requirements from the code, generates spec-traced functional tests, runs a three-pass code review with regression tests, executes a multi-model spec audit (Council of Three), and produces a consolidated bug report with TDD-verified patches. Finds the 35% of real defects that structural code review alone cannot catch. Works with any language. Trigger on 'quality playbook', 'spec audit', 'Council of Three', 'fitness-to-purpose', or 'coverage theater'.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fquality-playbook\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fquality-playbook\u002FSKILL.md",[212,215],{"categoryNo":213,"categoryName":214,"taxonomyType":71,"taxonomyTypeDesc":72},"01JBSEEDCAT000000000000007","代码审查",{"categoryNo":74,"categoryName":75,"taxonomyType":71,"taxonomyTypeDesc":72},[217,218,219,220,139,83,9,107,221,222,203,223,224,225,226,227,228,229,230,231,232,233,91,234,235,236,237],"playbook","quality playbook","quality","code review","tdd","run","report","spec","bug report","council","engineering","functional","spec audit","bug","verified","multi-model","three","coverage","model","regression","structural"]