backend-module-structure

A set of rules for placing Java backend code in the correct Maven modules. Maven is a Java build tool, and modules divide a large application into parts with controlled dependencies.

In plain words
What is it for?
Use it when adding or moving backend services, controllers, repositories, database entities, or other Java code, and when reviewing where backend code belongs.
Why use it?
It prevents new code from creating unwanted links between layers and helps preserve the project's intended clean architecture.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/iflytek/skillhub/backend-module-structure
Any agent
npx skills add iflytek/skillhub --skill backend-module-structure
Clone the repo
git clone --depth 1 https://github.com/iflytek/skillhub

Made for: Claude Code, Codex.

Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,107 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00032 $0.01107
Opus 5 $0.00016 $0.00553
Sonnet 5 $0.00006 $0.00221
Haiku 4.5 $0.00003 $0.00111

Measured 2d ago against content hash 59fe19b2efec, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

backend-module-structure scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/backend-module-structure/SKILL.md · 109 lines

How it starts

The opening of the file, as written. The whole thing — 109 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 Type Module Java Package
Entity / Value Object skillhub-domain com.iflytek.skillhub.domain.{submodule}/
Repository Interface skillhub-domain com.iflytek.skillhub.domain.{submodule}/
Domain Service skillhub-domain com.iflytek.skillhub.domain.{submodule}/service/
Domain Event skillhub-domain com.iflytek.skillhub.domain/event/
Domain Exception skillhub-domain com.iflytek.skillhub.domain/shared/exception/
JPA Repository Impl skillhub-infra com.iflytek.skillhub.infra.repository/
Controller skillhub-app com.iflytek.skillhub.controller/
App Service skillhub-app com.iflytek.skillhub.service/
Query Repository skillhub-app com.iflytek.skillhub.repository/
DTO / Response skillhub-app com.iflytek.skillhub.dto/
OAuth2 / Auth Config skillhub-auth com.iflytek.skillhub.auth/
Search SPI / Impl skillhub-search com.iflytek.skillhub.search/
Storage SPI / Impl skillhub-storage com.iflytek.skillhub.storage/
Notification Service skillhub-notification com.iflytek.skillhub.notification/

Read the full file on GitHub · 109 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 109 lines · 32 tokens per session scan A 59fe19b2efec

Subscribe to this mod's changes

backend-module-structure is a skill published in the GitHub repository iflytek/skillhub (4,939 stars, last pushed today), licensed Apache-2.0. It adds 32 tokens to every session and 1,107 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

openspec-explore

Enter explore mode - a thinking partner for exploring ideas, investigating problems, and clarifying requirements. Use when the user wants to think through something before or during a change.

tbdavid2019/openclaw-docs-skill · 39 tokens

openclaw-docs

Find authoritative guidance for installing, configuring, operating, securing, and troubleshooting OpenClaw, including channels, model providers, Gateway operations, tools, plugins, automation, nodes, multi-agent routing, and CLI errors. Use for any question or maintenance task involving an OpenClaw installation…

tbdavid2019/openclaw-docs-skill · 80 tokens

openspec-apply-change

Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through tasks.

tbdavid2019/openclaw-docs-skill · 31 tokens

openspec-propose

Propose a new change with all artifacts generated in one step. Use when the user wants to quickly describe what they want to build and get a complete proposal with design, specs, and tasks ready for implementation.

tbdavid2019/openclaw-docs-skill · 47 tokens

openspec-archive-change

Archive a completed change in the experimental workflow. Use when the user wants to finalize and archive a change after implementation is complete.

tbdavid2019/openclaw-docs-skill · 31 tokens

iflytek-hyper-tts

Use when user asks to synthesize speech, convert text to audio, or read text aloud. 讯飞超拟人语音合成 - 支持文本转语音、语音合成(发音人/语速/语调/音量/输出格式)。大模型语音合成技能。语音合成, 文字转语音, 超拟人, TTS.

iflytek/iFly-Skills · 92 tokens