Preview Offline Scope logo

Preview Offline Scope

Organization
microsoft
preview-offline-scope

Use when the user wants to estimate the download size + sync frequency cost of an offline profile BEFORE pushing to users. Read-only. Wraps verify-offline-profile.js with per-table row-count estimates.

Overview

Publishermicrosoft
Repositorypower-platform-skills
Skill namepreview-offline-scope
Stars
895
Forks
182
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by microsoft on GitHub. Read the source before you install it.

Installation

Install the Preview Offline Scope AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/microsoft/power-platform-skills.git /tmp/power-platform-skills
mkdir -p .claude/skills
cp -r /tmp/power-platform-skills/plugins/mobile-apps/skills/preview-offline-scope .claude/skills/preview-offline-scope
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Preview Offline Scope in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Preview Offline Scope on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Preview Offline Scope is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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

Preview Offline Scope

Read-only diagnostic. Tells you "if you pushed this profile to users right now, here's what their devices would download and how often it would re-sync." No mutations.

Useful before:

  • /setup-offline-profile for a final sanity check
  • /assign-offline-profile (so users don't get surprised by data caps)
  • /edit-offline-profile to gauge impact of a column-list change

Workflow

  1. Verify project + locate profile → 2. Run verify (drift check) → 3. Per-table row counts → 4. Cache-size estimate → 5. Report

Step 1 — Verify project + locate profile

Same as /edit-offline-profile Step 1. Read profileId from offline-profile.json or $ARGUMENTS --profile-id. Do not read profile metadata from power.config.json; it is owned by npx power-apps init.

bash
test -f power.config.json
node "${PLUGIN_ROOT}/scripts/resolve-environment.js" "$(node -e \"console.log(require('./power.config.json').environmentId)\")"

Step 2 — Run verify

Telemetry checkpoint: verify_offline_profile_snapshot

bash
node "${PLUGIN_ROOT}/scripts/verify-offline-profile.js" <envUrl> \
  --project-root "$(pwd)"

If status: drift, surface the drift list verbatim. The estimate that follows is still meaningful but flag that the live profile diverges from offline-profile.json — recommend re-running /setup-offline-profile or /edit-offline-profile to reconcile.

Step 3 — Per-table row counts (with scope-applied filter)

Telemetry checkpoint: count_offline_profile_rows

For each table in the profile, run a count query that applies the same filter the runtime would use:

recorddistributioncriteriarecordsownedby* flagEffective filter
1 (All records)n/a?$count=true&$top=0 (whole table)
2 + merecordsownedbyme=true?$count=true&$top=0&$filter=_ownerid_value eq <current-user-id>
2 + teamrecordsownedbymyteam=trueApprox: _ownerid_value in (current user's team-owned IDs); for estimate, use team count from teamroles_association
2 + burecordsownedbymybusinessunit=true?$count=true&$top=0&$filter=_owningbusinessunit_value eq <current-bu-id>
0 (Related only)n/aCan't estimate independently — depends on parents. Report ~depends on parent counts.

For current-user/current-BU filters, resolve identity only inside this skill by calling Dataverse WhoAmI through scripts/dataverse-request.js against the resolved <envUrl>. If that call fails, report the affected scope as unknown — current user/BU unavailable instead of blocking the whole preview. Do not expect scripts/resolve-environment.js or auth.config.json.environment to provide UserId / BusinessUnitId.

For each table:

bash
node "${PLUGIN_ROOT}/scripts/dataverse-request.js" <envUrl> GET \
  "<entitysetname>?\$count=true&\$top=0&<scope-filter>"

Cap at 5000 (Dataverse non-aggregate count cap). When the result is exactly 5000, prefix with in the report.

Step 4 — Cache-size estimate

Telemetry checkpoint: estimate_offline_cache_size

Rough byte-per-row heuristics (configurable; replace with measured values once we have a real sync benchmark):

Column typeBytes
Uniqueidentifier40
String (avg 80 chars)100
Integer / Decimal12
DateTime28
Boolean / State / Status4
Picklist (option value only)8
Memo (avg 500 chars)600
Lookup (FK only)40
Image (URL + thumbnail metadata only — see note below for full-image bytes)200
File (URL + name metadata)200

For each table, compute: estimatedBytesPerRow = sum(bytesForEach column in selectedcolumns). Then tableTotalBytes = rows × estimatedBytesPerRow.

Per-table sync overhead: each syncintervalinminutes interval triggers a delta query → assume ~20% of total rows touched on a typical day. dailyTransferBytes = (totalBytes × 0.20 × intervalsPerDay).

Step 5 — Report

═════════════════════════════════════════════════════════════
  Offline Scope Preview — <profileName>
═════════════════════════════════════════════════════════════

Drift status: ok | drift (see verify output)

Per-table breakdown:

| Table              | Scope          | Rows     | Cols | Est. bytes | Sync (min) |
|--------------------|----------------|----------|------|------------|------------|
| chnl_region        | All records    | 12       | 7    | 4 KB       | 60         |
| chnl_product       | All records    | 312      | 13   | 280 KB     | 60         |
| chnl_rmprofile     | Org+me         | 1        | 10   | 1 KB       | 10         |
| chnl_store         | Org+me         | 84       | 17   | 112 KB     | 10         |
| chnl_storevisit    | Org+me         | 412      | 13   | 220 KB     | 5          |
| chnl_order         | Org+me         | 156      | 14   | 95 KB      | 10         |
| chnl_orderline     | Related only   | ~depends | 11   | ~150 KB    | 10         |

Total initial download : ~860 KB (5000-rows cap not hit)
Daily transfer estimate: ~12 MB / device / day (assuming 20% delta rate)

Sync intervals per day:
  chnl_storevisit (5 min)  → 288 syncs/day  ⚠ high
  chnl_store      (10 min) → 144 syncs/day
  chnl_order      (10 min) → 144 syncs/day
  chnl_rmprofile  (10 min) → 144 syncs/day
  chnl_region     (60 min) → 24  syncs/day
  chnl_product    (60 min) → 24  syncs/day

Concerns:
  - chnl_storevisit at 5 min could exceed mobile data caps in low-signal areas
    (battery drain too). Consider 10 min unless 5 min is mission-critical.

Image / File bytes NOT counted by these heuristics. The metadata (URL +
thumbnail size) IS counted at 200 bytes/row, but the JPEG/file payload
itself transfers separately at runtime sync time. To estimate image
storage, multiply expected non-empty image rows × average JPEG size
(typically 10–500 KB per thumbnail).

Status code (final line)

  • DONE — estimate produced, no concerns
  • DONE_WITH_CONCERNS: <list> — estimate produced but flagged items (high sync rates, near-cap row counts, drift detected, etc.)
  • NEEDS_CONTEXT: <missing> — no profile to estimate against
  • BLOCKED: <reason> — auth or query failures

Notes

This skill is intentionally estimate-grade, not precise. The byte heuristics are rule-of-thumb; real cache size depends on Dataverse's storage layout + JSON serialization + per-device cache compression. The numbers are useful for comparative decisions (one scope vs another, one column list vs another), not for absolute capacity planning.

For precise figures, the only source of truth is the runtime sync log itself — only available once the app is deployed and an RM has signed in.

Frequently asked questions

What does the Preview Offline Scope AI skill do?

Use when the user wants to estimate the download size + sync frequency cost of an offline profile BEFORE pushing to users. Read-only. Wraps verify-offline-profile.js with per-table row-count estimates.

Why use Preview Offline Scope on TypingMind?

Because you install it once and use it with any model. Preview Offline Scope is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Preview Offline Scope in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/microsoft/power-platform-skills/tree/main/plugins/mobile-apps/skills/preview-offline-scope. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Preview Offline Scope?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Preview Offline Scope?

As many as you like. As long as a model supports skills, you can use Preview Offline Scope with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Preview Offline Scope AI skill free?

Yes. It is published on GitHub by microsoft under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇