You should provide your agent with an accurate environment including emulators, profilers, and access to backend services. The Android CLI helps interface with various Android tools, manage SDKs, and connect to crash reporting.
How do I manage context window limits effectively?
Keep your conversations around 150,000 tokens to get the full power of the model without context rot. You should also watch out for verbose logs like Gradle output by running them in quiet mode or letting harnesses truncate them.
Use structured workflows starting with a skill that grills you for requirements to eliminate ambiguity. This breaks down a project into smaller issues that fit neatly within the context window limit before you begin building and verifying.
What kind of information should I put in agent instruction files?
Keep instructions short and focused on things that always apply, such as architecture rules, module boundaries, and common code review mistakes. Avoid letting agents modify their own instruction files since it degrades performance and increases costs.
Use hooks to subscribe to agent events like session start, session stop, or file reading and writing. Instead of relying on prompt instructions to run linters or protect secret files, deterministic scripts executed via hooks reliably enforce these constraints.
When should I use skills versus always-on instructions?
Use skills to add context only when it is relevant, such as documentation for specific libraries, rather than loading everything at once. Be selective about installed skills to avoid bloating your prompt token count and creating security risks.
Should I use shell commands or MCP servers for development tools?
Local shell tools like Android CLI and Gradle are fast, composable, and effectively free to run while having full access to your environment. Reserve Model Context Protocol servers for external services that already host them, like GitHub, Figma, or Slack.
How do I ensure my agent completes tasks reliably?
Implement verification loops by defining up front what done looks like and providing failing tests or rendering checks. This allows the agent to iteratively loop until all criteria are met rather than just accepting a text response claiming completion.
How should I structure multi-tiered verification loops?
Tier your verification loops by running the fastest and least powerful tests first, such as JVM tests and Compose previews. Progress to slower, more powerful emulator and remote device tests only after the earlier tiers pass to harden your application efficiently.