Agent skill

Code Conventions

by iflytek in iflytek/skillhub

Code style, logging, and testing conventions for SkillHub backend (Java) and frontend (TypeScript).

Apache-2.0Auto-check passedFrontend & Design

Install Code Conventions

skills CLI
$ npx skills add iflytek/skillhub --skill code-conventions -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install iflytek/skillhub code-conventions --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/iflytek/skillhub.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/code-conventions .claude/skills/code-conventions && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
code-conventions
GitHub stars
5.2k
Token cost
~1.1k tokens
SKILL.md length
484 words
Files
1
Skills in repo
29
Repo updated
First seen
Licence
Apache-2.0

At a glance

Code style, logging, and testing conventions for SkillHub backend (Java) and frontend (TypeScript).

  • Frontend & Design work in your project
  • SKILL.md covers Java / Backend Conventions, TypeScript / Frontend…, Testing Philosophy and Common Pitfalls
  • Calls make

What it does

Code Conventions is an agent skill from iflytek/skillhub. Code style, logging, and testing conventions for SkillHub backend (Java) and frontend (TypeScript). Use when writing or reviewing code.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Frontend & Design. It works with TypeScript, Java and TanStack. The repository describes itself as: Self-hosted, open-source agent skill registry for enterprises. Publish & version skill packages, govern with RBAC and audit logs, deploy on-premise with Docker or Kubernetes. The licence is Apache-2.0.

When your agent uses it

  • Frontend & Design work in your project

Example prompts

  • “/code-conventions”

What it can do on your machine

Read from SKILL.md and the folder at commit 7352597. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • make

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Code Conventions loads about 1.1k tokens when it runs. Until then it costs about 38 tokens; SKILL.md has 484 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~38
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from iflytek/skillhub at commit 7352597, republished under its Apache-2.0 licence (© iflytek). 484 words, ~1,141 tokens.

Download SKILL.mdSave it as .claude/skills/code-conventions/SKILL.md (or your agent's skills folder).
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

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 LocalizedDomainException for user-facing error messages (supports i18n)
  • Use DomainBadRequestException for invalid client input
  • Use DomainNotFoundException for missing resources
  • Use DomainForbiddenException for 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 any types.
  • Use generated OpenAPI types from web/src/api/generated/schema.d.ts for all API interactions.
  • Additional types in web/src/types/
Data Fetching
  • Always use TanStack Query (@tanstack/react-query) for server state
  • Never use useEffect for data fetching
  • Use openapi-fetch client 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
Show full SKILL.md (202 more words)Show less
State Management
  • TanStack Query for server state (API data, caching, invalidation)
  • Zustand for local/UI state (theme, sidebar, modals, form state)
Feature-Sliced Design
LayerPathPurpose
Pagesweb/src/pages/Route-level page components
Featuresweb/src/features/Self-contained business features
Entitiesweb/src/entities/Domain entity display logic
Sharedweb/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 -am for dependent modules)
  • Never run ./mvnw -pl skillhub-app clean test directly — 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 -am flag 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

© iflytek, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/code-conventions of iflytek/skillhub.

Open the folder on GitHubat commit 7352597

Compare with similar skills

Code Conventions next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Code Conventions compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Code Conventions this skilliflytek/skillhub5.2k—~1.1kAutomated safety check: PassApache-2.0
Olore Tanstack Query 3olorehq/olore103—~700Automated safety check: PassMIT
React Devdavila7/claude-code-templates32k2 repos~2.6kAutomated safety check: PassMIT
React Frontend Development Guidelinesdiet103/claude-code-infrastructure-showcase10k2 repos~2.9kAutomated safety check: PassMIT
Dashboard Builder for holaOSholaboss-ai/holaOS11k—~6.3kAutomated safety check: PassCustom licence
Morphous CatalogAmeyanagi/morphos102—~2.1kAutomated safety check: PassApache-2.0

Similar skills

  • Local TanStack Query v3 (React Query) documentation reference.

    103 GitHub stars~700 tokensUpdated today
    Frontend & DesignAuto-check passed
  • React Dev

    davila7/claude-code-templates

    This skill should be used when building React components with TypeScript, typing hooks, handling events, or when React TypeScript, React 19, Server Components are mentioned.

    32k GitHub starsUsed in 2 repos~2.6k tokens
    Frontend & DesignAuto-check passed
  • React Frontend Development Guidelines

    diet103/claude-code-infrastructure-showcase

    Guidelines for React 18 and TypeScript apps covering Suspense data fetching, lazy loading, feature folders, MUI v7 styling, TanStack Router and performance.

    10k GitHub starsUsed in 2 repos~2.9k tokens
    Frontend & DesignAuto-check passed
  • Builds the visual layer of a holaOS dashboard app with TanStack Start and @holaboss/ui, starting from a bundled reference instead of a blank page.

    11k GitHub stars~6.3k tokensUpdated 1 mo ago
    Frontend & DesignAuto-check passed
  • Morphous Catalog

    Ameyanagi/morphos

    Create or refresh Morphous website design-system/theme bundles from animal, insect, plant, landscape, mineral, weather, or other nature motifs.

    102 GitHub stars~2.1k tokensUpdated 1 mo ago
    Frontend & DesignAuto-check passed
  • Shadmin Dev

    ahaodev/shadmin

    Apply Shadmin feature-development standards (backend Go/Gin/Ent + frontend React/TS).

    174 GitHub stars~2.7k tokensUpdated 5 days ago
    Frontend & DesignAuto-check passed

More from iflytek/skillhub

All 29 skills in this repo
  • Orca Run Replay

    iflytek/skillhub

    Answers questions about a past agent run from its recording, using causal graphs and replay, instead of reconstructing events from memory.

    5.2k GitHub starsUsed in 4 repos~3k tokens
    Auto-check passed
  • Zero Slop Prose Editor

    iflytek/skillhub

    Audits and rewrites formulaic, AI-sounding prose while keeping facts, voice and format, using a local Python scorer and inspect-only, rewrite or embedded-gate modes.

    5.2k GitHub stars~1.5k tokensUpdated 5 days ago
    Auto-check passed
  • Sandbase

    iflytek/skillhub

    Access 2,000+ AI models and API tools through one MCP interface for inference, media generation, search, scraping, embeddings, social data, and structured retrieval.

    5.2k GitHub starsUsed in 2 repos~2.1k tokens
    Auto-check passed
  • LinkedIn Post Formatter

    iflytek/skillhub

    Drafts a copy-paste-ready LinkedIn post from your facts and ideas, choosing the smallest structure that fits and keeping an accessible plain-text fallback for any styled text.

    5.2k GitHub stars~901 tokensUpdated 5 days ago
    Auto-check passed
  • SkillHub CLI

    iflytek/skillhub

    Connects an agent to a SkillHub registry and uses the official SkillHub CLI to search, install, list and explicitly upgrade skills from that registry.

    5.2k GitHub stars~2.3k tokensUpdated 5 days ago
    Auto-check passed
  • AI Claim Checker

    iflytek/skillhub

    Breaks AI-generated text into checkable claims, verifies them against independent sources and labels each one, with an optional exercise for learners.

    5.2k GitHub stars~1.2k tokensUpdated 5 days ago
    Auto-check passed

Questions about Code Conventions

What does Code Conventions do?

Code style, logging, and testing conventions for SkillHub backend (Java) and frontend (TypeScript). Code Conventions is an agent skill from iflytek/skillhub. Code style, logging, and testing conventions for SkillHub backend (Java) and frontend (TypeScript).

When should I use Code Conventions?

Code Conventions fits situations like: frontend & Design work in your project.

How do I install Code Conventions in Claude Code?

Run `npx skills add iflytek/skillhub --skill code-conventions -a claude-code`. Or copy the skill folder (.agents/skills/code-conventions in iflytek/skillhub) into .claude/skills/code-conventions in your project. Claude Code loads it when a task matches its description.

How do I install Code Conventions in Codex?

Run `npx skills add iflytek/skillhub --skill code-conventions -a codex`. Or copy the skill folder (.agents/skills/code-conventions in iflytek/skillhub) into .agents/skills/code-conventions in your project. Codex loads it when a task matches its description.

Can I use Code Conventions in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add iflytek/skillhub --skill code-conventions -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/code-conventions, .gemini/skills/code-conventions, .github/skills/code-conventions and .opencode/skills/code-conventions in your project.

What does Code Conventions need to run?

Going by SKILL.md and its folder, Code Conventions needs the command-line tools its instructions call (make).

Does Code Conventions access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Code Conventions safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Code Conventions use?

Code Conventions is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Code Conventions use?

About 1.1k tokens (SKILL.md is roughly 4.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Code Conventions?

Skills that share tags, products or a category with Code Conventions: Olore Tanstack Query 3 (olorehq/olore, 103 stars), React Dev (davila7/claude-code-templates, 32k stars), React Frontend Development Guidelines (diet103/claude-code-infrastructure-showcase, 10k stars) and Dashboard Builder for holaOS (holaboss-ai/holaOS, 11k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Code Conventions?

iflytek (a GitHub organization) maintains it in iflytek/skillhub, which has 5,152 GitHub stars. The repository holds 29 skills in this directory. The repository was last updated on October 1, 2026.

Source: iflytek/skillhub on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.