Prerequisites
- The target Nosmai platform and installed package version
- A specific integration or troubleshooting task
Use the machine-readable docs
Every documentation page has a raw Markdown mirror. Add .md to the page URL:
https://nosmai.com/docs/effects/quickstart/flutter.md
Use the scoped index when the agent needs to discover multiple pages:
https://nosmai.com/llms/effects.txt
The top-level agent instructions are available at:
https://nosmai.com/AGENTS.md
Give the agent a narrow task
Tell the agent:
- the target platform and installed Nosmai package version
- the app's framework version and minimum OS
- whether Nosmai or another library owns the camera
- the exact feature to add
- the exact error and relevant logs when diagnosing
- that it must use the supplied Nosmai docs instead of inventing methods
Example:
Use the Flutter quickstart at https://nosmai.com/docs/effects/quickstart/flutter.md. My app uses Flutter 3.22 and nosmai_effects_sdk 1.0.2. Add one NosmaiCameraPreview after license initialization. Keep the license key in a dart-define, preserve my existing navigation, and do not invent native APIs.
Protect credentials
Never paste a real license key into a public prompt, repository, issue, screenshot, or analytics event. Use NOSMAI-YOUR-KEY in shared material and provide the actual value through private build configuration.
An API key and verification token are credentials. If one is exposed, rotate it in Nosmai Console and remove it from history where possible.
Verify it worked
Before accepting an AI-generated integration:
- Confirm every method exists in the installed package version.
- Confirm the code contains only the selected platform.
- Run the build and static analysis.
- Test on a supported physical device.
- Exercise camera permission, navigation, backgrounding, and cleanup.
- Apply a known-good package and check the license status callback.
Common errors
| Mistake | Fix |
|---|---|
The agent mixes old nosmai_camera_sdk APIs with nosmai_effects_sdk | Point it to the current Flutter Markdown page and package version |
| It adds iOS, Android, and Flutter code to one file | Give it one platform-specific page and one task at a time |
| It hard-codes the license key | Move the key to private build configuration |
| It creates a second camera controller | Keep one camera owner and use the lifecycle documented for the selected SDK |