Librechat-Mobile / shared
CLAUDE.md149 starsChanged 7 days agoApache-2.0View on GitHub
KMP umbrella module that exports all core and feature modules as a single Shared.framework for iOS. On Android, this module is a dependency of :app but the framework export is iOS-only. shared/build.gradle.kts configures iOS targets (iosArm64, iosSimulatorArm64) and exports: - core:common, core:model, core:network, core:data — exported via api() so iOS sees all public types - core:ui + all feature:* modules — included via implementation() for Compose Multiplatform screen sharing The framework is static (isStatic = true) and named Shared. The…
In this repository13 other files it gives its agents.
- app/CLAUDE.mdCLAUDE.md
- build-logic/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- fastlane/CLAUDE.mdCLAUDE.md
- .github/CLAUDE.mdCLAUDE.md
- audit-depsSkill
- audit-i18nSkill
- audit-paritySkill
- marketing-refreshSkill
- release-highlightsSkill
- small-screensSkill
- sync-upstreamSkill
- update-web-assetsSkill
The file
We split this CLAUDE.md into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 38
No explicit SKIE configuration is needed unless disabling a specific feature.
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Shared Module
KMP umbrella module that exports all core and feature modules as a single Shared.framework for iOS. On Android, this module is a dependency of :app but the framework export is iOS-only.
Framework Export
shared/build.gradle.kts configures iOS targets (iosArm64, iosSimulatorArm64) and exports:
core:common,core:model,core:network,core:data— exported viaapi()so iOS sees all public typescore:ui+ allfeature:*modules — included viaimplementation()for Compose Multiplatform screen sharing
The framework is static (isStatic = true) and named Shared.
iOS Platform Files (src/iosMain/)
| File | Purpose |
IosKoinHelper.kt | startIosKoin() — called from Swift iOSApp.init(). Sets up Kermit logging via NSLog, installs crash reporting, starts Koin with iOS modules. |
IosSharedModule.kt | iOS Koin graph: includes(sharedKoinModules) (which brings in networkModule → Darwin engine + iOS SseHttpTransport via networkPlatformModule.ios, HTTP clients, all API services, SSE client) and adds only the one iOS-only binding, LibreChatSDK. |
IosKoinAccessor.kt | Swift-accessible Koin resolver. KoinHelper.swift calls these to get SDK, repos, etc. |
IosCrashReporting.kt | Unhandled exception hook — logs via Kermit + raises NSException for readable iOS crash logs. |
NsLog.kt | nsLogVerbatim(text) — the only way to call NSLog from Kotlin. Direct calls crash: Kotlin text in the format string has its % read as specifiers, and a Kotlin String vararg isn't converted to NSString. |
MainViewController.kt | MainViewController() — the Compose Multiplatform entry point wrapped by ComposeView.swift. |
Common Files (src/commonMain/)
LibreChatSDK.kt— Facade class aggregating all API services, token manager, and SSE clientdi/SharedKoinModules.kt—sharedKoinModules, the single Koin module list both platforms start from (Android loads it directly; iOSincludesit). Add a feature module here, not in the per-platform entry points. Verified against Android actuals by:appKoinGraphVerificationTestand against iOS actuals byiosTest/IosKoinGraphTest(:shared:iosSimulatorArm64Test).navigation/— Nav 3 route definitions and entry providers shared across platformsapp/— Shared app-level composables (root navigation host)
SKIE
The SKIE Gradle plugin is applied here. All features are enabled by default:
- Sealed classes → Swift exhaustive enums (
onEnum(of:)) Flow<T>→AsyncSequencesuspend fun→async throws
No explicit SKIE configuration is needed unless disabling a specific feature.
Adding Platform-Specific Code
- iOS implementations go in
src/iosMain/withactualdeclarations matchingexpectincommonMain - For feature-level platform code, prefer adding
iosMainsource sets in the feature module itself rather than here - This module should only contain app-level iOS wiring (DI bootstrap, framework entry point)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

