Skip to content

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

Merged
SaintPatrck merged 8 commits intomainfrom
claude/implementing-android-code
Feb 24, 2026
Merged

Add implementing-android-code skill and deduplicate CLAUDE.md#6534
SaintPatrck merged 8 commits intomainfrom
claude/implementing-android-code

Conversation

@SaintPatrck
Copy link
Copy Markdown
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
Copy Markdown
Contributor

claude bot commented Feb 13, 2026

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


Re-Review Summary (commit 4a4b2001)

  • Scoped review to changes since last review (0252cac..4a4b2001)
  • Verified paddingValues removal from BitwardenScaffold content lambda in templates.md
  • Confirmed fix matches actual BitwardenScaffold API (@Composable () -> Unit)
  • All 12 previously resolved threads remain correctly addressed
  • No new issues in changed code

Latest Commit Fix: Verified

Commit 4a4b2001 correctly addresses the remaining IMPORTANT finding from the previous review:

  • paddingValues removed from BitwardenScaffold content lambda in templates.md:365 -- matches the same fix already applied to SKILL.md in commit 0252cac. The BitwardenScaffold content lambda is typed as @Composable () -> Unit, so accepting paddingValues would cause a compile error.

No New Findings

The PR is in good shape. All previously identified template inconsistencies (type mismatches, missing actions, wrong imports, incorrect API signatures, hardcoded prefixes, and paddingValues) have been resolved across the commit history.

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.47%. Comparing base (c9f3afa) to head (4a4b200).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6534   +/-   ##
=======================================
  Coverage   86.47%   86.47%           
=======================================
  Files         786      786           
  Lines       56754    56754           
  Branches     8253     8253           
=======================================
  Hits        49077    49077           
  Misses       4817     4817           
  Partials     2860     2860           

☔ 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 thread .claude/skills/implementing-android-code/templates.md Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 13, 2026

Logo
Checkmarx One – Scan Summary & Details333c896a-cc6b-4738-affa-09659e94a714

Great job! No new security vulnerabilities introduced in this pull request

@SaintPatrck SaintPatrck force-pushed the claude/implementing-android-code branch from 02ba491 to a3cd5c7 Compare February 13, 2026 18:35
Comment thread .claude/skills/implementing-android-code/templates.md Outdated
Comment thread .claude/skills/implementing-android-code/templates.md
Comment thread .claude/skills/implementing-android-code/templates.md Outdated
@SaintPatrck SaintPatrck marked this pull request as ready for review February 17, 2026 15:37
@SaintPatrck SaintPatrck requested a review from a team as a code owner February 17, 2026 15:37
Comment thread .claude/skills/implementing-android-code/templates.md
Comment thread .claude/skills/implementing-android-code/templates.md Outdated
Comment thread .claude/skills/implementing-android-code/templates.md Outdated
@SaintPatrck SaintPatrck force-pushed the claude/implementing-android-code branch from 65b54f0 to acc9c0e Compare February 17, 2026 18:39
@SaintPatrck SaintPatrck requested review from a team and david-livefront February 17, 2026 18:47
theMickster
theMickster previously approved these changes Feb 18, 2026
Copy link
Copy Markdown
Contributor

@theMickster theMickster left a comment

Choose a reason for hiding this comment

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

Only a couple minor specific observations.

In general, I think it wise to keep considering opportunities to reduce duplication and overly wordy explanations. Between the new Skill and the Claude.md itself, there's a lot of information that feels like it could be simplified or even moved into child Claude.md files closer to code.

Claude Code Best Practices

If your CLAUDE.md is too long, Claude ignores half of it because important rules get lost in the noise.

Comment thread .claude/CLAUDE.md

Use the `reviewing-changes` skill for structured code review checklists covering MVVM/Compose patterns, security validation, and type-specific review guidance.

### Codebase Discovery
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

♻️ Reading the items in this section feels like a new skill that Claude should invoke when exploring the codebase.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

💡 I like that idea. I'll experiment and see what I can put together.

---
name: implementing-android-code
version: 0.1.0
description: This skill should be used when implementing Android code in Bitwarden. Covers critical patterns, gotchas, and anti-patterns unique to this codebase. Triggered by "How do I implement a ViewModel?", "Create a new screen", "Add navigation", "Write a repository", "BaseViewModel pattern", "State-Action-Event", "type-safe navigation", "@Serializable route", "SavedStateHandle persistence", "process death recovery", "handleAction", "sendAction", "Hilt module", "Repository pattern", "implementing a screen", "adding a data source", "handling navigation", "encrypted storage", "security patterns", "Clock injection", "DataState", or any questions about implementing features, screens, ViewModels, data sources, or navigation in the Bitwarden Android app.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 The skill description here is very long. I recommend that the team make note of times when Claude Code didn't invoke the skill when it should have and maybe consider trimming this down a tad.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

:10-4:

Comment thread .claude/skills/implementing-android-code/SKILL.md
Comment thread .claude/skills/implementing-android-code/SKILL.md Outdated
Comment thread .claude/skills/implementing-android-code/SKILL.md Outdated
Comment thread .claude/skills/implementing-android-code/SKILL.md Outdated
SaintPatrck and others added 6 commits February 23, 2026 11:56
…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>
Replace args.initialData with args.itemId to match ExampleArgs
definition in the Navigation template.

Co-Authored-By: Claude <noreply@anthropic.com>
…kill

- Add missing ErrorDialogDismiss action, handler, and when branch referenced
  by the Screen template but absent from the ViewModel template
- Correct hiltViewModel import to match codebase convention
  (androidx.hilt.lifecycle.viewmodel.compose)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
- Remove hardcoded storage prefixes from disk source key constants
  (BaseDiskSource/BaseEncryptedDiskSource auto-prepend via withBase())
- Fix getBoolean signature to match BaseDiskSource API (no defaultValue param)
- Remove @Inject from ExampleRepositoryImpl in SKILL.md (provided via Hilt modules)
- Remove @Inject from ExampleDiskSource and rename to ExampleDiskSourceImpl in SKILL.md

Co-Authored-By: Claude <noreply@anthropic.com>
Add README.md, CHANGELOG.md, and CONTRIBUTING.md for marketplace
preparation. Set version to 0.1.0 as initial pre-release.

Co-Authored-By: Claude <noreply@anthropic.com>
- Add missing handleDataReceived function to ViewModel pattern summary
- Remove paddingValues from BitwardenScaffold content lambda (handled internally)
- Use actual typographic quote characters in string resource examples
- Update DiskSource pattern to extend BaseEncryptedDiskSource with correct API

Co-Authored-By: Claude <noreply@anthropic.com>
Comment thread .claude/skills/implementing-android-code/templates.md Outdated
@SaintPatrck SaintPatrck added this pull request to the merge queue Feb 24, 2026
Merged via the queue into main with commit b10568a Feb 24, 2026
20 checks passed
@SaintPatrck SaintPatrck deleted the claude/implementing-android-code branch February 24, 2026 07:13
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.

3 participants