code-conventions
Skill5.1k starsChanged 3 months agoApache-2.0View on GitHub
Code style, logging, and testing conventions for SkillHub backend (Java) and frontend (TypeScript). Use when writing or reviewing code.
5 other projects use a version of this.
Trending
Less talk lately.about the whole repository
Most recently taken up by
- 0xkangl/skillstheir own version, first seen Sep 10, 2026
- fthsrbst/mnematheir own version, first seen Aug 22, 2026
- arch3rPro/dsh-skillstheir own version, first seen Aug 18, 2026
- kennguyen887/agent-foundationtheir own version, first seen Jun 22, 2026
- joabgonzalez/ai-agents-skillstheir own version, first seen Jun 8, 2026
Who's talking about iflytek/skillhub
- ruanyf/weekly“【开源自荐】SkillHub —— 企业内部的技能注册中心”GitHub · Mar 19, 2026 · 2 reactions
- iflytek/astron-rpa“chore: add GitHub-reward form, scripts & actions”GitHub · Apr 7, 2026 · 1 reactions
- iflytek/astron-agent“chore: add GitHub-reward form, scripts & actions”GitHub · Apr 7, 2026 · 1 reactions
- @nigolv.bsky.social“AIアシスタントのスキル管理、難しいですよね。 Kubernetesとアラート履歴を使って、 スムーズに運用できるツールが登場しました。 詳しくはGitHubでチェックしてみてください。 github.com …”Bluesky · Mar 28, 2026 · 1 likes
- Open-reSource/openresource.dev“ci: update showcase”GitHub · Oct 5, 2026
The biggest 5 of 49 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 49
Talked about on GitHub and Bluesky (49 times).
On GitHub · 48
- Mar 19, 2026【开源自荐】SkillHub —— 企业内部的技能注册中心 — ruanyf/weekly2 reactions · 2 comments
- Apr 7, 2026chore: add GitHub-reward form, scripts & actions — iflytek/astron-rpa1 reaction · 1 comment
- Apr 7, 2026chore: add GitHub-reward form, scripts & actions — iflytek/astron-agent1 reaction · 1 comment
- Oct 5, 2026ci: update showcase — Open-reSource/openresource.dev0 reactions · 1 comment
- Oct 2, 2026Add zjncs to developers list — rv2036/inchi-rvlab-access0 reactions
43 more on GitHub
- Oct 2, 2026Add zjncs to developers list — plctlab/riscv-lab-access0 reactions
- Sep 28, 2026ci: update showcase — Open-reSource/openresource.dev0 reactions · 1 comment
- Sep 28, 2026agent-skills.github.iflytek.skillhub: init at 0.2.21 — sudosubin/agents.nix0 reactions
- Sep 28, 2026ci: update showcase — Open-reSource/openresource.dev0 reactions · 1 comment
- Sep 21, 2026ci: update showcase — Open-reSource/openresource.dev0 reactions · 1 comment
- Sep 14, 2026ci: update showcase — Open-reSource/openresource.dev0 reactions · 1 comment
- Sep 7, 2026ci: update showcase — Open-reSource/openresource.dev0 reactions · 1 comment
- Aug 31, 2026ci: update showcase — Open-reSource/openresource.dev0 reactions · 1 comment
- Aug 29, 2026[FEATURE] 资源管理支持从标准 Agent Skills / Agent Plugins 仓库批量导入 — iflytek/astron-agent0 reactions · 3 comments
- Aug 29, 2026docs: add SkillHub/Astron governed publishing guide — K-Dense-AI/scientific-agent-skills0 reactions · 2 comments
- Aug 24, 2026ci: update showcase — Open-reSource/openresource.dev0 reactions · 1 comment
- Aug 24, 2026ci: update showcase — Open-reSource/openresource.dev0 reactions · 1 comment
- Aug 24, 2026ci: update showcase — Open-reSource/openresource.dev0 reactions · 1 comment
- Aug 3, 2026ci: update showcase — Open-reSource/openresource.dev0 reactions · 1 comment
- Jul 27, 2026ci: update showcase — Open-reSource/openresource.dev0 reactions · 1 comment
- Jul 27, 2026ci: update showcase — Open-reSource/openresource.dev0 reactions · 1 comment
- Jul 27, 2026ci: update showcase — Open-reSource/openresource.dev0 reactions · 1 comment
- Jul 20, 2026ci: update showcase — Open-reSource/openresource.dev0 reactions · 1 comment
- Jul 13, 2026ci: update showcase — Open-reSource/openresource.dev0 reactions · 1 comment
- Jul 6, 2026ci: update showcase — Open-reSource/openresource.dev0 reactions · 1 comment
- Jun 29, 2026ci: update showcase — Open-reSource/openresource.dev0 reactions · 1 comment
- Jun 22, 2026ci: update showcase — Open-reSource/openresource.dev0 reactions · 1 comment
- Jun 15, 2026ci: update showcase — Open-reSource/openresource.dev0 reactions · 1 comment
- Jun 8, 2026ci: update showcase — Open-reSource/openresource.dev0 reactions · 1 comment
- Jun 1, 2026ci: update showcase — Open-reSource/openresource.dev0 reactions · 1 comment
- May 11, 2026ci: update showcase — Open-reSource/openresource.dev0 reactions · 1 comment
- May 8, 2026【Feature】可以支持skillhub吗? — AFunc-OPC/Skiller0 reactions · 1 comment
- May 4, 2026ci: update showcase — Open-reSource/openresource.dev0 reactions · 1 comment
- Apr 30, 2026Updated single-repositories/github/iflytek/skillhub.yml — oss-compass/compass-projects-information0 reactions · 3 comments
- Apr 30, 2026ci: update showcase — Open-reSource/openresource.dev0 reactions · 1 comment
- Apr 27, 2026ci: update showcase — Open-reSource/openresource.dev0 reactions · 1 comment
- Apr 22, 2026[SUBMISSION] skillhub — ProSkillsMD/proskills0 reactions
- Apr 20, 2026ci: update showcase — Open-reSource/openresource.dev0 reactions · 1 comment
- Apr 17, 2026[SUBMISSION] skillhub — ProSkillsMD/proskills0 reactions
- Apr 17, 2026新增支持LDAP登录https://github.com/iflytek/skillhub/issues/260 — h4ai/qa-qe-skillhub0 reactions
- Apr 13, 2026ci: update showcase — Open-reSource/openresource.dev0 reactions · 1 comment
- Apr 12, 2026[SUBMISSION] skillhub — ProSkillsMD/proskills0 reactions
- Apr 7, 2026[SUBMISSION] skillhub — ProSkillsMD/proskills0 reactions
- Apr 6, 2026ci: update showcase — Open-reSource/openresource.dev0 reactions · 1 comment
- Mar 30, 2026ci: update showcase — Open-reSource/openresource.dev0 reactions · 1 comment
- Mar 30, 2026[SUBMISSION] skillhub — ProSkillsMD/proskills0 reactions · 2 comments
- Mar 23, 2026[SUBMISSION] skillhub — ProSkillsMD/proskills0 reactions · 4 comments
- Mar 19, 2026[SUBMISSION] skillhub — ProSkillsMD/proskills0 reactions · 2 comments
On Bluesky · 1
- Mar 28, 2026AIアシスタントのスキル管理、難しいですよね。 Kubernetesとアラート履歴を使って、 スムーズに運用できるツールが登場しました。 詳しくはGitHubでチェックしてみてください。 github.com opensourceprojects.dev #news — @nigolv.bsky.social1 likes and repost
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- joabgonzalez/ai-agents-skills★ 9same name
- arch3rPro/dsh-skills★ 5same name
- fthsrbst/mnema★ 2same name
- 0xkangl/skills★ 1same name
- kennguyen887/agent-foundation★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- api-and-namespace-designSkill
- backend-module-structureSkill
- dev-workflowSkill
- frontend-conventionsSkill
- pr-submissionSkill
- skill-lifecycleSkill
- testing-and-ciSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
25 rules. 0 are common, 13 are distinctive, and 12 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
13
Distinctive
This author's own choices. Worth a look.
12
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 20
Never introduce int, long, or bigint as user identifiers.
- Very specific: line 25
Use LocalizedDomainException for user-facing error messages (supports i18n)
- Very specific: line 26
Use DomainBadRequestException for invalid client input
- Very specific: line 27
Use DomainNotFoundException for missing resources
- Very specific: line 28
Use DomainForbiddenException for authorization failures
- Distinctive: line 35
Use domain events for cross-cutting side effects (publishing, notifications)
- Distinctive: line 41
No business logic in controllers
- Distinctive: line 54
Should express "what this endpoint does", not "how it assembles DTOs"
- Distinctive: line 59
Use SLF4J with structured logging
- Distinctive: line 60
Use MDC for request tracing
- Very specific: line 68
Use generated OpenAPI types from web/src/api/generated/schema.d.ts for all API interactions.
- Very specific: line 75
Use openapi-fetch client for type-safe API calls
- Distinctive: line 99
Place code at the lowest appropriate layer.
- Distinctive: line 104
Follow existing component patterns
- Very specific: line 105
Use cn() for conditional class merging
- Distinctive: line 109
Use i18next + react-i18next
- Distinctive: line 110
All user-facing text must be translatable
- Very specific: line 118
Use Spring Boot test slices where possible (@WebMvcTest, @DataJpaTest)
- Distinctive: line 119
Test behaviors, not implementations
- Very specific: line 120
Use make test-backend-app (includes -am for dependent modules)
- Very specific: line 121
Never run ./mvnw -pl skillhub-app clean test directly — stale Maven cache causes misleading errors
- Distinctive: line 127
Test component behavior and user interactions
- Very specific: line 131
Maven multi-module: Always use -am flag or Makefile targets to include dependent modules
- Distinctive: line 132
OpenAPI types: Must regenerate and commit after API contract changes
- Distinctive: line 133
String identity: Never use numeric types for user identifiers
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Code Conventions Skill
Java / Backend Conventions
User Identity Type
User identity is always String throughout the codebase. This covers:
- Authentication and authorization
- API parameters and responses
- Permission checks
- Audit logs
- Resource owner, creator, reviewer, actor, submittedBy fields
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.
Exception Handling
- Use
LocalizedDomainExceptionfor user-facing error messages (supports i18n) - Use
DomainBadRequestExceptionfor invalid client input - Use
DomainNotFoundExceptionfor missing resources - Use
DomainForbiddenExceptionfor authorization failures - Exception classes live in
skillhub-domain/shared/exception/
Domain Services
- Return domain objects, not DTOs
- Contain business rules and state transitions
- Use domain events for cross-cutting side effects (publishing, notifications)
- Located in
domain/{submodule}/service/
Controllers
- Transport only: extract auth context, bind request params, wrap responses
- No business logic in controllers
- Located in
com.iflytek.skillhub.controller/
Query Repositories
- Handle read-model joins and presentation projection
- Return DTOs or presentation models
- Located in
com.iflytek.skillhub.repository/ - Named like
*QueryRepository(e.g.,GovernanceQueryRepository,MySkillQueryRepository)
App Services
- Workflow orchestration: coordinate domain services and query repositories
- Should express "what this endpoint does", not "how it assembles DTOs"
- Located in
com.iflytek.skillhub.service/
Logging
- Use SLF4J with structured logging
- Use MDC for request tracing
- Log at appropriate levels: INFO for business events, DEBUG for troubleshooting, ERROR for failures
TypeScript / Frontend Conventions
Type Safety
- Strict TypeScript mode. No
anytypes. - Use generated OpenAPI types from
web/src/api/generated/schema.d.tsfor all API interactions. - Additional types in
web/src/types/
Data Fetching
- Always use TanStack Query (
@tanstack/react-query) for server state - Never use
useEffectfor data fetching - Use
openapi-fetchclient for type-safe API calls
Component Composition
- Radix UI primitives:
@radix-ui/react-dropdown-menu,@radix-ui/react-select - class-variance-authority (cva) for component variants
- clsx + tailwind-merge for class merging
cn()utility:web/src/shared/lib/utils.ts- shadcn/ui is NOT used as a library
State Management
- TanStack Query for server state (API data, caching, invalidation)
- Zustand for local/UI state (theme, sidebar, modals, form state)
Feature-Sliced Design
| 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.
Styling
- Tailwind CSS for all styling
- Follow existing component patterns
- Use
cn()for conditional class merging
Internationalization
- Use i18next + react-i18next
- All user-facing text must be translatable
- Translation keys in
web/src/i18n/
Testing Philosophy
Backend
- JUnit 5 + Mockito + AssertJ
- Use Spring Boot test slices where possible (
@WebMvcTest,@DataJpaTest) - Test behaviors, not implementations
- Use
make test-backend-app(includes-amfor dependent modules) - Never run
./mvnw -pl skillhub-app clean testdirectly — stale Maven cache causes misleading errors
Frontend
- Vitest for unit tests
- Playwright for E2E tests
- Test component behavior and user interactions
Common Pitfalls
- Maven multi-module: Always use
-amflag or Makefile targets to include dependent modules - OpenAPI types: Must regenerate and commit after API contract changes
- String identity: Never use numeric types for user identifiers
- Controller business logic: Move to domain service or app service
- Complex read-models in app service: Extract to query repository
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

