Clean arch patterns
Skill RadKod/claude-agents-kit/flutter/.claude/skills/clean-arch-patterns
Flutter Clean Architecture katman pattern'leri. Repository, datasource, entity, model. Yeni feature olusturma veya mimari soru icin kullan.From its SKILL.md
npx -y skills add RadKod/claude-agents-kit --skill clean-arch-patternsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.1 KB, 501 tokens by cl100k_base, as published. Nobody here has run it
Yeni Feature Olusturma Sirasi
lib/features/[name]/domain/entities/- Entity (freezed, saf Dart)lib/features/[name]/domain/repositories/- Abstract repositorylib/features/[name]/data/models/- Model (freezed + json_serializable)lib/features/[name]/data/datasources/- Remote/local datasourcelib/features/[name]/data/repositories/- Repository impllib/features/[name]/presentation/providers/- Riverpod providerlib/features/[name]/presentation/screens/- Ekranlib/features/[name]/presentation/widgets/- Widgetdart run build_runner build --delete-conflicting-outputs- Test yaz
Katman Kurallari
- Domain: SADECE Dart, Flutter import YASAK. Entity + abstract repo.
- Data: Model (DTO), datasource, repo implementasyonu. Dio, Hive vs burada.
- Presentation: Provider, screen, widget. Riverpod burada.
- Core: Paylasilan (network, storage, error, widget). Feature'lar arasi kopru.
Abstract Repository
abstract class UserRepository {
Future<User> getById(String id);
Future<List<User>> getAll();
Future<void> create(User user);
Future<void> update(User user);
Future<void> delete(String id);
}
Repository Implementation
class UserRepositoryImpl implements UserRepository {
final UserRemoteDataSource _remote;
final UserLocalDataSource _local;
UserRepositoryImpl(this._remote, this._local);
@override
Future<User> getById(String id) async {
try {
final model = await _remote.getUser(id);
await _local.cacheUser(model);
return model.toEntity();
} catch (e) {
final cached = await _local.getCachedUser(id);
if (cached != null) return cached.toEntity();
rethrow;
}
}
}
Model -> Entity Donusumu
extension UserModelX on UserModel {
User toEntity() => User(id: id, name: name, email: email);
}
extension UserX on User {
UserModel toModel() => UserModel(id: id, name: name, email: email);
}
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.