Add implementing-android-code skill and deduplicate CLAUDE.md#6534
Add implementing-android-code skill and deduplicate CLAUDE.md#6534SaintPatrck wants to merge 1 commit intomainfrom
Conversation
|
Claude finished @SaintPatrck's task in 4m 27s —— View job Pull Request Review SummaryPR: Add implementing-android-code skill with templates and deduplicate CLAUDE.md OverviewThis PR adds a well-structured Findings
Observations
1 issue found. The |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6534 +/- ##
=======================================
Coverage 86.31% 86.31%
=======================================
Files 790 790
Lines 56525 56525
Branches 8175 8175
=======================================
Hits 48791 48791
Misses 4887 4887
Partials 2847 2847 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| exampleRepository.dataFlow | ||
| .map { ExampleAction.Internal.ReceiveDataResult(it) } |
There was a problem hiding this comment.
[IMPORTANT] -- Type mismatch in copy-paste template causes compile error
exampleRepository.dataFlow is typed as StateFlow<DataState<ExampleData>> (defined on line 347 of this file), so each emission (it) is DataState<ExampleData>. However, ReceiveDataResult is defined to accept ExampleResult (line 68-69), not DataState<ExampleData>. This .map call would fail to compile.
Since this template is explicitly described as "copy-pasteable," a compile error in the template would confuse developers and the LLM.
Consider either introducing a separate Internal action for the continuous data stream:
sealed class Internal : ExampleAction() {
data class ReceiveDataState(
val dataState: DataState<ExampleData>,
) : Internal()
data class ReceiveDataResult(
val result: ExampleResult,
) : Internal()
}and updating this init block accordingly:
| exampleRepository.dataFlow | |
| .map { ExampleAction.Internal.ReceiveDataResult(it) } | |
| exampleRepository.dataFlow | |
| .map { ExampleAction.Internal.ReceiveDataState(it) } |
Or alternatively, change ReceiveDataResult.result to accept DataState<ExampleData> if both patterns should share the same action.
|
Great job! No new security vulnerabilities introduced in this pull request |
…AUDE.md Create new skill covering ViewModel SAE pattern, type-safe navigation, data layer patterns, security, and testing with copy-pasteable templates. Codebase discovery commands moved to CLAUDE.md. Deduplicate anti-patterns that restated key principles, consolidate doc references, and compact the references section. Co-Authored-By: Claude <noreply@anthropic.com>
02ba491 to
a3cd5c7
Compare
| ?: run { | ||
| val args = savedStateHandle.toExampleArgs() | ||
| ExampleState( | ||
| data = args.initialData, |
There was a problem hiding this comment.
[IMPORTANT] -- args.initialData references a field not defined on ExampleArgs
The ViewModel template's initialState block calls savedStateHandle.toExampleArgs() (line 95), which returns ExampleArgs as defined in the Navigation template (lines 240-243). However, ExampleArgs only has itemId and isEditMode -- there is no initialData field:
data class ExampleArgs(
val itemId: String,
val isEditMode: Boolean,
)This is the same class of issue as the previously fixed type mismatch: a cross-template inconsistency that causes a compile error when the templates are used together. The real LoginViewModel this is based on uses args.emailAddress (which exists on LoginArgs).
| data = args.initialData, | |
| data = args.itemId, |

🎟️ Tracking
N/A — Internal Claude Code skill and configuration improvement.
📔 Objective
Add a new
implementing-android-codeClaude Code skill with supporting templates, and clean up duplication in.claude/CLAUDE.md.New skill (
.claude/skills/implementing-android-code/):SKILL.md— Quick reference for Bitwarden-specific patterns: ViewModel SAE, type-safe navigation, Screen/Compose, data layer, security (encrypted storage, input validation), testing, and Clock injectiontemplates.md— Copy-pasteable code templates derived from actual codebase examples (LoginViewModel, LoginNavigation, LoginScreen, GeneratorRepositoryModule, AuthDiskModule, GeneratorViewModelTest)CLAUDE.md changes:
implementing-android-codeskill reference in Development Guidedocs/ARCHITECTURE.mdreferences from 5 to 2