api-spatial-anchors

Persist AR content at fixed world positions using the Spatial Anchors API.

Updated Jun 24, 2026
One-click install
npx skills add https://github.com/specs-devs/agentic-tools --skill api-spatial-anchors
Or copy as Structured Prompt for Agentβ–Ό
Please help me install this Agent Skill.
Skill: api-spatial-anchors
Source: https://github.com/specs-devs/agentic-tools/tree/main/skills/api-spatial-anchors
Command: npx skills add https://github.com/specs-devs/agentic-tools --skill api-spatial-anchors

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Place and persist AR content at fixed real-world positions using the Spatial Anchors API (AnchorModule, AnchorSession, WorldAnchor). Anchors survive across Lens sessions. Load when implementing persistent AR placement, furniture placement, room decoration, or location-anchored content.

Core Features & Use Cases

  • AnchorModule-based session management with createWorldAnchor, saveAnchor, and deleteAnchor to anchor content to real-world positions.
  • Attach content to world anchors via AnchorComponent for stable placement across sessions and scans.
  • Optional cloud persistence through Location Cloud Storage Module; requires device relocalization in same area.

Quick Start

Add an AnchorModule to your scene, start an AnchorSession, and create and save a WorldAnchor to persist content across Lens sessions.

Frequently Asked Questions about api-spatial-anchors

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I persist AR content across Lens Studio sessions?β–Ό

You can persist AR content across Lens Studio sessions by using the Spatial Anchors API to create and save WorldAnchors at fixed real-world positions. This attaches content to stable anchors that survive between sessions.

What is a world anchor and when do I need it for AR scene placement?β–Ό

A world anchor fixes virtual content to a specific real-world position using device tracking. You need world anchors for persistent AR scene placement, such as furniture placement or room decoration, where content must remain stable across multiple sessions.

Do I need device tracking to use spatial anchors in Lens Studio?β–Ό

Yes, device tracking is required to use spatial anchors in Lens Studio. Tracking enables the AnchorModule to map real-world coordinates, allowing WorldAnchors to maintain accurate fixed positions for location-anchored content.

Can I save spatial anchors to the cloud for persistent AR placement?β–Ό

Yes, you can save spatial anchors to the cloud using the Location Cloud Storage Module. This requires device relocalization in the same physical area to successfully load and restore the anchored AR content in subsequent sessions.

How do I create and save a spatial anchor for AR furniture placement?β–Ό

Add an AnchorModule to your scene, start an AnchorSession, then use createWorldAnchor and saveAnchor to persist the anchor. Attach your furniture content via AnchorComponent so it remains fixed to the real-world position across sessions.

What are the limitations of using spatial anchors for location-anchored content?β–Ό

Spatial anchors require device relocalization in the same physical area to retrieve persisted content. Cloud persistence depends on the Location Cloud Storage Module, and stable placement relies on continuous device tracking throughout the AR session.