setup-offline-profile
Use when the user wants to enable offline mode for a Power Apps mobile app and create a Mobile Offline Profile in Dataverse — designs per-table row scope, relationships, columns, and sync frequency through a 3-gate approval flow.
Install / Use
npx skills add microsoft/power-platform-skills --skill setup-offline-profileInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of setup-offline-profile
setup-offline-profile scores 84/100 on our quality scale, 2597th of 4,647 Development & Engineering skills we index.
Its SKILL.md is 41 KB long, well organised into 32 sections with 24 code examples: long enough that it reads more like full documentation than a focused instruction file, which agents can find harder to follow.
It has 919 GitHub stars, a meaningful sign that others use it.
Maintenance, license and trust
- The repository was last updated 9 days ago, so setup-offline-profile is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands.
Automated pattern scan on 2026-10-04. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
setup-offline-profile compared with similar skills
All 4 of these similar skills score higher than setup-offline-profile; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| setup-offline-profile (this skill)by microsoft | 84 | 919 | 9d ago | SKILL.md |
| ai-job-searchby MadsLorentzen | 100 | 44.9k | today | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 41.7k | 3d ago | CLAUDE.md |
| algorithmic-artby anthropics | 100 | 177.9k | 11d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 11d ago | SKILL.md |
Frequently asked questions
- How do I install setup-offline-profile?
- Run
npx skills add microsoft/power-platform-skills --skill setup-offline-profile. The install tabs above show the steps for each supported agent. - Which AI agents does setup-offline-profile work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is setup-offline-profile safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is setup-offline-profile still maintained?
- The repository was last updated 9 days ago, so setup-offline-profile is actively maintained.
Skill content
View source on GitHubname: setup-offline-profile description: Use when the user wants to enable offline mode for a Power Apps mobile app and create a Mobile Offline Profile in Dataverse — designs per-table row scope, relationships, columns, and sync frequency through a 3-gate approval flow. user-invocable: true allowed-tools: Read, Edit, Write, Grep, Glob, Bash, AskUserQuestion, EnterPlanMode, ExitPlanMode, Task model: opus
Plugin check: Run
node "${PLUGIN_ROOT}/scripts/check-version.js"- if it outputs a message, show it to the user before proceeding.
Shared instructions: shared-instructions.md — read first.
References:
- offline-profile-schema.md — Dataverse entity field map
- dataverse-offline-api.md — Web API recipes for profile / item / association POSTs
- offline-profile-reconciliation.md — the
schemaColumnsbaseline this skill writes + the lifecycle delta check that consumes it
Setup Offline Profile
End-to-end wizard for creating a Dataverse Mobile Offline Profile that the app (and any other compatible Power Apps client) can use to download data for offline access.
Scope of v0: configuration only. This skill creates records in the existing
Dataverse Mobile Offline Profile tables (mobileofflineprofile,
mobileofflineprofileitem, mobileofflineprofileitemassociation) and writes
the full app-level offline config — profile metadata, per-table scope, and the
temporary SDK-workaround fields — to offline-profile.json. This skill does
NOT modify power.config.json (that file is owned by npx power-apps init
and its schema is controlled upstream). The template already bundles
@microsoft/power-apps-native-offline; @microsoft/power-apps-native-host
consumes the profile and owns local SQLite access, queued synchronization,
reconnect behavior, and status UX. This skill does not scaffold duplicate
app-owned offline runtime code.
Out of scope for v0:
- Custom filter mode (
recorddistributioncriteria=3, savedquery picker) — defer to v0.5 - User/team membership assignment — split into
/assign-offline-profile - Row-count download estimation — split into
/preview-offline-scope
Workflow
- Verify project & auth → 2. Resolve mode (create vs extend) → 3. Spawn architect agent → Gate 1 (table prerequisites) → 4. Run the internal
enable-tables-offlineworkflow if needed → 5. POST profile shell → Gate 2 (per-table row scope) → 6. POST profile items → Gate 3 (relationships + columns + sync) → 7. POST associations → 8. Validate + publish → 9. Persist artifacts → 10. Summary
Step 1 — Verify project & auth
test -f power.config.json && test -f app.config.js
# Manifest lives at either root (legacy) or docs/plan-artifacts/ (newer scaffolds)
MANIFEST=$(test -f .datamodel-manifest.json && echo ".datamodel-manifest.json" || \
(test -f docs/plan-artifacts/.datamodel-manifest.json && echo "docs/plan-artifacts/.datamodel-manifest.json"))
test -n "$MANIFEST" && echo "✓ manifest at $MANIFEST"
node "${PLUGIN_ROOT}/scripts/resolve-environment.js" "$(node -e \"console.log(require('./power.config.json').environmentId)\")"
Capture Environment URL for <envUrl> and manifest path for the architect spawn (Step 3) and the artifacts write (Step 9).
Web-only target detection — Mobile Offline Profiles only apply to native targets (iOS/Android). If the project is web-only, the profile will be created in Dataverse but the generated app will never use it:
# Inspect platforms declared in app.config.js
node -e "
const c = require('$(pwd)/app.config.js');
const platforms = c?.expo?.platforms ?? [];
const hasNative = platforms.includes('ios') || platforms.includes('android');
console.log(JSON.stringify({ platforms, hasNative }));
" 2>/dev/null
| hasNative | Action |
|---|---|
| true (has ios and/or android) | Continue normally |
| false (web-only or no platforms) | Print: ⚠ This project only targets web — Mobile Offline Profiles don't apply (they require iOS/Android). Continuing will create the profile in Dataverse but no app will use it. Ask via AskUserQuestion: "Continue anyway?" Default No. |
| Parse error / app.config.js missing key | Warn, but assume native (don't block on a parser quirk) |
STOP conditions:
- No
power.config.json→ "Run/create-mobile-appfirst." - Neither
.datamodel-manifest.jsonnordocs/plan-artifacts/.datamodel-manifest.json→ "Run/add-dataversefirst — offline profiles require a data model." - Environment resolution failure → standard auth recovery (
az login --tenant <env-tenant>or provide environment URL directly; see shared-instructions.md). - Web-only + user declines override → STOP. Print:
Offline profile creation skipped — no native target.
Step 1a — Environment consistency check
Same as /add-dataverse Step 3a — verify power.config.json resolves and az can token for the target tenant. STOP if it cannot; user must re-auth with az login --tenant <env-tenant>.
Step 1b — Resume check
Read memory-bank.md ## Offline profile block. Decide based on status:
| status value | Action |
|---|---|
| (section absent) OR status: none | First-time run. Continue to Step 2. |
| status: not-applicable | User previously opted out during /create-mobile-app offline-profile setup ("doesn't need offline support"). Re-confirm: "Memory-bank says this app doesn't need offline. Override and proceed? (y/N)". Default N stops here. |
| status: done AND a profile matching profileId still exists in env | Already complete. Print summary from the memory-bank block; ask user if they want to /edit-offline-profile (v0.2) or just exit. |
| status: done BUT GET /mobileofflineprofiles(<profileId>) returns 404 | Profile was deleted externally (maker portal or another env). Treat as none; clear the section; continue to Step 2. |
| status: in-progress AND profile exists in env | Resume flow — see below. |
| status: in-progress BUT profile doesn't exist in env | Memory-bank stale. Auto-clean: clear the section, log recovered from stale in-progress state, continue to Step 2 as a fresh run. |
Resume flow — when memory-bank has status: in-progress AND the profile still exists:
-
GET /mobileofflineprofiles(<profileId>)?$expand=MobileOfflineProfile_MobileOfflineProfileItemto compute what's actually been committed:- 0 items → profile shell exists, items not yet POSTed. Resume from Step 6.
- 1+ items, missing some from manifest → resume from Step 6, skipping items already present.
- All items present,
selectedcolumnsempty on ≥1 → resume from Step 7 (PATCH). - All items present, all have
selectedcolumns→ resume from Step 8 (Publish). componentstate=0(Published) → memory-bank lies; treat asdone.
-
Ask the user one consolidated AskUserQuestion (NOT a per-step approval):
Resume from <computed step> on profile "<name>" (<profileId>)? Items already committed: <N> of <M> PATCHes already applied: <K> Published: <yes|no> Options: - Resume from where it left off (recommended) - Start fresh — delete the half-built profile and re-run from Step 5 - Cancel -
On
Resume→ jump to the computed step. Skip already-committed items by matchingselectedentitytypecode. -
On
Start fresh→DELETE /mobileofflineprofiles(<profileId>)(cascade-deletes items + associations), clear memory-bank section, continue to Step 2 as new. -
On
Cancel→ STOP, leave memory-bank untouched.
Memory-bank checkpoint contract: the skill writes status: in-progress + profileId immediately after Step 5 (profile shell POST). Each subsequent step updates a lastSuccessfulStep: field so resume knows where to pick up. On BLOCKED: from any step, the skill leaves status: in-progress; on DONE, it writes status: done in Step 9c.
Idempotency on POST retries: if Step 6 re-POSTs an item with the same selectedentitytypecode against the same parent profile, Dataverse may return 409 Conflict ("duplicate"). The wrapper dataverse-request.js treats this as silent success via its looksLikeDuplicate logic — safe to re-attempt.
Step 2 — Resolve mode (create vs extend vs reconcile)
Telemetry checkpoint: resolve_offline_profile_mode
Print before starting:
"→ Checking for existing offline profiles in the environment…"
node "${PLUGIN_ROOT}/scripts/dataverse-request.js" <envUrl> GET \
"mobileofflineprofiles?\$select=mobileofflineprofileid,name,description,publishedon"
Decision tree — evaluate in order:
| # | Condition | Action |
|---|---|---|
| 1 | Step 1b already detected status: in-progress in memory-bank | Resume flow (handled in Step 1b). Do not re-evaluate here. |
| 2 | offline-profile.json has top-level profileId: <X> AND profile <X> still exists in env | Collision case — ASK USER. AskUserQuestion: (a) Extend the pinned profile (re-architect against current data model + add/PATCH items as needed), (b) Delete the pinned profile and create fresh (irreversible — cascade-deletes items + associations + memberships), (c) Cancel. Default = (a) extend. NEVER silently delete. |
| 3 | offline-profile.json has top-level profileId: <X> AND profile <X> does NOT exist (404 from GET) | offline-profile.json is stale (env reset, profile manually deleted). Delete the local file, continue to row #4. |
| 4 | Any existing profile in env has name matching this app's name (case-insensitive substring match on power.config.appDisplayName or directory name) | ASK USER. AskUserQuestion: (a) Extend the name-matching profile, (b) Create a new profile (the name-matching one may belong to another app — your call), (c) Cancel. No default — both are legitimate. |
| 5 | Zero profiles in env | Mode = create-new. Continue to Step 3. |
| 6 | 1+ profiles in env but no name match + no pin | Mode = create-new (the env has unrelated profiles). Continue to Step 3. Print one-line note: ↷ <N> unrelated profiles exist in env; not extending — see /edit-offline-profile to manage them. |
Why row #2 is critical (empirical 2026-05-25): the chanel-rm and FCB Tracker test runs hit this case. Without this check, the skill cascade-deleted the pinned profile silently. After this patch, the user gets a clear three-way choice and
deleteis always an explicit action.
Extend mode (rows #2a, #4a) implementation: re-spawn the architect with
Mode: extend, existingProfileId: <X>. The architect compares its current proposal to the on-server items + associations and outputs three lists: (i) items to ADD, (ii) items to PATCH (scope/columns/sync diffs), (iii) items to DELETE (in-server but not in current data model). Surface to the user at Gate 2. After approval, the skill issues incremental writes — no profile-shell POST.
Step 3 — Spawn architect agent
Telemetry checkpoint: design_offline_profile_scope
Print before starting:
"→ Spawning mobile-app:offline-profile-architect agent (read-only) to design the profile…"
Spawn via Task:
agent: mobile-app:offline-profile-architect
prompt:
Working directory: <workdir>
Plugin root: ${PLUGIN_ROOT}
Environment URL: <envUrl>
Publisher prefix: <prefix>
Mode: default
The agent returns _offline_section.md in the working directory. Read it. Parse its first-line status code:
DONE→ continueDONE_WITH_CONCERNS: <list>→ surface concerns at Gate 2 / Gate 3 where relevant; continueNEEDS_CONTEXT: <missing>→ resolve the missing context (most often: data model file absent), re-spawn once (cap: 2 retries). If still failing, STOP with the agent's reason.- `BLOC
Truncated for display — read the full file on GitHub.
Related Skills
ai-job-search
44.9kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
41.7kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
