Agent skill

Cmdlet Scaffolder

by pnp in pnp/powershell

Generate a new PnP PowerShell cmdlet modelled on an existing sibling - class with the right base class and permission attributes, the documentation page, and the changelog entry.

MITAuto-check passedDevelopment

Install Cmdlet Scaffolder

skills CLI
$ npx skills add pnp/powershell --skill cmdlet-scaffolder -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install pnp/powershell cmdlet-scaffolder --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/pnp/powershell.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/cmdlet-scaffolder .claude/skills/cmdlet-scaffolder && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cmdlet-scaffolder
GitHub stars
905
Token cost
~1.3k tokens
SKILL.md length
612 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
MIT

At a glance

Generate a new PnP PowerShell cmdlet modelled on an existing sibling - class with the right base class and permission attributes, the documentation page, and the changelog entry.

  • Works in 8 steps: Establish the request → Choose the sibling → Resolve the API → …
  • Adding a cmdlet for a Graph
  • SKILL.md covers 1. Establish the request, 2. Choose the sibling, 3. Resolve the API and 4. Write the class, plus 4 more sections
  • Calls git and dotnet

What it does

Cmdlet Scaffolder is an agent skill from pnp/powershell. Generate a new PnP PowerShell cmdlet modelled on an existing sibling - class with the right base class and permission attributes, the documentation page, and the changelog entry. Use when adding a cmdlet for a Graph or CSOM API. Output is a draft needing verification against a real tenant.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Changelog and release notes. It works with PowerShell and Microsoft 365. The licence is MIT.

When your agent uses it

  • Adding a cmdlet for a Graph
  • Tasks that involve Changelog and release notes

Example prompts

  • “/cmdlet-scaffolder”

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. Establish the request
  2. Choose the sibling
  3. Resolve the API
  4. Write the class
  5. Write the documentation page
  6. Changelog
  7. Build
  8. Hand over

What it can do on your machine

Read from SKILL.md and the folder at commit 947ac5e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • dotnet

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Cmdlet Scaffolder loads about 1.3k tokens when it runs. Until then it costs about 77 tokens; SKILL.md has 612 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~77
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from pnp/powershell at commit 947ac5e, republished under its MIT licence (© pnp). 612 words, ~1,263 tokens.

Download SKILL.mdSave it as .claude/skills/cmdlet-scaffolder/SKILL.md (or your agent's skills folder).
name
cmdlet-scaffolder
description
Generate a new PnP PowerShell cmdlet modelled on an existing sibling - class with the right base class and permission attributes, the documentation page, and the changelog entry. Use when adding a cmdlet for a Graph or CSOM API. Output is a draft needing verification against a real tenant.

Playbook: cmdlet-scaffolder

Generate a new cmdlet — class, attributes, documentation page and changelog entry — modelled on an existing sibling.

The output is a draft. You cannot call the API or run the cmdlet. Everything about the request shape, the response fields and the permission scopes is inferred. Hand it over labelled as such, with the inferences listed. A plausible, well-formed, subtly wrong cmdlet is the specific failure mode this playbook exists to avoid.

Conventions live in new-cmdlet; language rules in dotnet-standards. This playbook is the procedure.

Never commit, push, or open a PR. Leave the work in the tree and hand it over — see Human in the loop.

1. Establish the request

Before writing anything, pin down: cmdlet name (Verb-PnPNoun, approved verb, singular noun), the API being wrapped, the parameters, and the output shape. If the verb or noun is unsettled, ask — renaming later requires an [Alias] and a changelog entry.

Check the name is not already taken, including as an alias:

grep -rn 'Cmdlet(Verbs[A-Za-z]*\.[A-Za-z]*, "PnPTheNoun")' src/Commands --include=*.cs
grep -rn '\[Alias(' src/Commands --include=*.cs

2. Choose the sibling

This is the most important step. Find the closest existing cmdlet: same folder, same base class, same API, same verb. Prefer a recently modified one — helper signatures have evolved and old call shapes survive in the tree.

git log --diff-filter=M --name-only -20 -- src/Commands/<Area>

Read the sibling's class and its documentation/*.md page in full. You are matching a house style, not producing generic C#. Say which sibling you used.

3. Resolve the API

Use the Microsoft Learn MCP server for the endpoint, its request/response shape and its least-privilege permissions, delegated and application. Do not answer from memory — this is where generated cmdlets go wrong, and it is exactly what the permission attributes encode.

Record the Learn URL for each claim; it goes in the handover.

4. Write the class

Per new-cmdlet: correct base class, [Cmdlet], [OutputType], permission attributes, PipeBind parameters with validation attributes, ExecuteCmdlet() override.

  • Reuse existing PipeBinds and models. Only add a new model if nothing fits, one type per file, enums under src/Commands/Enums/.
  • Graph collections: GetResultCollection, not Get.
  • CSOM: ExecuteQueryRetry().
  • Destructive or overwriting: SupportsShouldProcess plus an actual ShouldProcess call and -Force.
  • Error messages into Resources.resx, not string literals.
Show full SKILL.md (264 more words)Show less

5. Write the documentation page

documentation/<Verb-PnPNoun>.md, structure copied from the sibling page:

  • Front matter — Module Name, title, schema: 2.0.0, applicable, external help file, online version slug matching the cmdlet name exactly
  • ## SYNOPSIS — a Required Permissions block stating the same scopes as the attributes with the same delegated/application split, then a one-line summary. Omit the block entirely if the cmdlet carries ApiPermissionsNotRequired; adding one there contradicts the attribute and the existing pages
  • ## SYNTAX — one ```powershell block per parameter set
  • ## DESCRIPTION
  • ## EXAMPLES — at least one, realistic, each followed by a sentence explaining it
  • ## PARAMETERS — alphabetical, one ```yaml block per parameter and **nothing else fenced in this section**, including the standard -Connection and -Verbose blocks copied verbatim from the sibling
  • ## RELATED LINKS

The YAML fields must agree with the attributes exactly — see docs-sync for the field mapping.

6. Changelog

One line under [Current nightly] → Added, cmdlet name in backticks, ending with a link to the PR or issue. Match the surrounding entries' tone: what it does and why someone would use it, not "added new cmdlet".

7. Build

dotnet build src/PnP.PowerShell.sln

Warning-clean. Do not touch src/Tests.

8. Hand over

Report:

  • Files created or changed
  • The sibling you modelled on
  • Inferred, not verified — every API shape, response field and permission scope, each with the Learn URL it came from
  • The invocation a maintainer should run against a tenant to verify, including which connection type (delegated and app-only both, where the cmdlet supports both)
  • Anything you could not resolve and what would settle it

Do not describe the result as tested, working, or verified. It has been compiled, and that is all.

© pnp, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/cmdlet-scaffolder of pnp/powershell.

Open the folder on GitHubat commit 947ac5e

Compare with similar skills

Cmdlet Scaffolder next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Cmdlet Scaffolder compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cmdlet Scaffolder this skillpnp/powershell905—~1.3kAutomated safety check: PassMIT
Release PreparationMichaelGrafnetter/DSInternals2k—~752Automated safety check: PassMIT
Validate Release-Note Code Samplesdotnet/core22k—~1.4kAutomated safety check: PassMIT
Entra Agent Idmicrosoft/GitHub-Copilot-for-Azure2553 repos~4kAutomated safety check: PassMIT
CLI Microsoft365 Scriptpnp/cli-microsoft365-mcp-server131—~3.3kAutomated safety check: PassMIT
Entra Agent Usergithub/awesome-copilot40k1 repos~2.3kAutomated safety check: PassMIT

Similar skills

  • Release Preparation

    MichaelGrafnetter/DSInternals

    Prepare the DSInternals project for a new release by updating version numbers, release notes, and changelog.

    2k GitHub stars~752 tokensUpdated 26 days ago
    DevelopmentAuto-check passed
  • Builds and runs the code snippets behind .NET release-note features against the exact milestone SDK, and records what must change to move maintained samples to a new preview.

    22k GitHub stars~1.4k tokensUpdated today
    DevelopmentAuto-check passed
  • Entra Agent Id

    microsoft/GitHub-Copilot-for-Azure

    Official

    Provision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token exchange (fmipath, OBO, cross-tenant)…

    255 GitHub starsUsed in 3 repos~4k tokens
    Backend & APIsAuto-check passed
  • CLI Microsoft365 Script

    pnp/cli-microsoft365-mcp-server

    Write PowerShell scripts using CLI for Microsoft 365 commands to automate Microsoft 365 management tasks.

    131 GitHub stars~3.3k tokensUpdated 3 days ago
    Documents & OfficeAuto-check passed
  • Entra Agent User

    github/awesome-copilot

    Official

    Create Agent Users in Microsoft Entra ID from Agent Identities, enabling AI agents to act as digital workers with user identity capabilities in Microsoft 365 and Azure environments.

    40k GitHub starsUsed in 1 repo~2.3k tokens
    Documents & OfficeAuto-check passed
  • Auditing Azure Active Directory Configuration

    mukul975/Anthropic-Cybersecurity-Skills

    Auditing Microsoft Entra ID (Azure Active Directory) configuration to identify risky authentication policies, overly permissive role assignments, stale accounts, conditional access gaps, and guest…

    34k GitHub stars~3k tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed

More from pnp/powershell

All 9 skills in this repo
  • Dotnet Standards

    pnp/powershell

    C 12 / .NET 8 and PowerShell cmdlet design rules for this repository - naming, output and error channels, parameter validation, ShouldProcess, async, culture, cross-platform and ALC constraints.

    905 GitHub stars~2.1k tokensUpdated yesterday
    Auto-check passed
  • Issue Triage

    pnp/powershell

    Take a PnP PowerShell GitHub issue, find the cmdlet that owns it, trace the code path, and decide whether the cause is in this repo or in PnP Framework, PnP Core SDK or the service.

    905 GitHub stars~1.8k tokensUpdated yesterday
    Auto-check passed
  • New Cmdlet

    pnp/powershell

    The conventions a PnP PowerShell cmdlet must satisfy - base class selection, permission attributes, PipeBinds, parameter validation, Graph and CSOM call patterns, and the documentation plus…

    905 GitHub stars~1.6k tokensUpdated yesterday
    Auto-check passed
  • Permissions Auditor

    pnp/powershell

    Audit PnP PowerShell permission attributes against the APIs a cmdlet actually calls and against its documentation.

    905 GitHub stars~2.1k tokensUpdated yesterday
    Auto-check passed
  • API Surface Diff

    pnp/powershell

    Compare the public cmdlet surface of the current branch against dev - names, aliases, parameters, types, mandatory flags, parameter sets, output types, permissions - and classify each change as…

    905 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Code Review

    pnp/powershell

    Review changes to PnP PowerShell for the failure modes this repository actually ships - silently ignored input, unpaged Graph collections, the wrong base class, permission attributes that do not…

    905 GitHub stars~2.3k tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Cmdlet Scaffolder

What does Cmdlet Scaffolder do?

Generate a new PnP PowerShell cmdlet modelled on an existing sibling - class with the right base class and permission attributes, the documentation page, and the changelog entry. Cmdlet Scaffolder is an agent skill from pnp/powershell. Generate a new PnP PowerShell cmdlet modelled on an existing sibling - class with the right base class and permission attributes, the documentation page, and the changelog entry.

When should I use Cmdlet Scaffolder?

Cmdlet Scaffolder fits situations like: adding a cmdlet for a Graph; tasks that involve Changelog and release notes.

How do I install Cmdlet Scaffolder in Claude Code?

Run `npx skills add pnp/powershell --skill cmdlet-scaffolder -a claude-code`. Or copy the skill folder (.agents/skills/cmdlet-scaffolder in pnp/powershell) into .claude/skills/cmdlet-scaffolder in your project. Claude Code loads it when a task matches its description.

How do I install Cmdlet Scaffolder in Codex?

Run `npx skills add pnp/powershell --skill cmdlet-scaffolder -a codex`. Or copy the skill folder (.agents/skills/cmdlet-scaffolder in pnp/powershell) into .agents/skills/cmdlet-scaffolder in your project. Codex loads it when a task matches its description.

Can I use Cmdlet Scaffolder in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add pnp/powershell --skill cmdlet-scaffolder -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cmdlet-scaffolder, .gemini/skills/cmdlet-scaffolder, .github/skills/cmdlet-scaffolder and .opencode/skills/cmdlet-scaffolder in your project.

What does Cmdlet Scaffolder need to run?

Going by SKILL.md and its folder, Cmdlet Scaffolder needs the command-line tools its instructions call (git and dotnet).

Does Cmdlet Scaffolder access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Cmdlet Scaffolder safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Cmdlet Scaffolder use?

Cmdlet Scaffolder is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Cmdlet Scaffolder use?

About 1.3k tokens (SKILL.md is roughly 5.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Cmdlet Scaffolder?

Skills that share tags, products or a category with Cmdlet Scaffolder: Release Preparation (MichaelGrafnetter/DSInternals, 2k stars), Validate Release-Note Code Samples (dotnet/core, 22k stars), Entra Agent Id (microsoft/GitHub-Copilot-for-Azure, 255 stars) and CLI Microsoft365 Script (pnp/cli-microsoft365-mcp-server, 131 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cmdlet Scaffolder?

pnp (a GitHub organization) maintains it in pnp/powershell, which has 905 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 7, 2026.

Source: pnp/powershell on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.