networking_skill
- Python
1
GitHub Stars
6
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill pluginagentmarketplace/custom-plugin-android --skill networking- agent-definition.yaml4.7 KB
- FINAL_REPORT.md10.0 KB
- networking-apis.json8.9 KB
- networking-apis.md28.2 KB
- SKILL.md2.2 KB
- SUMMARY.md10.4 KB
Overview
This skill helps Android developers implement robust networking using Retrofit and OkHttp, including JSON serialization and network security patterns. It focuses on type-safe API interfaces, efficient HTTP client configuration, and secure transport practices to reduce runtime errors and vulnerabilities. Use it to standardize API calls, error handling, and performance tuning in mobile apps.
How this skill works
The skill inspects common networking tasks: defining Retrofit service interfaces, configuring OkHttp clients, and setting up JSON converters (Gson, Moshi). It highlights interceptors, timeouts, certificate pinning, and secure token management to enforce HTTPS and validate certificates. Error handling patterns and result wrappers are provided to surface success and failure states cleanly to callers.
When to use it
- Building or refactoring Android REST API clients with Retrofit
- Configuring OkHttp for logging, timeouts, and certificate pinning
- Adding JSON serialization and mapping between DTOs and domain models
- Implementing centralized error handling and retry policies
- Hardening app networking with HTTPS and secure token storage
Best practices
- Always use HTTPS and validate certificates; prefer certificate pinning for high-risk apps
- Centralize API definitions with Retrofit interfaces and use suspend functions for coroutines
- Use a JSON converter (Gson/Moshi) and map DTOs to domain models to isolate parsing logic
- Add OkHttp interceptors for logging, authentication headers, and performance metrics
- Return a sealed Result type or wrapper to unify success and error flow across layers
- Cache responses and compress payloads to reduce bandwidth and improve perceived performance
Example use cases
- Define a UserApi Retrofit interface and implement get/create endpoints with suspend functions
- Configure OkHttp with logging, 30s timeouts, and a certificate pinner for production builds
- Wrap network calls in a Result sealed class and handle exceptions at the repository layer
- Switch JSON converters or add custom adapters to handle dates and polymorphic types
- Implement token refresh with an OkHttp authenticator and retry failed requests automatically
FAQ
Choose Moshi for modern features and smaller footprints; use Gson if you rely on legacy behavior or existing code. Both integrate with Retrofit via converter factories.
When should I enable SSL pinning?
Enable pinning for high-security apps (finance, health) to reduce MITM risk, but plan for certificate rotation and fallback to avoid locking out users.