Skip to content

Add implementing-android-code skill and deduplicate CLAUDE.md#6534

Draft
SaintPatrck wants to merge 1 commit intomainfrom
claude/implementing-android-code
Draft

Add implementing-android-code skill and deduplicate CLAUDE.md#6534
SaintPatrck wants to merge 1 commit intomainfrom
claude/implementing-android-code

Conversation

@SaintPatrck
Copy link
Contributor

🎟️ Tracking

N/A — Internal Claude Code skill and configuration improvement.

📔 Objective

Add a new implementing-android-code Claude 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 injection
  • templates.md — Copy-pasteable code templates derived from actual codebase examples (LoginViewModel, LoginNavigation, LoginScreen, GeneratorRepositoryModule, AuthDiskModule, GeneratorViewModelTest)

CLAUDE.md changes:

  • Added Codebase Discovery section with search commands for finding ViewModels, navigation files, Hilt modules, repositories, and UI components
  • Added implementing-android-code skill reference in Development Guide
  • Deduplicated Anti-Patterns DO/DON'T items already covered by Key Principles
  • Removed duplicate DataState definition (Key Concepts vs Data Models)
  • Reduced docs/ARCHITECTURE.md references from 5 to 2
  • Consolidated References section (removed skills list that's auto-discoverable, compacted external links)

@github-actions github-actions bot added the t:llm Change Type - LLM related change (e.g. CLAUDE.md files) label Feb 13, 2026
@SaintPatrck SaintPatrck added the ai-review Request a Claude code review label Feb 13, 2026
@claude
Copy link
Contributor

claude bot commented Feb 13, 2026

Claude finished @SaintPatrck's task in 4m 27s —— View job


Pull Request Review Summary

PR: Add implementing-android-code skill with templates and deduplicate CLAUDE.md
Risk Level: Low (documentation and LLM configuration only, no production code)

Overview

This PR adds a well-structured implementing-android-code Claude Code skill with pattern documentation and copy-pasteable templates, along with cleanup of CLAUDE.md to reduce duplication. The previously flagged type mismatch between ReceiveDataResult and DataState<ExampleData> has been fixed by introducing a separate ReceiveDataState internal action -- the templates now correctly distinguish between continuous data streams (DataState) and discrete operation results (ExampleResult).

Findings

Severity File Description
IMPORTANT templates.md:97 args.initialData references a field not defined on ExampleArgs (which has itemId and isEditMode). Same class of issue as the previously fixed type mismatch -- cross-template inconsistency that causes a compile error when templates are used together.

Observations

  • The previous type mismatch finding has been properly addressed with the ReceiveDataState/ReceiveDataResult split.
  • The CLAUDE.md deduplication is clean: removed anti-pattern items that restated Key Principles, removed duplicate DataState definition, and consolidated references into a compact format.
  • The Codebase Discovery section with search commands is a practical addition.
  • The skill content is comprehensive and well-organized, covering all key Bitwarden patterns (SAE ViewModel, type-safe navigation, data layer, security, testing, Clock injection).
  • The templates.md file is missing a trailing newline (shown by \ No newline at end of file in the diff) -- a very minor nit.

1 issue found. The args.initialData reference should be updated to match the ExampleArgs definition before merge.

@codecov
Copy link

codecov bot commented Feb 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.31%. Comparing base (b20622e) to head (a3cd5c7).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment on lines 104 to 105
exampleRepository.dataFlow
.map { ExampleAction.Internal.ReceiveDataResult(it) }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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:

Suggested change
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.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 13, 2026

Logo
Checkmarx One – Scan Summary & Details97c33f0a-78e8-4fc6-b634-23d54ebcb58a

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>
@SaintPatrck SaintPatrck force-pushed the claude/implementing-android-code branch from 02ba491 to a3cd5c7 Compare February 13, 2026 18:35
?: run {
val args = savedStateHandle.toExampleArgs()
ExampleState(
data = args.initialData,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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).

Suggested change
data = args.initialData,
data = args.itemId,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review Request a Claude code review t:llm Change Type - LLM related change (e.g. CLAUDE.md files)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant