Agent skill

Backend Module Structure

by iflytek in iflytek/skillhub

Rules for the SkillHub backend Maven multi-module clean architecture.

Apache-2.0Auto-check passedDevelopment

Install Backend Module Structure

skills CLI
$ npx skills add iflytek/skillhub --skill backend-module-structure -a claude-code

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

GitHub CLI
$ gh skill install iflytek/skillhub backend-module-structure --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/backend-module-structure .claude/skills/backend-module-structure && 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
backend-module-structure
GitHub stars
5.2k
Token cost
~1.2k tokens
SKILL.md length
383 words
Files
1
Skills in repo
29
Repo updated
First seen
Licence
Apache-2.0

At a glance

Rules for the SkillHub backend Maven multi-module clean architecture.

  • Works in 4 steps: If it's for state transition or domain… → If it's for page/list/detail response… → If it's a thin single-aggregate read →… → …
  • Tasks that involve Design patterns
  • SKILL.md covers Trigger and Rules
  • Calls make

What it does

Backend Module Structure is an agent skill from iflytek/skillhub. Rules for the SkillHub backend Maven multi-module clean architecture. Ensures agents place new code in the correct module and respect dependency direction.

Its SKILL.md is about 1.2k 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 Development, covering Design patterns. 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

  • Tasks that involve Design patterns

Example prompts

  • “Use the backend-module-structure skill to rule for the SkillHub backend Maven multi-module clean architecture”
  • “/backend-module-structure”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. If it's for state transition or domain rule → domain repository port
  2. If it's for page/list/detail response assembly with joins → app query repository
  3. If it's a thin single-aggregate read → direct domain repository call from app service
  4. If direct SQL/EntityManager is needed → add class-level comment explaining why

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

Backend Module Structure loads about 1.2k tokens when it runs. Until then it costs about 45 tokens; SKILL.md has 383 words of instructions outside code blocks.

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

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). 383 words, ~1,198 tokens.

Download SKILL.mdSave it as .claude/skills/backend-module-structure/SKILL.md (or your agent's skills folder).
name
backend-module-structure
description
Rules for the SkillHub backend Maven multi-module clean architecture. Ensures agents place new code in the correct module and respect dependency direction.
license
Apache-2.0

Backend Module Structure Skill

Trigger

Use this skill when:

  • Adding or modifying Java backend code
  • Creating new services, controllers, repositories, or entities
  • Refactoring backend code across files
  • Reviewing backend code placement

Rules

Dependency Direction

The design-doc dependency direction:

app → domain, auth, search, storage, infra, notification
infra → domain          # implements domain repository interfaces
auth → domain
search → domain
notification → domain
storage → (independent) # pure SPI

Design intent: skillhub-domain should be the innermost layer, defining entities, repository interfaces, and domain services without depending on infra, auth, search, or storage.

Code reality: skillhub-domain declares a Maven dependency on skillhub-storage (via pom.xml), and several domain services (SkillHardDeleteService, SkillDownloadService, SkillPublishService, SkillGovernanceService, SkillQueryService, SkillStorageDeletionCompensationService) import com.iflytek.skillhub.storage.ObjectStorageService. This is an existing deviation from the ideal clean architecture. New code should avoid adding further cross-module dependencies from domain.

Where to Place Code
Code TypeModuleJava Package
Entity / Value Objectskillhub-domaincom.iflytek.skillhub.domain.{submodule}/
Repository Interfaceskillhub-domaincom.iflytek.skillhub.domain.{submodule}/
Domain Serviceskillhub-domaincom.iflytek.skillhub.domain.{submodule}/service/
Domain Eventskillhub-domaincom.iflytek.skillhub.domain/event/
Domain Exceptionskillhub-domaincom.iflytek.skillhub.domain/shared/exception/
JPA Repository Implskillhub-infracom.iflytek.skillhub.infra.repository/
Controllerskillhub-appcom.iflytek.skillhub.controller/
App Serviceskillhub-appcom.iflytek.skillhub.service/
Query Repositoryskillhub-appcom.iflytek.skillhub.repository/
DTO / Responseskillhub-appcom.iflytek.skillhub.dto/
OAuth2 / Auth Configskillhub-authcom.iflytek.skillhub.auth/
Search SPI / Implskillhub-searchcom.iflytek.skillhub.search/
Storage SPI / Implskillhub-storagecom.iflytek.skillhub.storage/
Notification Serviceskillhub-notificationcom.iflytek.skillhub.notification/
Maven Modules

The parent POM (server/pom.xml) defines 7 modules with spring-boot-starter-parent:3.2.3:

skillhub-app | skillhub-domain | skillhub-auth | skillhub-search
skillhub-storage | skillhub-infra | skillhub-notification
Show full SKILL.md (199 more words)Show less
Repository vs Query Repository
  • Domain Repository (skillhub-domain): Aggregate reads, state transitions, rule evaluation. Returns domain objects. Defined as interfaces, implemented in skillhub-infra via Spring Data JPA.
  • Query Repository (com.iflytek.skillhub.repository): Read-model assembly, joins multiple sources, presentation projection. Returns DTOs. Implemented directly in skillhub-app.

Current query repositories:

  • GovernanceQueryRepository / JpaGovernanceQueryRepository
  • MySkillQueryRepository / JpaMySkillQueryRepository
  • ProfileReviewQueryRepository / JpaProfileReviewQueryRepository
  • AdminSkillReportQueryRepository / JpaAdminSkillReportQueryRepository

When a new read use case arrives:

  1. If it's for state transition or domain rule → domain repository port
  2. If it's for page/list/detail response assembly with joins → app query repository
  3. If it's a thin single-aggregate read → direct domain repository call from app service
  4. If direct SQL/EntityManager is needed → add class-level comment explaining why
Building Backend Tests

Never run ./mvnw -pl skillhub-app clean test directly under server/. Use:

bash
make test-backend-app   # skillhub-app + dependencies (includes -am)
make test-backend       # all backend modules

Running clean test on skillhub-app alone can fall back to stale artifacts from the local Maven repository, surfacing misleading cannot find symbol and signature-mismatch errors.

User Identity Type

User identity is always String throughout the codebase. This covers:

  • Authentication, API params, permissions, audit
  • Resource owner, creator, reviewer, actor, submittedBy
  • All user-associated fields

The UserAccount entity uses @Column(length = 128) for its ID. The platform needs to support external SSO/OIDC/SCIM identity sources whose UIDs are typically stable strings.

© 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/backend-module-structure of iflytek/skillhub.

Open the folder on GitHubat commit 7352597

Compare with similar skills

Backend Module Structure 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.

Backend Module Structure compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Backend Module Structure this skilliflytek/skillhub5.2k—~1.2kAutomated safety check: PassApache-2.0
Swiftui View RefactorDimillian/Skills4k5 repos~2kAutomated safety check: PassMIT
RTK Rust Design Patternsrtk-ai/rtk83k—~1.9kAutomated safety check: PassApache-2.0
Effect Client WrapperUsefulSoftwareCo/executor4.1k1 repos~1.4kAutomated safety check: PassMIT
Architecture PatternsKartikLabhshetwar/better-shot2.4k2 repos~1.4kAutomated safety check: PassCustom licence
GitVersion .NET DevelopmentGitTools/GitVersion3.1k—~1.7kAutomated safety check: PassMIT

Similar skills

  • Swiftui View Refactor

    Dimillian/Skills

    Refactor and review SwiftUI view files with strong defaults for small dedicated subviews, MV-over-MVVM data flow, stable view trees, explicit dependency injection, and correct Observation usage.

    4k GitHub starsUsed in 5 repos~2k tokens
    DevelopmentAuto-check passed
  • Describes seven Rust design patterns for the RTK CLI filter modules, with when to use each, RTK examples, and notes on when a pattern is overkill.

    83k GitHub stars~1.9k tokensUpdated today
    DevelopmentAuto-check passed
  • Effect Client Wrapper

    UsefulSoftwareCo/executor

    Pattern for wrapping third-party SDK clients (Stripe, Resend, AWS, etc.) with Effect.

    4.1k GitHub starsUsed in 1 repo~1.4k tokens
    DevelopmentAuto-check passed
  • Architecture Patterns

    KartikLabhshetwar/better-shot

    Deep dive into software architecture for macOS. An agent skill from KartikLabhshetwar/better-shot.

    2.4k GitHub starsUsed in 2 repos~1.4k tokens
    DevelopmentAuto-check passed
  • GitVersion .NET Development

    GitTools/GitVersion

    Gives repository-specific .NET guidance for GitVersion: build and test commands, central package management, project layout and coding conventions.

    3.1k GitHub stars~1.7k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Official

    Replaces a plain TypeScript union plus switch statements with frozen subclasses and a visitor interface when several places dispatch on the same variants.

    48k GitHub stars~830 tokensUpdated today
    DevelopmentAuto-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 6 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 6 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 6 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 6 days ago
    Auto-check passed

Categories

Questions about Backend Module Structure

What does Backend Module Structure do?

Rules for the SkillHub backend Maven multi-module clean architecture. Backend Module Structure is an agent skill from iflytek/skillhub. Rules for the SkillHub backend Maven multi-module clean architecture.

When should I use Backend Module Structure?

Backend Module Structure fits situations like: tasks that involve Design patterns.

How do I install Backend Module Structure in Claude Code?

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

How do I install Backend Module Structure in Codex?

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

Can I use Backend Module Structure 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 backend-module-structure -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/backend-module-structure, .gemini/skills/backend-module-structure, .github/skills/backend-module-structure and .opencode/skills/backend-module-structure in your project.

What does Backend Module Structure need to run?

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

Does Backend Module Structure 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 Backend Module Structure 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 Backend Module Structure use?

Backend Module Structure 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 Backend Module Structure use?

About 1.2k tokens (SKILL.md is roughly 4.8k 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 Backend Module Structure?

Skills that share tags, products or a category with Backend Module Structure: Swiftui View Refactor (Dimillian/Skills, 4k stars), RTK Rust Design Patterns (rtk-ai/rtk, 83k stars), Effect Client Wrapper (UsefulSoftwareCo/executor, 4.1k stars) and Architecture Patterns (KartikLabhshetwar/better-shot, 2.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Backend Module Structure?

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.