一键导入
code-conventions
// Code style, logging, and testing conventions for SkillHub backend (Java) and frontend (TypeScript). Use when writing or reviewing code.
// Code style, logging, and testing conventions for SkillHub backend (Java) and frontend (TypeScript). Use when writing or reviewing code.
API design conventions, namespace coordinate system, RBAC roles, ClawHub compatibility layer, OpenAPI contract sync rules, and CSRF/session handling.
Rules for the SkillHub backend Maven multi-module clean architecture. Ensures agents place new code in the correct module and respect dependency direction.
The complete development workflow for SkillHub contributors including local dev, staging validation, testing, and PR creation. Ensures agents follow the correct sequence of steps.
Coding conventions, architecture patterns, and testing rules for the SkillHub React frontend. Ensures agents follow Feature-Sliced Design and use the generated OpenAPI types.
PR title format, commit conventions, and pre-PR checklist for SkillHub. Use when preparing or reviewing pull requests.
The authoritative skill lifecycle state model including container states, version states, review workflow states, visibility overlay, and governance actions. Ensures agents don't introduce invalid states or transitions.
| name | code-conventions |
| description | Code style, logging, and testing conventions for SkillHub backend (Java) and frontend (TypeScript). Use when writing or reviewing code. |
| license | Apache-2.0 |
User identity is always String throughout the codebase. This covers:
Never introduce int, long, or bigint as user identifiers. The platform needs to support
external SSO/OIDC/SCIM identity sources whose UIDs are typically stable strings.
LocalizedDomainException for user-facing error messages (supports i18n)DomainBadRequestException for invalid client inputDomainNotFoundException for missing resourcesDomainForbiddenException for authorization failuresskillhub-domain/shared/exception/domain/{submodule}/service/com.iflytek.skillhub.controller/com.iflytek.skillhub.repository/*QueryRepository (e.g., GovernanceQueryRepository, MySkillQueryRepository)com.iflytek.skillhub.service/any types.web/src/api/generated/schema.d.ts for all API interactions.web/src/types/@tanstack/react-query) for server stateuseEffect for data fetchingopenapi-fetch client for type-safe API calls@radix-ui/react-dropdown-menu, @radix-ui/react-selectcn() utility: web/src/shared/lib/utils.ts| Layer | Path | Purpose |
|---|---|---|
| Pages | web/src/pages/ | Route-level page components |
| Features | web/src/features/ | Self-contained business features |
| Entities | web/src/entities/ | Domain entity display logic |
| Shared | web/src/shared/ | Reusable UI components, hooks, utilities |
Place code at the lowest appropriate layer. Do not put page-level logic in shared.
cn() for conditional class mergingweb/src/i18n/@WebMvcTest, @DataJpaTest)make test-backend-app (includes -am for dependent modules)./mvnw -pl skillhub-app clean test directly — stale Maven cache causes misleading errors-am flag or Makefile targets to include dependent modules