agentleFS
MicrosoftKnown publishermicrosoft/PowerToys/src/modules/cmdpal/ExtensionTemplate/TemplateCmdPalExtension/.github/skills/add-adaptive-card-form/SKILL.md

add-adaptive-card-form

Skill142k starsChanged 39 days agoMITView on GitHub

Create form-based UI for your Command Palette extension using Adaptive Cards. Use when asked to add forms, user input fields, toggle switches, text inputs, dropdown menus, data entry, surveys, configuration dialogs, or interactive content pages, or to show charts, graphs, gauges, sparklines, progress bars, badges, or live dashboards. Supports the Adaptive Cards Designer for visual form building.

Trending

More talk lately.about the whole repository

Jan 2026: 5 mentionsFeb 2026: 1 mentionMar 2026: 0 mentionsApr 2026: 4 mentionsMay 2026: 0 mentionsJun 2026: 2 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 1 mentionOct 2026: 1 mentionNov 2026: 1 mentionDec 2026: 0 mentions
Jan 2026Jul 2026Dec 2026
Mentions a month of the microsoft/PowerToys repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about microsoft/PowerToys

The biggest 5 of 111 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 111

Talked about on GitHub, Bluesky and Hacker News (111 times).

On GitHub · 42

37 more on GitHub

On Bluesky · 41

36 more on Bluesky

On Hacker News · 28

23 more on Hacker News

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create interactive forms in your Command Palette extension using Adaptive Cards.

    line 14
  2. Very specific:

    Create a new file in your Pages/ directory:

    line 34

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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

Add Forms with Adaptive Cards

Create interactive forms in your Command Palette extension using Adaptive Cards. Forms allow you to collect user input through text fields, toggles, dropdowns, and other controls.

When to Use This Skill

  • Adding a form to collect user input (name, settings, feedback)
  • Creating interactive configuration dialogs
  • Building data entry interfaces
  • Adding toggle switches or dropdown menus
  • Displaying complex layouts beyond simple lists
  • Showing charts, gauges, progress, or a live dashboard

Prerequisites

Quick Start

Step 1: Create a ContentPage with FormContent

Create a new file in your Pages/ directory:

using Microsoft.CommandPalette.Extensions;
using Microsoft.CommandPalette.Extensions.Toolkit;
using System.Text.Json.Nodes;

namespace YourExtension;

internal sealed partial class MyFormPage : ContentPage
{
    private readonly MyForm _form = new();

    public MyFormPage()
    {
        Name = "Open";
        Title = "My Form";
        Icon = new IconInfo("\uECA5");
    }

    public override IContent[] GetContent() => [_form];
}

internal sealed partial class MyForm : FormContent
{
    public MyForm()
    {
        TemplateJson = """
        {
            "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
            "type": "AdaptiveCard",
            "version": "1.6",
            "body": [
                {
                    "type": "Input.Text",
                    "label": "Name",
                    "id": "Name",
                    "isRequired": true,
                    "errorMessage": "Name is required",
                    "placeholder": "Enter your name"
                }
            ],
            "actions": [
                {
                    "type": "Action.Submit",
                    "title": "Submit"
                }
            ]
        }
        """;
    }

    public override CommandResult SubmitForm(string payload)
    {
        var formInput = JsonNode.Parse(payload)?.AsObject();
        if (formInput == null)
        {
            return CommandResult.GoHome();
        }

        var name = formInput["Name"]?.ToString() ?? "Unknown";
        return CommandResult.ShowToast($"Hello, {name}!");
    }
}

Step 2: Register the Page

In your CommandsProvider, add the form page:

_commands = [
    new CommandItem(new MyFormPage()) { Title = "My Form" },
];

Step 3: Deploy and Test

  1. Deploy your extension
  2. In Command Palette, run Reload
  3. Navigate to your form and submit it

Key Concepts

TemplateJson

The JSON layout of your form (from Adaptive Cards schema). Design it at https://adaptivecards.io/designer/

DataJson (Optional)

Dynamic data binding using ${...} placeholders in your TemplateJson:

TemplateJson = """{ "body": [{ "type": "TextBlock", "text": "${title}" }] }""";
DataJson = """{ "title": "Dynamic Title" }""";

SubmitForm

Called when the user submits. Parse payload as JSON to read input values by their id.

Mixing Content Types

You can combine forms with markdown on the same page:

public override IContent[] GetContent() => [
    new MarkdownContent("# Instructions\nFill out the form below."),
    _form,
];

Common Form Patterns

See form-patterns.md for template JSON for common form types.

Charts and Visuals

Command Palette renders Chart.Line, Chart.Gauge, Chart.Donut, Chart.Pie, the bar charts, ProgressBar, Badge, and Icon natively, and containers accept roundedCorners and showBorder for dashboard tiles. Update DataJson to update charts in place. See charts-and-visuals.md for properties, colors, and examples, and always give these elements a fallback for hosts that don't support them.

Documentation

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.