Imported from nekomangaorg/Neko (
.agents/AGENTS.md). Install upstream withnpx skills add nekomangaorg/Neko --skill .agents. Copyright stays with the author.
Custom Rules
- Do NOT auto commit anything: Never automatically run
git commit. Keep all modifications unstaged in the working tree so that the user can review them and commit them manually. - Always generate a commit message: At the end of every task involving code modifications, always output a draft commit message matching conventional commit standards, using
ref:instead ofrefactor:. The commit message header must not include a scope in parentheses (e.g., usestyle: descriptioninstead ofstyle(scope): description). - Always import classes when possible: Do not use fully qualified class names in type signatures or code references (e.g. use
viewModel: ReaderViewModelinstead ofviewModel: eu.kanade.tachiyomi.ui.reader.ReaderViewModelby adding the correspondingimportstatement at the top of the file). - Always use Neko
Sizetokens: In Jetpack Compose layouts, paddings, and dimension specifications, always useorg.nekomanga.presentation.theme.Sizetokens (e.g.Size.small,Size.medium,Size.large,Size.extraLarge) instead of arbitrary hardcoded.dpvalues whenever possible. - Always hoist Composable state: Keep composables stateless and decoupled by hoisting state up to caller screens/containers, accepting plain data models / UI state and emitting events via lambda callbacks (e.g.,
onClick,onValueChange). Avoid coupling child composables directly to ViewModels. - Always use
collectAsStateWithLifecycle(): When collectingStateFloworFlowstreams inside Jetpack Compose, always usecollectAsStateWithLifecycle()fromandroidx.lifecycle.composeto ensure safe, lifecycle-bounded coroutine execution. - Always use
TimberKtfor logging: Use Neko's structuredTimberKtlogging wrapper (TimberKt.d { ... },TimberKt.e(throwable) { ... }) rather thanandroid.util.Log,println, or rawTimber. - Never hardcode user-facing strings: Always define user-facing text in
strings.xmland reference them viastringResource(R.string.xyz)orcontext.getString(R.string.xyz). - Always prefer Material 3 theme colors: In Compose, prefer
MaterialTheme.colorSchemetokens (e.g.,surface,primary,background,onSurfaceVariant) over hardcoded color literals (Color(0xFF...)orandroid.graphics.Color). - Always enforce immutable UI state: UI state models should be immutable
data classes containing onlyvalproperties to ensure predictable Compose recomposition and prevent state mutation bugs. - Always format Kotlin code with
ktfmt: After making any Kotlin code modifications, format files with./gradlew ktfmtFormatto maintain repo code style.