Official agent skill

Add Geolocation

by microsoft in microsoft/power-platform-skills

Internal implementation skill invoked by /add-native for native background GPS tracking with durable storage and Dataverse sync using @microsoft/power-apps-native-bglocation.

OfficialMITAuto-check: notes

Install Add Geolocation

skills CLI
$ npx skills add microsoft/power-platform-skills --skill add-geolocation -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install microsoft/power-platform-skills add-geolocation --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/microsoft/power-platform-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/mobile-apps/skills/add-native/add-geolocation .claude/skills/add-geolocation && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
add-geolocation
GitHub stars
967
Token cost
~1.9k tokens
SKILL.md length
369 words
Files
1
Skills in repo
87
Repo updated
First seen
Licence
MIT

At a glance

Internal implementation skill invoked by /add-native for native background GPS tracking with durable storage and Dataverse sync using @microsoft/power-apps-native-bglocation.

  • Works in 5 steps: Verify app and package → Verify the Dataverse target table first → Write src/native/geolocation.ts → …
  • SKILL.md covers 1. Verify app and package, 2. Verify the Dataverse target…, 3. Write… and 4. Usage shape, plus 1 more section
  • Calls node and npx

What it does

Add Geolocation is an agent skill from microsoft/power-platform-skills, published by the product's own GitHub organization. Internal implementation skill invoked by /add-native for native background GPS tracking with durable storage and Dataverse sync using @microsoft/power-apps-native-bglocation.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: A plugin marketplace for GitHub Copilot and other AI agents that provides Power Platform development plugins, including reusable skills, agents, and commands for building and… The licence is MIT.

Example prompts

  • “/add-geolocation”

Requirements

  • Node.js
  • Pre-approved tools (allowed-tools): Read, Edit, Write, Grep, Glob, Bash, AskUserQuestion

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Verify app and package
  2. Verify the Dataverse target table first
  3. Write src/native/geolocation.ts
  4. Usage shape
  5. Type-check and summary

What it can do on your machine

Read from SKILL.md and the folder at commit 5ef4e4f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Edit
    • Write
    • Grep
    • Glob
    • Bash
    • AskUserQuestion

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • node
    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Add Geolocation loads about 1.9k tokens when it runs. Until then it costs about 48 tokens; SKILL.md has 369 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~48
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Read, Edit, Write, Grep, Glob, Bash, AskUserQuestion

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from microsoft/power-platform-skills at commit 5ef4e4f, republished under its MIT licence (© microsoft). 369 words, ~1,914 tokens.

Download SKILL.mdSave it as .claude/skills/add-geolocation/SKILL.md (or your agent's skills folder).
name
add-geolocation
description
Internal implementation skill invoked by /add-native for native background GPS tracking with durable storage and Dataverse sync using @microsoft/power-apps-native-bglocation.
allowed-tools
Read, Edit, Write, Grep, Glob, Bash, AskUserQuestion
user-invocable
false
disable-model-invocation
true
model
sonnet

Shared instructions: shared-instructions.md - read first.

Add Geolocation

Internal helper for /add-native geolocation, /add-native location-tracking, /add-native background-location, /add-native gps-tracking, and /add-native @microsoft/power-apps-native-bglocation.

Use this only for continuous/background GPS tracking with native durable storage and inline Dataverse upload. For a single foreground coordinate read, use /add-native location (expo-location) instead.

Hard rules:

  • Auth is MSAL-only. Do not expose OneAuth or an auth selector.
  • Use geoService(dataSource, app_id) and BgLocationClient.
  • Do not use GeolocationExtension, HostingSDK, PCF, Launch URI, or CordovaV2 bridge paths.
  • Do not install packages or edit native config.
  • The control is not usable until its Dataverse target table and mapped columns are verified.

1. Verify app and package

bash
test -f app.config.js && test -f power.config.json && test -f package.json && test -d src
node -e "const p=require('./package.json'); const m='@microsoft/power-apps-native-bglocation'; if (!p.dependencies?.[m]) { console.error('MISSING: ' + m); process.exit(1); } console.log('OK: geolocation package present');"

If either check fails, stop. The template/app must already ship the native package.

2. Verify the Dataverse target table first

This control uses the package default Dataverse entity set:

text
msdyn_locationrecords

Do not ask the user for a table name and do not invent a custom table. msdyn_locationrecords must already exist before the control can be used.

bash
ENV_JSON=$(node "${PLUGIN_ROOT}/scripts/resolve-environment.js" "$(node -e "console.log(require('./power.config.json').environmentId)")")
ENV_URL=$(node -e "const j=JSON.parse(process.argv[1]); process.stdout.write(j.environmentUrl || '')" "$ENV_JSON")

TABLE="msdyn_locationrecords"
node "${PLUGIN_ROOT}/scripts/dataverse-request.js" "$ENV_URL" GET \
  "EntityDefinitions?\$filter=EntitySetName eq '$TABLE'&\$select=LogicalName,EntitySetName"

Required result:

  • One row returned: capture LogicalName and verify columns.
  • Empty value: []: stop. Mark BLOCKED (target table missing). Do not create the table, do not route to /add-dataverse, and do not report the control as usable. Tell the user to run the geolocation-control table provisioning/setup mechanism, then re-run /add-native geolocation.
  • Auth/environment error: stop. Mark UNVERIFIED (target table not checked). Do not report the control as usable.

When the table exists, verify every mapped column exists:

bash
node "${PLUGIN_ROOT}/scripts/dataverse-request.js" "$ENV_URL" GET \
  "EntityDefinitions(LogicalName='<logicalName>')/Attributes?\$select=LogicalName,AttributeType"

Required default fieldMap columns from the package README:

text
msdyn_locationrecordid, msdyn_appid, msdyn_latitude, msdyn_longitude,
msdyn_altitude, msdyn_accuracy, msdyn_heading, msdyn_speed, msdyn_timestamp

If any active fieldMap column is missing, stop. Mark BLOCKED (target columns missing) and tell the user to fix the control table through the geolocation-control table provisioning/setup mechanism.

Show full SKILL.md (98 more words)Show less

3. Write src/native/geolocation.ts

Create or patch src/native/geolocation.ts so screens import this wrapper, not the package directly.

The target config must require the README's two tracking flags:

  • trackInBackground: boolean
  • persistAcrossRestarts: boolean
ts
// src/native/geolocation.ts
import {
  geoService,
  BgLocationClient,
  AuthMethod,
  ConnectionType,
} from '@microsoft/power-apps-native-bglocation';
import type {
  DataverseDataSource,
  LocationData,
  PermissionStatus,
} from '@microsoft/power-apps-native-bglocation';

export type { LocationData, PermissionStatus } from '@microsoft/power-apps-native-bglocation';

export type GeoTrackingTarget = Omit<DataverseDataSource, 'authMethod' | 'connectionType'>;

export type GeoResult<T> =
  | { ok: true; value: T }
  | {
      ok: false;
      reason: 'NATIVE_MODULE_MISSING' | 'PERMISSION_DENIED' | 'TRACKING_FAILED';
      message?: string;
    };

let activeClient: BgLocationClient | null = null;

function client(): BgLocationClient {
  return activeClient ?? new BgLocationClient();
}

function dataSource(target: GeoTrackingTarget): DataverseDataSource {
  return {
    ...target,
    authMethod: AuthMethod.MSAL,
    connectionType: ConnectionType.Dataverse,
  };
}

function fail(error: unknown): Extract<GeoResult<never>, { ok: false }> {
  const message = error instanceof Error ? error.message : String(error);
  if (/native|module|not.*link|undefined is not an object|null is not an object/i.test(message)) {
    return { ok: false, reason: 'NATIVE_MODULE_MISSING', message };
  }
  if (/permission|denied|authoriz|not granted/i.test(message)) {
    return { ok: false, reason: 'PERMISSION_DENIED', message };
  }
  return { ok: false, reason: 'TRACKING_FAILED', message };
}

export async function startTracking(
  app_id: string,
  target: GeoTrackingTarget,
): Promise<GeoResult<void>> {
  try {
    activeClient = geoService(dataSource(target), app_id);
    await activeClient.startTracking();
    return { ok: true, value: undefined };
  } catch (error) {
    activeClient = null;
    return fail(error);
  }
}

export async function stopTracking(): Promise<GeoResult<void>> {
  try {
    await client().stopTracking();
    activeClient = null;
    return { ok: true, value: undefined };
  } catch (error) {
    return fail(error);
  }
}

export async function isTracking(): Promise<GeoResult<boolean>> {
  try {
    return { ok: true, value: await client().isTracking() };
  } catch (error) {
    return fail(error);
  }
}

export async function getPermissionStatus(): Promise<GeoResult<PermissionStatus>> {
  try {
    return { ok: true, value: await client().getPermissionStatus() };
  } catch (error) {
    return fail(error);
  }
}

export async function getCurrentLocation(): Promise<GeoResult<LocationData>> {
  try {
    return { ok: true, value: await client().getCurrentLocation() };
  } catch (error) {
    return fail(error);
  }
}

4. Usage shape

Screens must pass connectionUrl, trackInBackground, and persistAcrossRestarts. Do not pass tableName or fieldMap; the control uses the default msdyn_locationrecords table and default msdyn_* field map. intervalMs, distanceFilterMeters, and notification are optional.

ts
const target: GeoTrackingTarget = {
  connectionUrl: 'https://org.crm.dynamics.com',
  trackInBackground: true,
  persistAcrossRestarts: false,
};

await startTracking('my-wrap-app', target);

5. Type-check and summary

bash
npx tsc --noEmit

Only after table + columns are verified and TypeScript passes, report:

text
Geolocation status : READY
Package present    : @microsoft/power-apps-native-bglocation
Wrapper            : src/native/geolocation.ts
Required config    : connectionUrl, trackInBackground, persistAcrossRestarts
Auth               : MSAL only
Target table       : <TABLE> verified
Native config      : not changed

If table verification failed, report BLOCKED or UNVERIFIED instead and do not update memory-bank.md as if the control is ready.

© microsoft, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/mobile-apps/skills/add-native/add-geolocation of microsoft/power-platform-skills.

Open the folder on GitHubat commit 5ef4e4f

Compare with similar skills

Add Geolocation next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Add Geolocation compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Add Geolocation this skillmicrosoft/power-platform-skills967—~1.9kAutomated safety check: NotesMIT
Internal Commsalirezarezvani/claude-skills28k—~3.4kAutomated safety check: PassMIT
Internal Communicationsickn33/agentic-awesome-skills47k1 repos~3.4kAutomated safety check: PassMIT
Internal Communications Writeranthropics/skills180k37 repos~378Automated safety check: PassApache-2.0
Internal Comms Anthropicsickn33/agentic-awesome-skills47k1 repos~702Automated safety check: PassApache-2.0
Python Background Jobswshobson/agents40k—~1.8kAutomated safety check: PassMIT

Similar skills

  • Internal Comms

    alirezarezvani/claude-skills

    A skill your agent uses when a Head of People Ops, BizOps lead, or Internal Communications owner needs to draft and sequence an internal-only change-management communication — a re-org announcement…

    28k GitHub stars~3.4k tokensUpdated 1 mo ago
    Writing & ContentAuto-check passed
  • Internal Communication

    sickn33/agentic-awesome-skills

    Internal communication log: title, type, date, department, host and attendees, agenda, action items, follow-up date, meeting link and delivery status.

    47k GitHub starsUsed in 1 repo~3.4k tokens
    Writing & ContentAuto-check passed
  • Official

    A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…

    180k GitHub starsUsed in 37 repos~378 tokens
    Writing & ContentAuto-check passed
  • Internal Comms Anthropic

    sickn33/agentic-awesome-skills

    Compatibility alias for internal-comms: draft status updates, newsletters and FAQs from approved sources.

    47k GitHub starsUsed in 1 repo~702 tokens
    Writing & ContentAuto-check passed
  • Python Background Jobs

    wshobson/agents

    Python background job patterns including task queues, workers, and event-driven architecture.

    40k GitHub stars~1.8k tokensUpdated 3 days ago
    Backend & APIsAuto-check passed
  • Nofollow Internal

    thedaviddias/Front-End-Checklist

    A skill your agent uses when auditing internal link structure or reviewing link attributes.

    74k GitHub stars~579 tokensUpdated yesterday
    Auto-check passed

More from microsoft/power-platform-skills

All 87 skills in this repo
  • Manage Firewall

    microsoft/power-platform-skills

    Official

    Inspects and configures the web application firewall (WAF) in front of a Power Pages production site.

    967 GitHub stars~4.5k tokensUpdated yesterday
    Auto-check: notes
  • Manage Headers

    microsoft/power-platform-skills

    Official

    Inspects and configures the security headers a Power Pages site sends to browsers — Content Security Policy, frame and clickjacking protection, cross-origin sharing, cookie behavior, and related…

    967 GitHub stars~3k tokensUpdated yesterday
    Auto-check: notes
  • Scan Code

    microsoft/power-platform-skills

    Official

    Scans a Power Pages site project for security issues in source code and dependencies.

    967 GitHub stars~3.4k tokensUpdated yesterday
    Auto-check: notes
  • Scan Site

    microsoft/power-platform-skills

    Official

    Runs a security scan on a deployed Power Pages site, fetches the latest scan report, and produces a plain-language summary.

    967 GitHub stars~3.2k tokensUpdated yesterday
    Auto-check: notes
  • Setup Datamodel

    microsoft/power-platform-skills

    Official

    Creates Dataverse tables, columns, and relationships for a Power Pages site based on a data model proposal.

    967 GitHub stars~4k tokensUpdated yesterday
    Auto-check: notes
  • Add Server Logic

    microsoft/power-platform-skills

    Official

    Creates, edits, and manages Power Pages Server Logic files — server-side JavaScript that runs securely on the Power Pages runtime.

    967 GitHub stars~18k tokensUpdated yesterday
    Auto-check: notes

Questions about Add Geolocation

What does Add Geolocation do?

Internal implementation skill invoked by /add-native for native background GPS tracking with durable storage and Dataverse sync using @microsoft/power-apps-native-bglocation. Add Geolocation is an agent skill from microsoft/power-platform-skills, published by the product's own GitHub organization. Internal implementation skill invoked by /add-native for native background GPS tracking with durable storage and Dataverse sync using @microsoft/power-apps-native-bglocation.

How do I install Add Geolocation in Claude Code?

Run `npx skills add microsoft/power-platform-skills --skill add-geolocation -a claude-code`. Or copy the skill folder (plugins/mobile-apps/skills/add-native/add-geolocation in microsoft/power-platform-skills) into .claude/skills/add-geolocation in your project. Claude Code loads it when a task matches its description.

How do I install Add Geolocation in Codex?

Run `npx skills add microsoft/power-platform-skills --skill add-geolocation -a codex`. Or copy the skill folder (plugins/mobile-apps/skills/add-native/add-geolocation in microsoft/power-platform-skills) into .agents/skills/add-geolocation in your project. Codex loads it when a task matches its description.

Can I use Add Geolocation in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add microsoft/power-platform-skills --skill add-geolocation -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-geolocation, .gemini/skills/add-geolocation, .github/skills/add-geolocation and .opencode/skills/add-geolocation in your project.

What does Add Geolocation need to run?

Going by SKILL.md and its folder, Add Geolocation needs the command-line tools its instructions call (node and npx). Our summary lists: Node.js. Its frontmatter pre-approves these tools: Read, Edit, Write, Grep, Glob, Bash, AskUserQuestion.

Does Add Geolocation access the network?

SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Add Geolocation safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Add Geolocation use?

Add Geolocation is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Add Geolocation use?

About 1.9k tokens (SKILL.md is roughly 7.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Add Geolocation?

Skills that share tags, products or a category with Add Geolocation: Internal Comms (alirezarezvani/claude-skills, 28k stars), Internal Communication (sickn33/agentic-awesome-skills, 47k stars), Internal Communications Writer (anthropics/skills, 180k stars) and Internal Comms Anthropic (sickn33/agentic-awesome-skills, 47k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Add Geolocation?

microsoft (a GitHub organization, an official publisher) maintains it in microsoft/power-platform-skills, which has 967 GitHub stars. The repository holds 87 skills in this directory. The repository was last updated on October 6, 2026.

Source: microsoft/power-platform-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.