docs-sync
Skill909 starsChanged 2 months agoMITView on GitHub
Check PnP PowerShell cmdlet parameter surfaces in C# against their documentation/*.md platyPS metadata - types, parameter sets, mandatory, position, pipeline binding, aliases - plus missing or orphaned pages. Use after changing cmdlet parameters, or to sweep src/Commands/ for documentation drift.
We split this skill into the rules it gives an agent
3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 33 edited versions we read keep these.
2
Distinctive
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
- Very specific: line 8
Verify that every cmdlet's parameter surface in C# matches its documentation/<Verb-PnPNoun>.md.
- Distinctive: line 67
Every YAML field agrees with the attributes, per the mapping above.
- Distinctive: line 124
When asked to fix, change only what you can justify from the code, keep the surrounding prose and wording style of the file, and never …
“Common” is measured: kept by at least 6 in 10 of the 33 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Playbook: docs-sync
Verify that every cmdlet's parameter surface in C# matches its documentation/<Verb-PnPNoun>.md.
Why this is a defect, not hygiene
documentation/*.md is the shipped product. It builds the published site at
https://pnp.github.io/powershell/ and the external help file (PnP.PowerShell.dll-Help.xml) that
backs Get-Help in the user's console. A parameter documented as optional but declared mandatory
sends the user into an error they cannot explain from the docs. Drift here is user-facing.
There are ~849 documentation files and ~850 cmdlets. This is a fan-out job: mechanical, exact, and far too large to do by hand.
Report drift in the session. Never open an issue or PR for it — see Human in the loop. A sweep across 850 cmdlets could otherwise produce a great many of them.
The two surfaces being compared
C# side — attributes on each public property/field of the cmdlet class:
[Parameter(Mandatory = true, ValueFromPipeline = true, Position = 0, ParameterSetName = "ByName")]
[Alias("Name")]
[ValidateNotNull]
public ListPipeBind Identity { get; set; }Markdown side — a platyPS YAML block per parameter under ## PARAMETERS:
Type: String[]
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: FalseField mapping
| YAML key | C# source | Notes |
Type | Property/field type | Use the PowerShell-facing name: String[], SwitchParameter, PnPConnection, the PipeBind type. |
Parameter Sets | ParameterSetName | (All) when the parameter appears in every set or none is named. Otherwise the exact set names, comma separated. |
Aliases | [Alias] | Empty when absent. |
Required | Mandatory | Per parameter set — a parameter mandatory in one set only must not read True for (All). |
Position | Position | Named when unset; otherwise the integer. |
Accept pipeline input | ValueFromPipeline / ValueFromPipelineByPropertyName | True (ByValue), True (ByPropertyName), True (ByValue, ByPropertyName), or False. |
Accept wildcard characters | [SupportsWildcards] | False unless declared. |
Default value | Initialiser | None when there is no meaningful default. |
What to check
Per parameter
- Present in both. A parameter in code but not in the doc is invisible to users; a parameter in the doc but not in code is a promise the module does not keep.
- Every YAML field agrees with the attributes, per the mapping above.
- Multiple parameter sets:
## SYNTAXhas one fencedpowershellblock per set, and the sets named there matchParameterSetNamevalues in the class. A restructured parameter set that## SYNTAXstill describes the old way is a common and confusing drift.
Per file
- Parameter subsections under
## PARAMETERSare listed alphabetically. - The boilerplate
-Connectionand-Verbosesections are present for connected cmdlets, with the standard wording used by sibling files. - Front matter is intact and consistent:
Module Name: PnP.PowerShell title: <Verb-PnPNoun> schema: 2.0.0 applicable: <workloads> external help file: PnP.PowerShell.dll-Help.xml online version: https://pnp.github.io/powershell/cmdlets/<Verb-PnPNoun>.htmltitleand theonline versionslug must both equal the real cmdlet name. ## PARAMETERScontains only```yamlfenced blocks. Any other fenced block there risks the external help build. Examples belong under## EXAMPLESwith```powershellfences. This is a build-breaking rule, so report it as high severity.## RELATED LINKSpresent.
Per repository
- A documentation file for every cmdlet, and a cmdlet for every documentation file. Removed cmdlets leaving orphan pages is a recurring drift.
- Filename equals the cmdlet name exactly, including case.
- Cmdlets carrying
[Alias("Old-PnPName")]— the alias should be discoverable from the page, and no separate stale page should exist for the old name.
Finding the pair
The class filename does not reliably match the cmdlet name. Resolve through the attribute — search
for the pattern \[Cmdlet\( across src/Commands/**/*.cs with your search tool. This sweep needs no
shell; the agent profiles for it deliberately grant only read and search tools.
[Cmdlet(VerbsCommon.Get, "PnPList")] → Get-PnPList → documentation/Get-PnPList.md. Map the
Verbs* constant to its verb (VerbsCommon.Get → Get, VerbsLifecycle.Request → Request, and
so on) rather than assuming the class name carries it.
Procedure
- Take a scope: changed files, one folder under
src/Commands/, or the whole repository. - Build the cmdlet → doc pairing. Report unpaired items on both sides first.
- For each pair, extract both parameter tables and diff them field by field.
- Report drift. Do not fix silently unless asked — the correct side is not always the code. A doc describing behaviour the code lost may be evidence of a regression.
Reporting
Group by cmdlet, then by parameter. For each: the field, the C# value, the markdown value, and which side you believe is wrong with a reason. Finish with counts — cmdlets checked, clean, drifted, unpaired — so a partial run cannot be mistaken for a full one.
When asked to fix, change only what you can justify from the code, keep the surrounding prose and wording style of the file, and never reformat an untouched YAML block.
Other versions43 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 43
- openai/openai-agents-python★ 30ksame name
- redis/node-redis★ 18ksame name
- redis/ioredis★ 15ksame name
- fossasia/visdom★ 10ksame name
- Kiln-AI/Kiln★ 5.2ksame name
- danielmeppiel/apm★ 4.2ksame name
- microsoft/apm★ 4.2ksame name
- openai/openai-agents-js★ 4ksame name
- strands-agents/box★ 490same name
- kjnez/claude-code-django★ 177same name
33 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use tdd, release and 1 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
GoogleSkilltdd
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
Also in 4 projects that use this
MicrosoftSkillrelease
Use ONLY when the user explicitly asks to cut/publish a Huabu desktop release or tag a version. Performs an outward action — bumps the version in apps/desktop/package.json, commits + annotated-tags vX.Y.Z, and pushes the branch + tag. That tag push auto-builds the macOS/Windows installers and publishes a GitHub Release. Provides `status`, `bump`, `tag-push`, and a one-command `run` (bump → tag-push).
Also in 3 projects that use this
MicrosoftSkillhandoff
Compact the current conversation into a handoff document for another agent to pick up.
Also in 3 projects that use this
In this repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- pages/llms.txtllms.txt
- api-surface-diffSkill
- cmdlet-scaffolderSkill
- code-reviewSkill
- dotnet-standardsSkill
- issue-triageSkill
- new-cmdletSkill
- permissions-auditorSkill
- code-reviewSkill
- new-cmdletSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

