derive-metric
This skill resolves gaps in business metrics by reusing native measures, enabled saved metrics, or computing ephemeral formulas without persisting definitions.
Identity proven by GitHub's verified organisation badge (microsoft)
- Agents
- Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode, claude.ai and API
- License
- MIT (permissive)
- Pin
- ca144d2pinned Oct 9, 2026
- Context cost
- about 980 tokenswhen the skill loads
- GitHub stars
- 978on microsoft/power-platform-skills
- Scripts
- None found
What it does
“Use when a requested measure is missing, a saved custom metric needs reuse, or an ephemeral formula or derived scalar is needed.”
Generated summary from the skill's own text
This skill resolves gaps in business metrics by reusing native measures, enabled saved metrics, or computing ephemeral formulas without persisting definitions. It validates formulas against process metadata and executes targeted queries to deliver scoped evidence with full definition provenance.
When to use it
- A requested metric is missing or undefined in the system
- A saved custom metric needs reuse across queries
- An ad-hoc derived scalar or formula is required temporarily
- Confirmation is needed on outcome definition before computing
When not to
- You need to create and persist a new metric definition permanently
- Formula prerequisites are unavailable and cannot be inlined
- The metric capability is explicitly rejected by validation gates
Install
These commands install from the publisher's repository and need no account.
skills CLI
npx skills add microsoft/power-platform-skills --skill derive-metricInstalls from the repository's default branch, which may have changed since the commit we checked.
GitHub CLI 2.90 or later
gh skill install microsoft/power-platform-skills derive-metric@ca144d29c1665a329ab4b8e14946b2105e7622faInstalls the commit we checked (ca144d2).
Copy by hand
Download the folder at ca144d2 and put it in .claude/skills/derive-metric for Claude Code and in .agents/skills/derive-metric for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.
Claude Code plugin
/plugin install azure-cosmos-db-assistant@claude-plugins-officialThe publisher's plugin in Claude's official marketplace. It may hold more than this skill, and we have not pinned it.
Claude Code plugin
/plugin install azure@claude-plugins-officialThe publisher's plugin in Claude's official marketplace. It may hold more than this skill, and we have not pinned it.
Claude Code plugin
/plugin install azure-sql-developer@claude-plugins-officialThe publisher's plugin in Claude's official marketplace. It may hold more than this skill, and we have not pinned it.
Copy for your agent
A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.
Prompt
Install the agent skill "derive-metric" by Microsoft. Source, pinned to commit ca144d29c1665a329ab4b8e14946b2105e7622fa: https://github.com/microsoft/power-platform-skills/tree/ca144d29c1665a329ab4b8e14946b2105e7622fa/plugins/process-intelligence/skills/derive-metric 1. Download that folder at exactly this commit. Do not use the default branch. 2. Copy every file unchanged, keeping the folder structure, into .claude/skills/derive-metric/ for Claude Code and .agents/skills/derive-metric/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist. 3. Do not edit the files, and do not run any script in the folder unless I ask you to. 4. When you are done, list the files you copied and where you put them. Listing and checks: https://www.agentnative.dev/skills/microsoft/derive-metric
SKILL.md at the pin
---
name: derive-metric
description: Use when a requested measure is missing, a saved custom metric needs reuse, or an ephemeral formula or derived scalar is needed.
allowed-tools: Read, AskUserQuestion
---
# Resolve a metric gap without saving definitions
Use the [shared contract](../../references/analysis-contract.md) and
[filters/units](../../references/filters-and-units.md). Follow this order; stop at the first sufficient option.
For a business-derived measure, confirm case/event entity, outcome definition/provenance,
units, time basis and aggregation. Are amounts incremental transactions or cumulative snapshots?
Never assume sum, latest or maximum: nonmonotonic snapshots require authoritative ordering and
refund/correction semantics. Missing definitions mean **inconclusive**; ask before computing.
Do not infer formula grammar from an example name or business description.
1. **Native output first.** Use the existing metric and its correct scope/aggregation.
For cases over one day append
`{metric:"CaseDuration",comparisonOperator:"GreaterThan",values:["1.00:00:00"],isInclusive:true}`
to F's `caseMetricConditionFilters`, then
`get_cases_with_metrics_v2 {S,filterOptions:Fplus,itemsPerPage:5,itemsToSkip:0}`.
No formula is needed for ordinary duration/waiting/counts; use native grouped statistics
instead of summing a truncated cases page.
2. **Enabled saved metric.** Reuse fresh details' `CustomMetrics` ID/name/type/dataType.
Details is not a generic metric catalog and contains no saved formula text.
Match Case/Event/Edge scope and scalar type. For a Boolean Case metric C append
`{metric:"CustomMetric",customMetricId:C,comparisonOperator:"EqualTo",values:[true],isInclusive:true}`
to `caseMetricConditionFilters`; query `get_process_overall_metrics_v2 {S,filterOptions:Fplus}`
for a count. An ID filter needs no formula validation.
A saved-name output expression, e.g. synthetic `EscalatedCase()`, **does** require
the validation/column path below; do not guess escaping or missing dependencies.
3. **Exact local scalar.** Reuse complete, definition-compatible, same-scope totals with a nonzero
denominator. Label the result derived, not saved. Never average averages or use overlapping
groups/top-N samples as population totals.
4. **Ephemeral formula only if necessary.** Load [formula execution](../../references/formulas.md).
Reuse PV/PMV from current details, not process/view IDs; refresh when stale.
Fetch needed targeted reference pages without a lookup quota; then validate:
`validate_custom_metric_formula {processVersionId:PV,processExtendedMetadataVersionId:PMV,formula:Fexpr}`.
For a candidate and its repairs, allow **three validation attempts total**, not endless retries.
Repair only from structured errors/definitions; stop early on an unavailable prerequisite.
Require `isValid:true`, a compatible `dataType` and the **exact target context in types**.
Validation alone neither executes nor saves anything.
5. Execute the smallest matching filter/query or default page-five column query.
For cases: `get_cases_with_metrics_v2 {S,filterOptions:F,itemsPerPage:5,itemsToSkip:0,formulaMetricInput:{name:N,formula:Fexpr}}`.
N must not collide with returned built-ins. Never invent `computedColumns` or `metrics`.
Continue necessary pages or distinct evidence queries without ordinary-call or total-row quotas.
Reuse completed results; stop when answered or no new evidence is available.
Missing validator forbids unvalidated execution even if the output field is advertised.
Column and formula-filter capabilities are independent; stop after an explicit gate rejection.
No create/save metric tool exists. If a prerequisite cannot be inlined, explain creation/enablement
outside MCP, then refresh metadata and revalidate after the user's action.
Report definition/formula, units/context, validation state, at most five headline rows and **ephemeral/not saved**.
Retain definition provenance and scoped evidence/status using the [investigation method](../../references/investigation-method.md).
From microsoft/power-platform-skills at ca144d2, shown as plain text under its license: MIT (permissive). The license text is in LICENSE.
View SKILL.md on GitHub at ca144d2Files
- SKILL.md4.1 KB · fd11a95e78c4
1 file, 4.1 KB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.
Skill folder on GitHub at ca144d2More from Microsoft
pull-requests
This skill guides the agent in writing high-quality pull request descriptions following the Agent Framework repository template and in systematically handling…
Claude Code, Codex, Cursor +4 · about 1.5K tokens · pinned 7 days ago
appinsights-instrumentation
This skill provides guidance and reference materials for instrumenting webapps with Azure Application Insights across ASP.NET Core, Node.js, Python, and…
Contains scripts
Claude Code, Codex, Cursor +3 · about 840 tokens · pinned 7 days ago
azure-ai
This skill enables agents to use Azure AI services including Search for full-text and vector queries, Speech for transcription and synthesis, OpenAI for…
Claude Code, Codex, Cursor +4 · about 750 tokens · pinned 7 days ago
azure-diagnostics
The skill diagnoses Azure production issues across App Service, Functions, Container Apps, AKS, VMs, and Messaging services using AppLens, Azure Monitor…
Contains scripts
Claude Code, Codex, Cursor +3 · about 1.6K tokens · pinned 7 days ago
add-camera
This skill generates typed TypeScript wrappers for camera capture and image gallery selection in Power Apps mobile apps using Expo libraries.
Claude Code · about 5.2K tokens · pinned 7 days ago
add-connector
This skill adds Power Platform connectors to Expo/React Native mobile apps by discovering the connector, establishing a connection, generating service files…
Claude Code · about 3.8K tokens · pinned 7 days ago
Related in Data and databases
data-table-manager
This skill manages n8n Data Tables through creation, import, querying, and mutation operations.
by n8nOfficial publisher
Claude Code, Codex, Cursor +3 · about 2.1K tokens · pinned 7 days ago
algolia-automation
This skill automates Algolia search and indexing operations through the Rube MCP interface.
by ComposioOfficial publisher
Claude Code, Codex, Cursor +3 · about 690 tokens · pinned 7 days ago
expo-sqlite
This skill enables SQLite database operations in Expo and React Native apps for structured data storage, offline queues, and persistent caches.
by ExpoOfficial publisher
Claude Code, Codex, Cursor +4 · about 2.6K tokens · pinned 7 days ago
prisma-8
This skill helps agents work with Prisma 8, a contract-first data layer for TypeScript projects.
by PrismaOfficial publisher
Contains scripts
Claude Code, Codex, Cursor +3 · about 3.5K tokens · pinned 7 days ago
analyzing-experiment-session-replays
This skill enables agents to analyze session recordings from experiment variants to identify behavioral differences between control and test groups.
by PostHogOfficial publisher
Claude Code, Codex, Cursor +4 · about 2.3K tokens · pinned 7 days ago
auditing-warehouse-view-health
Audits materialized views in a PostHog data warehouse to identify failed views and flag unused ones that waste compute resources.
by PostHogOfficial publisher
Claude Code, Codex, Cursor +4 · about 1.4K tokens · pinned 7 days ago