[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6ADRCJ36WGY1AS9CVT7JMHM":3,"skill-same:01M6ADRCJ36WGY1AS9CVT7JMHM":73},{"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":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":48,"ownerHtmlUrl":49,"ownerBlogUrl":50,"ownerDescription":51,"updatedAt":52,"install":53,"resources":66},"01M6ADRCJ36WGY1AS9CVT7JMHM","java-refactoring-extract-method","Java 提取方法重构","Refactoring using Extract Methods in Java Language","使用 Java 语言中的提取方法（Extract Method）进行代码重构。","github\u002Fawesome-copilot","github","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F9919?v=4","01M6AC83DS133TPXFSP1DHNCC6","GitHub","01M6AD3PBDYPK7NVFJNJ66Y8RS",41162,"MIT",null,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fjava-refactoring-extract-method\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BT7QVANT4709358VEJK53E","代码实现","SCENARIO","使用场景",[31,32,33,34,35,36,37],"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",5360,"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-15 04:42:30",{"source":9,"skillName":5,"commands":54,"prompt":64,"zipAvailable":65},[55,58,61],{"tool":56,"command":57},"npx","npx skills add github\u002Fawesome-copilot --skill java-refactoring-extract-method",{"tool":59,"command":60},"bunx","bunx skills add github\u002Fawesome-copilot --skill java-refactoring-extract-method",{"tool":62,"command":63},"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,[67],{"path":68,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":72},"SKILL.md.tmpl","OTHER","其他",6806,"https:\u002F\u002Fgithub.com\u002Fshengdabai\u002FTony-Claude-Code-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fgstack\u002Flanding-report\u002FSKILL.md.tmpl",[74,82,89,99,126,153],{"skillNo":75,"name":76,"nameZh":17,"description":77,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":81},"01M7B5D8BRA66G07045DF7WDYA","sap-cloud-integration","SAP Cloud Integration (CPI, part of SAP Integration Suite) runtime-specific guidance for building and troubleshooting iFlows. Use when writing or reviewing CPI Groovy scripts, choosing headers vs. exchange properties, designing exception subprocesses, JMS retry, idempotency or data store patterns, or diagnosing adapter errors (SFTP, HTTP\u002FOAuth, SOAP, IDoc, OData, AS2, Cloud Connector) from Message Processing Log (MPL) text. Not for SAP PI\u002FPO, ABAP development, or generic Java\u002FGroovy outside CPI.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fsap-cloud-integration\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":83,"name":84,"nameZh":17,"description":85,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":81},"01M7B5CYRGSG571NH7EJWT5066","on-device-delegate","Saves cloud-model context by briefing one bounded, read-heavy sub-task (more than about 25 KB of prose, or many files that no single command can answer) to the local-coding plugin's on-device worker, which runs on the local MAI Code 1.1 Flash model. Use for log and test triage, summarizing many files, or extracting facts from large inputs. When the user names this skill, call the skill tool in the same response as your first other tool call, never as a separate step.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fon-device-delegate\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":17,"description":92,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":93,"licenseFileUrl":94,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":98},"01M74CBQ0M3ZKGQH8XKQZ2FHB1","scout-issue","Use when a developer wants to find the best GitHub issues to contribute to in a repository. Invoke with \u002Fscout-issue or ask to find good first issues, beginner-friendly issues, or open source work. Asks about experience level, technical skills, time, and contribution type, then searches GitHub issues, scores them, and presents ranked recommendations with match analysis.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fscout-issue\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fscout-issue\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":100,"name":101,"nameZh":17,"description":102,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":38},"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",[],[106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125],"supabase rls policies","supabase rls","supabase","rls","project","with","when","review","change","read","write","security","isolation","tables","as","tests","prove","use","users","functions",{"skillNo":127,"name":128,"nameZh":17,"description":129,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":130,"categories":131,"keywords":132,"publishedAt":38},"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",[],[133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152],"distribution","skill distribution audit","audit","output","reconcile","release","template","duplicate","investigate","drift","SET","deterministic","installer","for","discovery","comparison","helper","manifest","version","collection",{"skillNo":154,"name":155,"nameZh":17,"description":156,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":157,"sourceHtmlUrl":158,"categories":159,"keywords":160,"publishedAt":38},"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",[],[161,162,163,164,165,166,167,146,110,168,169,170,171,172,173,174,123,175,176,177],"code","logicapps custom code net10 migration","migration","custom","Legacy","projects","standalone","deployment","applications","local","azure","worker","upgrades","package","apps","debugging","workflows"]