Speckit Constitution
WeihanLi/WeihanLi.Common
Create or update the project constitution from interactive or provided principle inputs, ensuring all dependent templates stay in sync.
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.
$ npx skills add pnp/powershell --skill dotnet-standards -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install pnp/powershell dotnet-standards --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/pnp/powershell.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/dotnet-standards .claude/skills/dotnet-standards && rm -rf skills-srcUse ~/.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/
Install the "dotnet-standards" agent skill from https://github.com/pnp/powershell/tree/dev/.agents/skills/dotnet-standards into .claude/skills/dotnet-standards/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dotnet-standards", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/pnp/powershell/tree/dev/.agents/skills/dotnet-standardsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add pnp/powershell --skill dotnet-standards -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install pnp/powershell dotnet-standards --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pnp/powershell.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/dotnet-standards .agents/skills/dotnet-standards && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "dotnet-standards" agent skill from https://github.com/pnp/powershell/tree/dev/.agents/skills/dotnet-standards into .agents/skills/dotnet-standards/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dotnet-standards", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add pnp/powershell --skill dotnet-standards -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install pnp/powershell dotnet-standards --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pnp/powershell.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/dotnet-standards .cursor/skills/dotnet-standards && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "dotnet-standards" agent skill from https://github.com/pnp/powershell/tree/dev/.agents/skills/dotnet-standards into .cursor/skills/dotnet-standards/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dotnet-standards", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/pnp/powershell.git --path .agents/skills/dotnet-standards--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add pnp/powershell --skill dotnet-standards -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install pnp/powershell dotnet-standards --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pnp/powershell.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/dotnet-standards .gemini/skills/dotnet-standards && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "dotnet-standards" agent skill from https://github.com/pnp/powershell/tree/dev/.agents/skills/dotnet-standards into .gemini/skills/dotnet-standards/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dotnet-standards", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install pnp/powershell dotnet-standardsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add pnp/powershell --skill dotnet-standards -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/pnp/powershell.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/dotnet-standards .github/skills/dotnet-standards && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "dotnet-standards" agent skill from https://github.com/pnp/powershell/tree/dev/.agents/skills/dotnet-standards into .github/skills/dotnet-standards/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dotnet-standards", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add pnp/powershell --skill dotnet-standards -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install pnp/powershell dotnet-standards --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pnp/powershell.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/dotnet-standards .opencode/skills/dotnet-standards && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "dotnet-standards" agent skill from https://github.com/pnp/powershell/tree/dev/.agents/skills/dotnet-standards into .opencode/skills/dotnet-standards/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dotnet-standards", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
dotnet-standardsC 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.
Dotnet Standards is an agent skill from 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. Use when writing or reviewing any C in this repo, cmdlet or otherwise.
Its SKILL.md is about 2.1k 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. It works with .NET, PowerShell, C# and Microsoft 365. The licence is MIT.
Read from SKILL.md and the folder at commit 947ac5e. It shows what the files ask for, not the result of running them.
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.
Shell commands in SKILL.md call:
dotnetFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Dotnet Standards loads about 2.1k tokens when it runs. Until then it costs about 71 tokens; SKILL.md has 964 words of instructions outside code blocks.
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.
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.
The full file from pnp/powershell at commit 947ac5e, republished under its MIT licence (© pnp). 964 words, ~2,085 tokens.
.claude/skills/dotnet-standards/SKILL.md (or your agent's skills folder).C# 12 / .NET 8 and PowerShell cmdlet design rules for this repository. Referenced by
code-review, new-cmdlet and
cmdlet-scaffolder.
Two rule sets apply at once, and where they disagree the PowerShell one wins: this is a module whose users are shell users, not a class library.
These come from Microsoft's cmdlet development guidelines. Violations are user-facing.
Naming
Verb-PnPNoun, one approved verb (Get-Verb), singular noun even when returning many objects.PnP prefix always. New cmdlet names should not collide with other modules' nouns.-Identity, -Connection, -Force, -Includes, -Batch have established meanings.Output
WriteObject(x) — and WriteObject(collection, true) to
enumerate, so the pipeline sees items rather than one array.[OutputType(typeof(T))] on every cmdlet that returns something.Console.WriteLine. Channels: WriteObject (data), WriteWarning (recoverable),
WriteVerbose (diagnostics), WriteDebug, WriteProgress (long operations).null to mean "not found" where the user asked for a specific item — write an
error. Returning nothing for a filter that matched nothing is correct.Input
[Parameter] per parameter with deliberate Mandatory, Position, ValueFromPipeline.
Positional only for the one obvious parameter; everything else named.ListPipeBind, SitePipeBind, …) so a name, an ID or an object all bind.ParameterSpecified(nameof(X)) to distinguish "not supplied" from "supplied as the default".[ValidateNotNull] on any reference-typed parameter dereferenced in ExecuteCmdlet — otherwise
-Param $null is a NullReferenceException rather than a message.[ValidateSet] / [ValidateRange] / [ValidateCount] rather than hand-rolled checks in the body.SwitchParameter over bool for flags. A bool parameter forces -Flag $true and reads
wrong in PowerShell.Safety
Anything destructive or overwriting: SupportsShouldProcess = true, then actually call
ShouldProcess. Adding a prompt where none existed breaks unattended scripts — see
api-surface-diff.
-Force may bypass ShouldContinue, never ShouldProcess. ShouldProcess is what implements
-WhatIf and -Confirm, so short-circuiting it breaks simulation:
if (Force || ShouldContinue($"Remove {Identity}?", Resources.Confirm)) // correct — the repo's pattern
if (Force || ShouldProcess($"{target}", "Remove")) // WRONG — -Force -WhatIf deletesIn the second form -Force short-circuits the ||, ShouldProcess is never called, and
-Force -WhatIf performs the operation instead of simulating it. Where both are wanted, gate on
ShouldProcess first and use Force || only on the inner ShouldContinue. This is a live defect
in src/Commands/Apps/RemoveEntraIDServicePrincipalAppRoleAssignment.cs:52 — flag it if you touch
that file, and never copy that line as a model.
Never hardcode credentials, tenant names or endpoints.
Errors
ThrowTerminatingError(new ErrorRecord(...)) for fatal errors, with a meaningful
ErrorCategory and the object that caused it. Prefer it over a bare throw — and this is not
only style, it changes what the user receives:WriteError and ThrowTerminatingError surface under -ErrorAction Stop as a pipeline stop,
which PnPConnectedCmdlet.ProcessRecord rethrows untouched
(src/Commands/Base/PnPConnectedCmdlet.cs:57-60). Your ErrorRecord, its category and its
target object survive intact.throw reaches the generic catch. Under the default error action it becomes
PSInvalidOperationException with the original as inner; under -ErrorAction Stop or
SilentlyContinue it becomes new ErrorRecord(new Exception(message), source, ErrorCategory.NotSpecified, null) — type, inner exception, category and target object are all
lost, so everything the user needs must be in the message text. Under -ErrorAction Ignore
LogError is skipped, so nothing is written at all.Resources.resx, referenced as Resources.MessageName.EnforceCodeStyleInBuild and EnableNETAnalyzers are on. Warnings are findings.
Style
_camelCase for
private fields; I prefix on interfaces.var where the type is evident from the right-hand side.src/Commands/Enums/, models in their own files — do not group
several types in one model file.[a, b]) are fine in new code; do not churn
existing files to adopt them.Correctness
?. and ?? over nested null checks; do not use ! to silence a nullable warning you have not
actually reasoned about.using/await using for everything IDisposable. HttpClient is not per-call disposable — use
the connection's existing client rather than newing one up.CultureInfo.InvariantCulture on every ToString/Parse of a date or number that crosses a wire
or a file. A format string like "yyyy-MM-ddTHH:mm:ssZ" takes its separators from the current
culture and yields 13.53.41 under some locales.StringComparison.OrdinalIgnoreCase for identifiers, URLs and property names. Never
culture-sensitive comparison for machine-readable strings.Async
SomethingAsync(...).GetAwaiter().GetResult(). Do not use .Result or .Wait(), and do not
introduce async void.ConfigureAwait churn to existing call sites.Cross-platform — .NET 8 on Windows, Linux and macOS
Path.Combine, Path.DirectorySeparatorChar. No backslash string surgery, no drive letters.Environment.NewLine (what StringBuilder.AppendLine writes) with hardcoded \r\n in
generated files — the output then churns purely from changing OS.Dependencies and the ALC
Core; every other dependency is private and goes to Common. Adding a reference without
placing it correctly breaks loading at runtime, not at build.Performance
DefaultRetrievalExpressions / EnsureProperties, $select
on Graph. Do not fetch a full field collection to read one field.ExecuteQueryRetry(), never ExecuteQuery().GraphRequestHelper.GetResultCollection follows @odata.nextLink;
Get does not and silently returns the first page only.dotnet build src/PnP.PowerShell.slnMust be warning-clean. src/Tests is off limits — do not add or modify files there.
A clean build is where your work stops. Never commit, push, or open a PR — see Human in the loop.
© pnp, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/dotnet-standards of pnp/powershell.
Open the folder on GitHubat commit 947ac5e
Dotnet Standards 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Dotnet Standards this skillpnp/powershell | 905 | — | ~2.1k | Automated safety check: Pass | MIT | |
| Speckit ConstitutionWeihanLi/WeihanLi.Common | 242 | 11 repos | ~2.1k | Automated safety check: Pass | Apache-2.0 | |
| Analyzing .NET Performancedotnet/skills | 5.6k | 3 repos | ~3.1k | Automated safety check: Pass | MIT | |
| Add Analyzerdotnet/roslynator | 3.5k | — | ~1.3k | Automated safety check: Pass | Custom licence | |
| GitVersion .NET DevelopmentGitTools/GitVersion | 3.1k | — | ~1.7k | Automated safety check: Pass | MIT | |
| Code Reviewdotnet/macios | 2.9k | — | ~1.7k | Automated safety check: Pass | Custom licence |
WeihanLi/WeihanLi.Common
Create or update the project constitution from interactive or provided principle inputs, ensuring all dependent templates stay in sync.
dotnet/skills
Scans C# and .NET code for about 50 performance anti-patterns and reports prioritized findings with concrete fixes, at a scan depth you choose.
dotnet/roslynator
A skill your agent uses when adding a new RCS diagnostic in roslynator (RCS0 formatting, RCS1 general, RCS9 code-analysis), wiring roslynator EditorConfig options, or when docs say CHANGELOG.md…
GitTools/GitVersion
Gives repository-specific .NET guidance for GitVersion: build and test commands, central package management, project layout and coding conventions.
dotnet/macios
Review dotnet/macios PRs against established rules. An agent skill from dotnet/macios.
dotnet/roslynator
A skill your agent uses when adding a Roslynator code fix for C compiler error CS or RCF, editing Diagnostics.xml or CodeFixes.xml, or when compiler-diagnostic-fixes-testing.md shows…
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.
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.
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…
pnp/powershell
Audit PnP PowerShell permission attributes against the APIs a cmdlet actually calls and against its documentation.
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…
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…
Works with
Categories
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. Dotnet Standards is an agent skill from pnp/powershell.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.
Dotnet Standards fits situations like: reviewing any C in this repo.
Run `npx skills add pnp/powershell --skill dotnet-standards -a claude-code`. Or copy the skill folder (.agents/skills/dotnet-standards in pnp/powershell) into .claude/skills/dotnet-standards in your project. Claude Code loads it when a task matches its description.
Run `npx skills add pnp/powershell --skill dotnet-standards -a codex`. Or copy the skill folder (.agents/skills/dotnet-standards in pnp/powershell) into .agents/skills/dotnet-standards in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add pnp/powershell --skill dotnet-standards -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/dotnet-standards, .gemini/skills/dotnet-standards, .github/skills/dotnet-standards and .opencode/skills/dotnet-standards in your project.
Going by SKILL.md and its folder, Dotnet Standards needs the command-line tools its instructions call (dotnet).
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
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.
Dotnet Standards is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.1k tokens (SKILL.md is roughly 8.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Dotnet Standards: Speckit Constitution (WeihanLi/WeihanLi.Common, 242 stars), Analyzing .NET Performance (dotnet/skills, 5.6k stars), Add Analyzer (dotnet/roslynator, 3.5k stars) and GitVersion .NET Development (GitTools/GitVersion, 3.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
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.