agentleFS
pnppnp/powershell/.agents/skills/docs-sync/SKILL.md

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
  1. Very specific:

    Verify that every cmdlet's parameter surface in C# matches its documentation/<Verb-PnPNoun>.md.

    line 8
  2. Distinctive:

    Every YAML field agrees with the attributes, per the mapping above.

    line 67
  3. Distinctive:

    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 …

    line 124

“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.

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

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: False

Field mapping

YAML keyC# sourceNotes
TypeProperty/field typeUse the PowerShell-facing name: String[], SwitchParameter, PnPConnection, the PipeBind type.
Parameter SetsParameterSetName(All) when the parameter appears in every set or none is named. Otherwise the exact set names, comma separated.
Aliases[Alias]Empty when absent.
RequiredMandatoryPer parameter set — a parameter mandatory in one set only must not read True for (All).
PositionPositionNamed when unset; otherwise the integer.
Accept pipeline inputValueFromPipeline / ValueFromPipelineByPropertyNameTrue (ByValue), True (ByPropertyName), True (ByValue, ByPropertyName), or False.
Accept wildcard characters[SupportsWildcards]False unless declared.
Default valueInitialiserNone 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: ## SYNTAX has one fenced powershell block per set, and the sets named there match ParameterSetName values in the class. A restructured parameter set that ## SYNTAX still describes the old way is a common and confusing drift.

Per file

  • Parameter subsections under ## PARAMETERS are listed alphabetically.
  • The boilerplate -Connection and -Verbose sections 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>.html
    title and the online version slug must both equal the real cmdlet name.
  • ## PARAMETERS contains only ```yaml fenced blocks. Any other fenced block there risks the external help build. Examples belong under ## EXAMPLES with ```powershell fences. This is a build-breaking rule, so report it as high severity.
  • ## RELATED LINKS present.

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

  1. Take a scope: changed files, one folder under src/Commands/, or the whole repository.
  2. Build the cmdlet → doc pairing. Report unpaired items on both sides first.
  3. For each pair, extract both parameter tables and diff them field by field.
  4. 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.

Download now (ZIP)

  • Other versions43 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 43

    1. openai/openai-agents-python★ 30ksame name
    2. redis/node-redis★ 18ksame name
    3. redis/ioredis★ 15ksame name
    4. fossasia/visdom★ 10ksame name
    5. Kiln-AI/Kiln★ 5.2ksame name
    6. danielmeppiel/apm★ 4.2ksame name
    7. microsoft/apm★ 4.2ksame name
    8. openai/openai-agents-js★ 4ksame name
    9. strands-agents/box★ 490same name
    10. 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.
    • GoogleSkill

      tdd

      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

    • MicrosoftSkill

      release

      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

    • MicrosoftSkill

      handoff

      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.

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.