state

state is a skill for Claude Code from microsoft/managed-apps. It costs 71 tokens per session (4,196 once invoked), scanned A, original, MIT.

Guidance and generated TypeScript clients for storing and querying an app's built-in state and file attachments. The state feature is a NoSQL store, meaning it saves records without the fixed tables used by traditional relational databases.

In plain words
What is it for?
It is for adding persistent app data, defining record collections, generating TypeScript access code, and working with file attachments in Microsoft Managed Apps.
Why use it?
It provides a defined process for checking whether state is available, changing its schema, generating code, and using the resulting client in an app.

Skill for Claude Code ✓ vendor

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { TaskService, type TaskRead, type TaskWrite } from '../state/generated-typescript';.

Part of the microsoft-managed-apps plugin — 22 skills, 1 agent shipped together

Good fit It is for adding persistent app data, defining record collections, generating TypeScript access code, and working with file attachments in Microsoft Managed Apps.

Compare 6 skills from other repositories ↓
About the project

Microsoft Managed Apps is a project for building custom web applications with React, TypeScript, and Vite, and it provides Microsoft's official templates and development tooling. Developers use its SDK, CLI, and Vite plugin to create and manage these applications. Its catalogue add-ons help AI coding agents build Microsoft Managed Apps.

microsoft/managed-apps · 36 stars · on GitHub

Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/microsoft/managed-apps
agentmods
npx agentmods add skills/microsoft/managed-apps/state

Made for: Claude Code.

Or install microsoft-managed-apps, the plugin that ships this one along with the rest of its 22 skills, 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for state

README.md
[![agentmods](https://agentmods.dev/badge/skills/microsoft/managed-apps/state/github.svg)](https://agentmods.dev/skills/microsoft/managed-apps/state)
Your own site
<a href="https://agentmods.dev/skills/microsoft/managed-apps/state"><img src="https://agentmods.dev/badge/skills/microsoft/managed-apps/state/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for state

Your own site · 80×15
<a href="https://agentmods.dev/skills/microsoft/managed-apps/state"><img src="https://agentmods.dev/badge/skills/microsoft/managed-apps/state.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,196 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00071 $0.04196
Opus 5.5 $0.00028 $0.01678
Sonnet 5.5 $0.00014 $0.00839
Haiku 4.5 $0.00007 $0.00420

Measured 5d ago against content hash b2e1d08544ab, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

state scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/microsoft-managed-apps/skills/state/SKILL.md · 381 lines

How it starts

The opening of the file, as written. The whole thing — 381 lines — stays where its author put it; the contents beside it link to each section on GitHub.

📋 Shared Instructions: shared-instructions.md — Cross-cutting concerns.

Managed Apps State with CLI schema + generated client

Every Microsoft Managed App can use built-in app state when the state feature is enabled for the current CLI/environment: a NoSQL store the app calls directly (no middle-tier function, connector, or SDK; the host attaches auth). Records are grouped into collections by an item type name; the server assigns each record an itemId.

For schema-backed state, do not edit schema JSON by hand. Use ms project state ... to change the schema, run ms project state generate-code, then call the generated TypeScript services from app code.

Mandatory feature gate

Before using any guidance in this skill, it is recommended that the user is signed in to the CLI. Run ms auth status, and if it reports no signed-in account, ask the user to run ms auth login. ms feature status never prompts for sign-in, and features that are on by default for the user's organization only apply once they are signed in, so a signed-out check can report state as disabled even when it is available to them.

Then run:

ms feature status --name state --json

Continue only when the output has "success": true and feature.enabled is true. Read the JSON rather than the human-readable output, which lists several settings that can each say "enabled". If the command fails (non-zero exit or "success": false), the feature is not found, or feature.enabled is false, stop and do not run any ms project state ... command.

When state is not enabled, recommend an alternative data-source path based on the user's need:

  • Durable relational/business data: use /add-dataverse.
  • SharePoint lists or document-backed collaboration data: use /add-sharepoint.
  • Workbook-backed tabular data: use /add-excel.
  • Mail, calendar, user profile, Teams, Azure DevOps, OneDrive, Copilot Studio, or Work IQ scenarios: use the matching /add-* skill.
  • Anything else: use /add-data-source to discover and bind the appropriate connector.

Read the full file on GitHub · 381 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago Changed · -2 lines b2e1d08544ab
  2. 29d ago First seen · 383 lines · 71 tokens per session scan A ac8e1c46dab8

Subscribe to this mod's changes

state is a skill published in the GitHub repository microsoft/managed-apps (36 stars, last pushed 3d ago), licensed MIT. It adds 71 tokens to every session and 4,196 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-10.

Related

state compared with skills from other repositories

state next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
statemicrosoft/managed-appsSkill363d agoMITA71Claude Code
create-prprisma/ormSkill48kyesterdayApache-2.0A48Claude Code, Codex
schema-explorationlangchain-ai/deepagentsSkill31ktodayMITA57Claude Code, Codex
atlas-mssqlariga/atlasSkill8.8k3d agoApache-2.0A163Claude Code
ha-data-storesshiwenwen/hope-agentSkill1.9ktodayMITA115Claude Code, Codex
nornicdb-cypher-queriesorneryd/NornicDBSkill924todayMITA79Claude Code, Codex
volcengine-rds-postgresqlbytedance/agentkit-samplesSkill4842d agoApache-2.0A63Claude Code, Codex