agentleFS
MicrosoftKnown publishermicrosoft/Copilot-Managed-Runtime/plugins/copilot-managed-runtime/skills/share-link/SKILL.md

share-link

Skill4 starsChanged 8 days agoMITView on GitHub

Manages tenant-wide share links for a Microsoft App via `ms app share link create`, `ms app share link list`, and `ms app share link revoke`. Use when you want to distribute app access via a URL instead of named principals.

1 other project uses a version of this.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read memory-bank.md per shared-instructions.md for the app's environment/app identifiers, if recorded.

    line 31
  2. Distinctive:

    Ask the user which operation they want if not already clear from context:

    line 45
  3. Distinctive:

    Before running, show the user what will be revoked:

    line 89
  4. Distinctive:

    Wait for explicit yes. Never auto-proceed — this removes access for all past redeemers.

    line 93
  5. Very specific:

    If the user has already confirmed, pass --force to avoid a double-prompt:

    line 109

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

Share Link

Manages tenant-wide JIT-redemption links for a Microsoft App. The first time a recipient opens a share link they are automatically granted the Microsoft App Reader role at the app scope — no explicit principal list required.

Three sub-commands:

CommandPurpose
ms app share link createGenerate a new share link URL
ms app share link listList all active share links
ms app share link revokeRevoke a link by ID (removes redeemers' access)

Note: Share links are for distributing play access tenant-wide. For granting named users play or edit access, use /share instead.

Workflow

  1. Memory Bank → 2. Verify Project + Env → 3. Mode → 4. Run → 5. Surface Result

Step 1: Check Memory Bank

Read memory-bank.md per shared-instructions.md for the app's environment/app identifiers, if recorded.

Step 2: Verify Project + Env

test -f ms.config.json || { echo "Not in a Microsoft App workspace."; exit 1; }
BIN=ms
$BIN auth status                                         # must report the expected UPN

Both --app and --environment-id can be supplied explicitly to run from outside a project directory. When ms.config.json is present its appId and environmentId are used automatically.

Step 3: Mode

Ask the user which operation they want if not already clear from context:

  • create — generate a new share link.
  • list — show all active share links.
  • revoke — delete a share link by ID (also removes access for past redeemers).

Step 4: Run

Create

$BIN app share link create

Flags:

FlagRequiredDescription
--appNoApp name override. Defaults to appId in ms.config.json.
--environment-id / -eNoEnvironment ID override. Defaults to ms.config.json.
--jsonNoMachine-readable envelope: { success, appName, appShareLinkId, shareLinkUrl }.

On success the CLI prints the share link URL on its own line so it copies cleanly. Capture and present that URL to the user:

Share link created for 'my-app' (id: a3f1). Anyone in your tenant who opens
this link will be granted Microsoft App Reader access. Share URL:
https://apps.powerapps.com/play/e/<env-id>/app/<app-guid>?shareLink=a3f1...

List

$BIN app share link list

Flags: same --app / --environment-id / --json as create. No additional flags.

Human-readable output is a table with columns: LINK ID, ROLE, REDEEMERS, CREATED BY. The URL is intentionally omitted from the table — use --json if the full URL is needed.

Present the table to the user. If the list is empty, tell them no share links are currently active.

Revoke

Before running, show the user what will be revoked:

"About to revoke share link <link-id> for app <app-name>. Anyone who has not yet redeemed it will lose access; users who already redeemed it will have their Microsoft App Reader role removed. Continue?"

Wait for explicit yes. Never auto-proceed — this removes access for all past redeemers.

$BIN app share link revoke --link-id <link-id>

Flags:

FlagRequiredDescription
--link-id / -lYesThe 4-char lowercase hex link ID returned at creation time (e.g. a3f1).
--force / -fNoSkip the CLI's own confirmation prompt. Always pass --force when running non-interactively because the agent has already asked for confirmation in the previous step.
--appNoApp name override.
--environment-id / -eNoEnvironment ID override.
--jsonNoEnvelope: { success, appName, linkId, existed: boolean }.

If the user has already confirmed, pass --force to avoid a double-prompt:

$BIN app share link revoke --link-id a3f1 --force

Step 5: Surface Result

Create: Print the full share URL. Remind the user this grants read-only app access to anyone in the tenant who opens it, and that they can revoke it at any time with ms app share link revoke --link-id <id>.

List: Present the table. Offer to create or revoke links from here if appropriate.

Revoke:

  • existed: true (or non-JSON success): confirm the link is gone.
  • existed: false / 404 AppShareLinkNotFound warning: the link ID was not found — treat as a clean no-op and tell the user.

Edge Cases

SituationAction
User doesn't have the link ID for revokeRun ms app share link list first to get the ID, then proceed to revoke.
User wants to revoke all links at onceRun ms app share link list --json, extract all appShareLinkId values, confirm once with the full list, then revoke --force each ID in sequence.
ms app share link revoke warns link not foundNot an error — the link was already gone. Tell the user and continue.
Hard error (auth / app-not-found / non-zero exit)Surface verbatim and STOP. Do not retry.
User is outside a project directoryPass --app <name> and --environment-id <id> explicitly. Both flags are optional in non-interactive mode when ms.config.json is present.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.