Skip to content
Back to skills

Android Resource Stewardship Skill

ASecurity

Guidance for lean resource management in Android. Focuses on Hilt DI scope hygiene, memory leak prevention, and avoiding "God Object" bloat.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 13, 2026
ai-agentsgodatabase

Security analysis

A100/100

Scanned November 13, 2026

npx -y skills add Andrer757/Kickoff-V2 --skill android-resource-stewardship-skill --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Android Resource Stewardship Skill?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Android Resource Stewardship Skill
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/andrer757-android-resource-stewardship-skill/badge)](https://www.skillsdirectory.com/skills/andrer757-android-resource-stewardship-skill)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: android-resource-stewardship-skill
description: >
  Guidance for lean resource management in Android. Focuses on Hilt DI scope hygiene,
  memory leak prevention, and avoiding "God Object" bloat.
---

# Android Resource Stewardship

This skill ensures that the application remains lean, performant, and memory-efficient as it scales.

## 1. DI Scope Hygiene (Hilt)

The most common architectural debt in large projects is the overuse of @Singleton.

| Scope | Recommendation | Use Case |
|-------|----------------|----------|
| **@Singleton** | **AVOID** | Only for truly global state (e.g., Token Storage, Database). |
| **@ViewModelScoped** | **PREFER** | For data that only needs to live as long as a screen or flow. |
| **@ActivityScoped** | **SELECTIVE** | For UI-related logic shared across fragments in one activity. |
| **Unscoped** | **DEFAULT** | Most UseCases and Mappers should be unscoped (re-created per injection). |

### The "God Object" Veto
Any class injected into more than 15 other classes must be reviewed for "God Object" status. Suggest breaking it down into smaller, focused UseCases or Repositories.

## 2. Memory Management

- **Object Retention:** Ensure that long-lived objects (@Singleton) do not hold references to short-lived objects (Activities, Fragments, Views).
- **Large Data Sets:** Avoid keeping large lists or bitmaps in memory. Use paging or LRU caches with defined bounds.
- **Context Leaks:** Never pass a Context (especially an Activity Context) into a Repository or UseCase. If needed, inject the ApplicationContext.

## 3. Resource Checklist for Architects

- [ ] Is this new component @Singleton? If yes, why can't it be @ViewModelScoped or unscoped?
- [ ] Does this component hold a reference to a Context?
- [ ] Will this component's memory footprint grow over time (e.g., unbounded list)?
- [ ] Can this logic be moved from a long-lived Service to a short-lived Worker (WorkManager)?

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.