Prompting best practices
Updated: Aug 27, 2026
This guide helps you write effective prompts when your AI coding agent is connected to Meta VR CLI. Better prompts lead to faster, more accurate results, whether you’re querying documentation, debugging a device, analyzing performance, or searching for 3D assets.
State your platform, SDK, and context upfront
Meta VR CLI covers several SDKs and development targets. Specifying yours eliminates ambiguity and gets you relevant answers on the first try.
- Instead of: “How do I render passthrough?”
Write: “How do I enable passthrough rendering in Unity using the Meta XR SDK on Quest 3?” - Instead of: “Set up hand tracking”
Write: “Walk me through implementing hand tracking with the Meta Spatial SDK for an Android-native Quest app.” - Instead of: “Fix my shader”
Write: “My custom URP shader isn’t rendering correctly on Quest 2. Here’s the shader code: ...”
Include the right amount of context
Give the LLM enough information to act without overloading it. Include what’s relevant, leave out what isn’t.
For debugging, include:
- The error message or logcat output
- What you were doing when it occurred
- Your target device and OS version
- The SDK and engine version you’re using
For documentation discovery, include:
- The specific feature or API you’re asking about
- Your development framework (Unity, Unreal, Native)
For performance analysis, include:
- The session ID or trace file name
- The time range or frame range you care about
- What metric or behavior you’re investigating
Use direct, imperative language
Tell the LLM what to do. Avoid hedging or open-ended phrasing when you know what you need.
- Instead of: “Can you take a look at the logs?”
Write: “Pull the last 500 lines of logcat filtered to tag Unity at warning level and above.” - Instead of: “I was wondering about the docs”
Write: “Search the documentation for scene anchors in Unity.” - Instead of: “Something seems slow”
Write: “In trace session_42, find which threads spent the most time waiting to run between timestamps 1000000 and 5000000.”
Your agent asks Meta VR CLI what it can do when it connects, so the set of available actions tracks whichever version you have installed. Say what you want to end up with and let the agent choose the steps. Naming a specific tool or a command flag in your prompt narrows what the agent will consider, and the name you remember may not be the one your version uses.
- Find docs: “Search the documentation for passthrough in Unity.”
- Read a specific page: “Read the Unity passthrough page and summarize the setup steps.”
- Check device logs: “Show me the last 200 error-level lines from my headset.”
- Watch logs live: “Watch the logs for 20 seconds and tell me if anything from VrApi shows up.”
- Capture a screenshot: “Take a screenshot from my connected Quest device.”
- Profile the app: “Capture a 10 second trace of com.example.app and tell me where the frame time goes.”
- Dig into a trace: “In session_abc, find the longest slices on the main thread.”
- Look at GPU frames: “Report GPU counters across 30 frames in session_abc.”
- Compare two runs: “Compare session_abc against session_xyz and show me what got slower.”
- Search 3D assets: “Find 5 realistic indoor furniture models.”