# Integrate Mobile Api

> Integrate external REST/GraphQL APIs into Flutter apps with production-safe networking, auth, error handling, and test coverage.

- **Type:** Skill
- **Install:** `agentstack add skill-wreos-flutter-cursor-plugin-integrate-mobile-api`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [Wreos](https://agentstack.voostack.com/s/wreos)
- **Installs:** 0
- **Category:** [Content & Media](https://agentstack.voostack.com/c/content-and-media)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [Wreos](https://github.com/Wreos)
- **Source:** https://github.com/Wreos/flutter-cursor-plugin/tree/main/skills/integrate-mobile-api
- **Website:** https://docs.flutter.dev/ai/get-started

## Install

```sh
agentstack add skill-wreos-flutter-cursor-plugin-integrate-mobile-api
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Integrate Mobile API

Use this skill for integrating backend APIs into Flutter applications.

## Workflow

1. Confirm API scope and constraints:
   - protocol (`REST` or `GraphQL`)
   - authentication model (JWT, OAuth, API key, session)
   - required endpoints/operations
2. Define architecture boundaries:
   - data layer for client/datasource
   - domain layer for repository contracts and use cases
   - presentation layer for state updates
3. Implement API client with safe defaults:
   - timeouts
   - retry/backoff policy where appropriate
   - request/response logging with redaction
4. Add auth handling:
   - token attach/refresh strategy
   - unauthorized flow (`401/403`) and sign-out fallback
5. Add DTO mapping and error normalization:
   - map API payloads to domain entities
   - map transport/server failures to typed domain failures
6. Add tests:
   - unit tests for mapping and repository behavior
   - integration tests for happy/error paths (mock server/client)
7. Validate with analysis and impacted tests.

## Guardrails

- Do not expose secrets/tokens in logs or source files.
- Keep API client concerns in data layer; avoid direct networking in widgets.
- Do not claim API integration is complete without naming changed files and validation evidence.
- In simulation/planning mode, use `planned/not executed` wording.

## Required output

1. API scope and auth model selected.
2. Files changed by layer (presentation/domain/data).
3. Validation commands and results.
4. Error handling and retry strategy summary.
5. Remaining risks/follow-up tasks.

## Required references

- `../../rules/flutter-development-best-practices.mdc`
- `../../rules/dart-effective-dart.mdc`
- `../../rules/flutter-test-best-practices.mdc`

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [Wreos](https://github.com/Wreos)
- **Source:** [Wreos/flutter-cursor-plugin](https://github.com/Wreos/flutter-cursor-plugin)
- **License:** MIT
- **Homepage:** https://docs.flutter.dev/ai/get-started

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-wreos-flutter-cursor-plugin-integrate-mobile-api
- Seller: https://agentstack.voostack.com/s/wreos
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
