[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79GF3EWMJA0QF0RRN3AR3BT":3,"skill-same:01M79GF3EWMJA0QF0RRN3AR3BT":44},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":13,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M79GF3EWMJA0QF0RRN3AR3BT","java-coding-standards",null,"Java coding standards for Spring Boot services: naming, immutability, Optional usage, streams, exceptions, generics, and project layout.","luckyboy120794\u002FCowork_FAG3","luckyboy120794","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F58225127?v=4","01M79G5TSJYK6784KFN0JNN2FE","01M79G5TT5SWZW8YQR18V4GTS2",0,"MIT","https:\u002F\u002Fgithub.com\u002Fluckyboy120794\u002FCowork_FAG3\u002Fblob\u002Ffor_merge\u002F.skills\u002Fjava-coding-standards\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: java-coding-standards\ndescription: \"Java coding standards for Spring Boot services: naming, immutability, Optional usage, streams, exceptions, generics, and project layout.\"\norigin: ECC\n---\n\n# Java Coding Standards\n\nStandards for readable, maintainable Java (17+) code in Spring Boot services.\n\n## When to Activate\n\n- Writing or reviewing Java code in Spring Boot projects\n- Enforcing naming, immutability, or exception handling conventions\n- Working with records, sealed classes, or pattern matching (Java 17+)\n- Reviewing use of Optional, streams, or generics\n- Structuring packages and project layout\n\n## Core Principles\n\n- Prefer clarity over cleverness\n- Immutable by default; minimize shared mutable state\n- Fail fast with meaningful exceptions\n- Consistent naming and package structure\n\n## Naming\n\n```java\n\u002F\u002F PASS: Classes\u002FRecords: PascalCase\npublic class MarketService {}\npublic record Money(BigDecimal amount, Currency currency) {}\n\n\u002F\u002F PASS: Methods\u002Ffields: camelCase\nprivate final MarketRepository marketRepository;\npublic Market findBySlug(String slug) {}\n\n\u002F\u002F PASS: Constants: UPPER_SNAKE_CASE\nprivate static final int MAX_PAGE_SIZE = 100;\n```\n\n## Immutability\n\n```java\n\u002F\u002F PASS: Favor records and final fields\npublic record MarketDto(Long id, String name, MarketStatus status) {}\n\npublic class Market {\n  private final Long id;\n  private final String name;\n  \u002F\u002F getters only, no setters\n}\n```\n\n## Optional Usage\n\n```java\n\u002F\u002F PASS: Return Optional from find* methods\nOptional\u003CMarket> market = marketRepository.findBySlug(slug);\n\n\u002F\u002F PASS: Map\u002FflatMap instead of get()\nreturn market\n    .map(MarketResponse::from)\n    .orElseThrow(() -> new EntityNotFoundException(\"Market not found\"));\n```\n\n## Streams Best Practices\n\n```java\n\u002F\u002F PASS: Use streams for transformations, keep pipelines short\nList\u003CString> names = markets.stream()\n    .map(Market::name)\n    .filter(Objects::nonNull)\n    .toList();\n\n\u002F\u002F FAIL: Avoid complex nested streams; prefer loops for clarity\n```\n\n## Exceptions\n\n- Use unchecked exceptions for domain errors; wrap technical exceptions with context\n- Create domain-specific exceptions (e.g., `MarketNotFoundException`)\n- Avoid broad `catch (Exception ex)` unless rethrowing\u002Flogging centrally\n\n```java\nthrow new MarketNotFoundException(slug);\n```\n\n## Generics and Type Safety\n\n- Avoid raw types; declare generic parameters\n- Prefer bounded generics for reusable utilities\n\n```java\npublic \u003CT extends Identifiable> Map\u003CLong, T> indexById(Collection\u003CT> items) { ... }\n```\n\n## Project Structure (Maven\u002FGradle)\n\n```\nsrc\u002Fmain\u002Fjava\u002Fcom\u002Fexample\u002Fapp\u002F\n  config\u002F\n  controller\u002F\n  service\u002F\n  repository\u002F\n  domain\u002F\n  dto\u002F\n  util\u002F\nsrc\u002Fmain\u002Fresources\u002F\n  application.yml\nsrc\u002Ftest\u002Fjava\u002F... (mirrors main)\n```\n\n## Formatting and Style\n\n- Use 2 or 4 spaces consistently (project standard)\n- One public top-level type per file\n- Keep methods short and focused; extract helpers\n- Order members: constants, fields, constructors, public methods, protected, private\n\n## Code Smells to Avoid\n\n- Long parameter lists → use DTO\u002Fbuilders\n- Deep nesting → early returns\n- Magic numbers → named constants\n- Static mutable state → prefer dependency injection\n- Silent catch blocks → log and act or rethrow\n\n## Logging\n\n```java\nprivate static final Logger log = LoggerFactory.getLogger(MarketService.class);\nlog.info(\"fetch_market slug={}\", slug);\nlog.error(\"failed_fetch_market slug={}\", slug, ex);\n```\n\n## Null Handling\n\n- Accept `@Nullable` only when unavoidable; otherwise use `@NonNull`\n- Use Bean Validation (`@NotNull`, `@NotBlank`) on inputs\n\n## Testing Expectations\n\n- JUnit 5 + AssertJ for fluent assertions\n- Mockito for mocking; avoid partial mocks where possible\n- Favor deterministic tests; no hidden sleeps\n\n**Remember**: Keep code intentional, typed, and observable. Optimize for maintainability over micro-optimizations unless proven necessary.\n","# Java Coding Standards\n\nStandards for readable, maintainable Java (17+) code in Spring Boot services.\n\n## When to Activate\n\n- Writing or reviewing Java code in Spring Boot projects\n- Enforcing naming, immutability, or exception handling conventions\n- Working with records, sealed classes, or pattern matching (Java 17+)\n- Reviewing use of Optional, streams, or generics\n- Structuring packages and project layout\n\n## Core Principles\n\n- Prefer clarity over cleverness\n- Immutable by default; minimize shared mutable state\n- Fail fast with meaningful exceptions\n- Consistent naming and package structure\n\n## Naming\n\n```java\n\u002F\u002F PASS: Classes\u002FRecords: PascalCase\npublic class MarketService {}\npublic record Money(BigDecimal amount, Currency currency) {}\n\n\u002F\u002F PASS: Methods\u002Ffields: camelCase\nprivate final MarketRepository marketRepository;\npublic Market findBySlug(String slug) {}\n\n\u002F\u002F PASS: Constants: UPPER_SNAKE_CASE\nprivate static final int MAX_PAGE_SIZE = 100;\n```\n\n## Immutability\n\n```java\n\u002F\u002F PASS: Favor records and final fields\npublic record MarketDto(Long id, String name, MarketStatus status) {}\n\npublic class Market {\n  private final Long id;\n  private final String name;\n  \u002F\u002F getters only, no setters\n}\n```\n\n## Optional Usage\n\n```java\n\u002F\u002F PASS: Return Optional from find* methods\nOptional\u003CMarket> market = marketRepository.findBySlug(slug);\n\n\u002F\u002F PASS: Map\u002FflatMap instead of get()\nreturn market\n    .map(MarketResponse::from)\n    .orElseThrow(() -> new EntityNotFoundException(\"Market not found\"));\n```\n\n## Streams Best Practices\n\n```java\n\u002F\u002F PASS: Use streams for transformations, keep pipelines short\nList\u003CString> names = markets.stream()\n    .map(Market::name)\n    .filter(Objects::nonNull)\n    .toList();\n\n\u002F\u002F FAIL: Avoid complex nested streams; prefer loops for clarity\n```\n\n## Exceptions\n\n- Use unchecked exceptions for domain errors; wrap technical exceptions with context\n- Create domain-specific exceptions (e.g., `MarketNotFoundException`)\n- Avoid broad `catch (Exception ex)` unless rethrowing\u002Flogging centrally\n\n```java\nthrow new MarketNotFoundException(slug);\n```\n\n## Generics and Type Safety\n\n- Avoid raw types; declare generic parameters\n- Prefer bounded generics for reusable utilities\n\n```java\npublic \u003CT extends Identifiable> Map\u003CLong, T> indexById(Collection\u003CT> items) { ... }\n```\n\n## Project Structure (Maven\u002FGradle)\n\n```\nsrc\u002Fmain\u002Fjava\u002Fcom\u002Fexample\u002Fapp\u002F\n  config\u002F\n  controller\u002F\n  service\u002F\n  repository\u002F\n  domain\u002F\n  dto\u002F\n  util\u002F\nsrc\u002Fmain\u002Fresources\u002F\n  application.yml\nsrc\u002Ftest\u002Fjava\u002F... (mirrors main)\n```\n\n## Formatting and Style\n\n- Use 2 or 4 spaces consistently (project standard)\n- One public top-level type per file\n- Keep methods short and focused; extract helpers\n- Order members: constants, fields, constructors, public methods, protected, private\n\n## Code Smells to Avoid\n\n- Long parameter lists → use DTO\u002Fbuilders\n- Deep nesting → early returns\n- Magic numbers → named constants\n- Static mutable state → prefer dependency injection\n- Silent catch blocks → log and act or rethrow\n\n## Logging\n\n```java\nprivate static final Logger log = LoggerFactory.getLogger(MarketService.class);\nlog.info(\"fetch_market slug={}\", slug);\nlog.error(\"failed_fetch_market slug={}\", slug, ex);\n```\n\n## Null Handling\n\n- Accept `@Nullable` only when unavoidable; otherwise use `@NonNull`\n- Use Bean Validation (`@NotNull`, `@NotBlank`) on inputs\n\n## Testing Expectations\n\n- JUnit 5 + AssertJ for fluent assertions\n- Mockito for mocking; avoid partial mocks where possible\n- Favor deterministic tests; no hidden sleeps\n\n**Remember**: Keep code intentional, typed, and observable. Optimize for maintainability over micro-optimizations unless proven necessary.\n",{"name":5,"origin":23,"description":7},"ECC","for_merge","c125351f10302e3a2dacbe0c1f56ab02e49f8d63",".skills\u002Fjava-coding-standards","https:\u002F\u002Fgithub.com\u002Fluckyboy120794\u002FCowork_FAG3","https:\u002F\u002Fgithub.com\u002Fluckyboy120794","2026-07-21 16:59:00",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add luckyboy120794\u002FCowork_FAG3 --skill java-coding-standards",{"tool":36,"command":37},"bunx","bunx skills add luckyboy120794\u002FCowork_FAG3 --skill java-coding-standards",{"tool":39,"command":40},"pnpm","pnpm dlx skills add luckyboy120794\u002FCowork_FAG3 --skill java-coding-standards","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fluckyboy120794\u002FCowork_FAG3\u002Fblob\u002Ffor_merge\u002F.skills\u002Fjava-coding-standards\u002FSKILL.md",true,[],[45,52,59,66,73,80],{"skillNo":46,"name":47,"nameZh":6,"description":48,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":49,"categories":50,"keywords":51,"publishedAt":18},"01M79GN00AB2SSPMB8358HGYD8","writing-skills","Use when creating new skills, editing existing skills, or verifying skills work before deployment","https:\u002F\u002Fgithub.com\u002Fluckyboy120794\u002FCowork_FAG3\u002Fblob\u002Ffor_merge\u002F.skills\u002Fwriting-skills\u002FSKILL.md",[],[],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":18},"01M79GMXZ4CC9X207HDASJT023","writing-shape","Writing, exploit — shape raw material into an article, paragraph by paragraph.","https:\u002F\u002Fgithub.com\u002Fluckyboy120794\u002FCowork_FAG3\u002Fblob\u002Ffor_merge\u002F.skills\u002Fwriting-shape\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":18},"01M79GMVHHJDFA5ZVGRJYYV4FW","writing-plans","Use when you have a spec or requirements for a multi-step task, before touching code","https:\u002F\u002Fgithub.com\u002Fluckyboy120794\u002FCowork_FAG3\u002Fblob\u002Ffor_merge\u002F.skills\u002Fwriting-plans\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":18},"01M79GMSVVAMSY5R0Z2GJMG3AR","writing-great-skills","Reference for writing and editing skills well — the vocabulary and principles that make a skill predictable.","https:\u002F\u002Fgithub.com\u002Fluckyboy120794\u002FCowork_FAG3\u002Fblob\u002Ffor_merge\u002F.skills\u002Fwriting-great-skills\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":18},"01M79GMRDMD8G98ZWK11QW8J00","writing-fragments","Writing, explore — mine raw fragments, no structure yet.","https:\u002F\u002Fgithub.com\u002Fluckyboy120794\u002FCowork_FAG3\u002Fblob\u002Ffor_merge\u002F.skills\u002Fwriting-fragments\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":18},"01M79GMPDD3BE81JVKV2E3WRPY","writing-beats","Writing, exploit — assemble raw material into a journey of beats, grounding each term before a beat leans on it.","https:\u002F\u002Fgithub.com\u002Fluckyboy120794\u002FCowork_FAG3\u002Fblob\u002Ffor_merge\u002F.skills\u002Fwriting-beats\u002FSKILL.md",[],[]]