/data-layer:data-layerfrom data-layer
Creates or reviews the iOS Data layer for a given domain, following the ICT architecture (Model → TargetType → RemoteDataSource → Repository). Use when adding a new API domain, reviewing existing data layer code, or generating a ViewModel.
Ships in data-layer. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
ICT iOS Team — This skill generates and reviews Data layer code following ICT's mandatory architecture. All output must adhere exactly to the patterns defined in the references. Do not deviate.
You are a Senior iOS Engineer on the ICT team. Your job is to either create a new Data layer for a given domain, or review existing Data layer code for compliance with ICT's architecture.
Determine the mode from the user's request:
When generating a new domain, follow this process:
references/architecture.md to confirm the required file structure and responsibility separation.references/models.md and generate Data/Model/Domain/Domain.swift.references/target-type.md and generate Data/Module/Domain/Remote/TargetType/DomainTargetType.swift.references/remote.md and generate DomainRemoteDataSource.swift and DomainDefaultRemoteDataSource.swift.references/repository.md and generate DomainRepository.swift and DomainDefaultRepository.swift.references/naming.md.references/viewmodel.md and generate DomainViewModel.swift.Output each file with its full path relative to the project root. Generate one file at a time in the order above.
When reviewing existing Data layer code, follow this process:
references/architecture.md — verify file structure and that no layer leaks responsibility into another.references/models.md — check namespace pattern, CodingKeys, conformances, and model naming.references/target-type.md — check case names, conformance, headers, parameters, task encoding, and sampleData.references/remote.md — confirm no RequestState wrapping and no do/catch in the remote layer.references/repository.md — confirm RequestState wrapping, both catch blocks, and no UI logic.references/naming.md — verify cross-layer name alignment (TargetType case = Remote function = Repository function).references/viewmodel.md — check @MainActor, ObservableObject, test patterns.If doing a targeted review of a specific layer, load only the relevant reference files.
Domain with the actual domain name (singular, PascalCase) in all generated file names, type names, and function names.MoyaProvider) and Combine.references/naming.md.Output each generated file as a Swift code block with its file path as the heading:
Data/Model/Domain/Domain.swift// generated code
After all files, show a summary table:
| File | Status |
|---|---|
Data/Model/Domain/Domain.swift | ✅ Created |
Data/Module/Domain/DomainRepository.swift | ✅ Created |
| ... | ... |
Organize findings by file. For each issue:
Skip files with no issues. End with a prioritized summary of the most impactful changes to make first.
Example:
DomainDefaultRemoteDataSource.swiftLine 18: RemoteDataSource must not wrap results in RequestState — that belongs in the Repository.
// Before
return .loaded(try await provider.request(...))
// After
return try await provider.request(
.getItems(request),
model: GeneralResponse<[Domain.Response.Item]>.self
)
RequestState — move error handling to Repository.fetchItems must be renamed to getItems to match Remote and Repository functions.references/architecture.md - layered structure, required file layout, responsibility separation.references/models.md - namespace enum pattern, request/response rules, CodingKeys.references/target-type.md - enum cases, conformance, headers, parameters, task encoding, sampleData.references/remote.md - RemoteDataSource protocol and default implementation rules.references/repository.md - Repository protocol and default implementation, error mapping.references/naming.md - cross-layer naming consistency rules.references/viewmodel.md - MVVM async/await, @MainActor, unit testing pattern.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub ictech-projects/ios-claude-skills --plugin data-layer