[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EVFVZD4BZ6ZFYRMSF9WGH6":3,"skill-same:01M7EVFVZD4BZ6ZFYRMSF9WGH6":45},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7EVFVZD4BZ6ZFYRMSF9WGH6","ams-powershell-pro",null,"TanNhatCMS\u002Fjarvis","TanNhatCMS","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F113796420?v=4","01M753MV17KG5CD3152G3WQEQY","KietNT","01M7EKEDYVYQ6PWVJJMZ911VMX",0,"MIT","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-powershell-pro\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: powershell-pro\ndescription: Professional PowerShell: cmdlets, pipeline patterns, modules, remoting, and Windows automation. Use when writing, reviewing, or structuring PowerShell scripts and modules.\ncategory: development\n---\n\n# PowerShell Pro\n\n## Overview\n\nPowerShell is **an object pipeline, not a text pipeline** — cmdlets pass rich .NET objects, which\neliminates the parsing fragility of text-based shells. Professional PowerShell means thinking in\nobjects and pipelines, writing advanced functions with proper parameters, building modules instead\nof script sprawl, and handling errors with the structured mechanisms the language provides.\n\nThe through-line: objects in, objects out — and scripts robust enough to run unattended.\n\n## When to use\n\n- Writing or reviewing PowerShell for Windows automation or cross-platform scripting.\n- Building reusable functions, modules, or DSC configurations.\n- Administering systems via remoting (WinRM\u002FSSH).\n- Debugging pipeline, scoping, or error-handling issues.\n- Migrating from batch\u002FCMD or ad-hoc commands to maintainable scripts.\n\n## Core concepts\n\n- **The pipeline passes objects.** `Get-Process | Where-Object CPU -gt 100 | Stop-Process` —\n  no text parsing, no `awk`. Learn the core cmdlets deeply (`Where-Object`, `ForEach-Object`,\n  `Select-Object`, `Sort-Object`, `Group-Object`, `Measure-Object`) — they compose into most\n  solutions.\n- **Advanced functions.** `[CmdletBinding()]` + `param()` with types, validation attributes\n  (`[ValidateNotNullOrEmpty()]`, `[ValidateSet()]`), `ValueFromPipeline`, and `begin`\u002F`process`\u002F\n  `end` blocks. This turns scripts into cmdlet-like tools with `-WhatIf`\u002F`-Confirm` support\n  (`SupportsShouldProcess`) — free safety for destructive operations.\n- **Error handling: two kinds.** Terminating vs non-terminating errors; `$ErrorActionPreference =\n  'Stop'` to make scripts fail fast; `try`\u002F`catch`\u002F`finally` for structured handling. Know which\n  errors terminate by default and set the preference deliberately in scripts.\n- **Modules over script sprawl.** `.psm1` modules with exported functions, manifest (`.psd1`)\n  with versioning, published to a repository (PSGallery or internal). Dot-sourcing 20 script files\n  is not a module system.\n- **Remoting and sessions.** `Invoke-Command -ComputerName` \u002F `New-PSSession` for remote execution;\n  prefer fan-out over RDP-clicking. Mind the double-hop (CredSSP\u002F Kerberos delegation) and use\n  Just Enough Administration (JEA) for least-privilege delegation.\n- **Desired State Configuration (DSC).** Declarative system state (\"this feature installed, this\n  service running\") — idempotent by design. The right tool when imperative scripts keep drifting.\n\n## Practical workflow\n\n1. **Start scripts with intent.**\n   ```powershell\n   [CmdletBinding(SupportsShouldProcess)]\n   param(\n     [Parameter(Mandatory, ValueFromPipelineByPropertyName)]\n     [ValidateNotNullOrEmpty()][string]$ComputerName\n   )\n   $ErrorActionPreference = 'Stop'\n   ```\n2. **Write advanced functions.** One verb-noun function per file in a module (`Get-`,\n   `Set-`, `New-`, `Remove-`, `Test-`, `Invoke-` per approved verbs); pipeline-aware via\n   `process {}` blocks.\n3. **Handle errors structurally.** `try\u002Fcatch` around risky operations; `-ErrorAction Stop` to\n   promote specific calls; always log context (which computer, which operation) — remote failures\n   without context are undebuggable.\n4. **Make it idempotent.** `Test-` functions that check state before `Set-` changes it; scripts\n   safe to rerun. Destructive operations behind `ShouldProcess` (`-WhatIf` support).\n5. **Test with Pester.** Unit-test functions with mocked cmdlets; integration-test against lab\n   machines. Pester is the standard — use it.\n6. **Operate securely.** Execution policy is not a security boundary (it's a guardrail); sign\n   scripts in production; never hardcode credentials — use secret management (SecretManagement\n   module, vaults); constrain remoting endpoints with JEA.\n\nIdiomatic snippets:\n\n```powershell\n# Advanced function: pipeline-aware, validated, WhatIf-safe\nfunction Remove-StaleProfile {\n    [CmdletBinding(SupportsShouldProcess, ConfirmImpact='High')]\n    param(\n        [Parameter(Mandatory, ValueFromPipelineByPropertyName)]\n        [ValidateNotNullOrEmpty()][string]$UserName,\n        [int]$OlderThanDays = 90\n    )\n    process {\n        $profile = Get-UserProfile $UserName\n        if ($profile.LastUse -lt (Get-Date).AddDays(-$OlderThanDays)) {\n            if ($PSCmdlet.ShouldProcess($UserName, 'Remove stale profile')) {\n                Remove-UserProfile $profile\n            }\n        }\n    }\n}\n```\n\n## Common pitfalls\n\n- **Text-parsing objects.** Converting rich objects to strings then regexing them — defeats the\n  entire platform. Stay in the object pipeline.\n- **Unscoped variables and scope bugs.** `$script:`\u002F`$global:` misuse, or assuming a variable set\n  inside `ForEach-Object` persists as expected. Learn the scopes; prefer function parameters and\n  return values.\n- **Non-terminating errors ignored.** A failed cmdlet in a loop that keeps going silently because\n  `$ErrorActionPreference` wasn't set. Decide the failure policy per script.\n- **`Invoke-Expression` on dynamic strings.** PowerShell's `eval` — injection risk and debugging\n  hell. Use scriptblocks, splatting (`@params`), and the call operator (`&`) instead.\n- **Hardcoded credentials.** Passwords in scripts, in history, in source control. Secret\n  management modules exist — use them; rotate anything ever committed.\n- **One giant script.** 1,000-line `Do-Everything.ps1` with no functions. Modularize: functions\n  → module → manifest → repository.\n- **Ignoring `-WhatIf`.** Destructive operations without `SupportsShouldProcess` — no dry-run, no\n  safety net. If it can destroy, it supports `-WhatIf`.\n","# PowerShell Pro\n\n## Overview\n\nPowerShell is **an object pipeline, not a text pipeline** — cmdlets pass rich .NET objects, which\neliminates the parsing fragility of text-based shells. Professional PowerShell means thinking in\nobjects and pipelines, writing advanced functions with proper parameters, building modules instead\nof script sprawl, and handling errors with the structured mechanisms the language provides.\n\nThe through-line: objects in, objects out — and scripts robust enough to run unattended.\n\n## When to use\n\n- Writing or reviewing PowerShell for Windows automation or cross-platform scripting.\n- Building reusable functions, modules, or DSC configurations.\n- Administering systems via remoting (WinRM\u002FSSH).\n- Debugging pipeline, scoping, or error-handling issues.\n- Migrating from batch\u002FCMD or ad-hoc commands to maintainable scripts.\n\n## Core concepts\n\n- **The pipeline passes objects.** `Get-Process | Where-Object CPU -gt 100 | Stop-Process` —\n  no text parsing, no `awk`. Learn the core cmdlets deeply (`Where-Object`, `ForEach-Object`,\n  `Select-Object`, `Sort-Object`, `Group-Object`, `Measure-Object`) — they compose into most\n  solutions.\n- **Advanced functions.** `[CmdletBinding()]` + `param()` with types, validation attributes\n  (`[ValidateNotNullOrEmpty()]`, `[ValidateSet()]`), `ValueFromPipeline`, and `begin`\u002F`process`\u002F\n  `end` blocks. This turns scripts into cmdlet-like tools with `-WhatIf`\u002F`-Confirm` support\n  (`SupportsShouldProcess`) — free safety for destructive operations.\n- **Error handling: two kinds.** Terminating vs non-terminating errors; `$ErrorActionPreference =\n  'Stop'` to make scripts fail fast; `try`\u002F`catch`\u002F`finally` for structured handling. Know which\n  errors terminate by default and set the preference deliberately in scripts.\n- **Modules over script sprawl.** `.psm1` modules with exported functions, manifest (`.psd1`)\n  with versioning, published to a repository (PSGallery or internal). Dot-sourcing 20 script files\n  is not a module system.\n- **Remoting and sessions.** `Invoke-Command -ComputerName` \u002F `New-PSSession` for remote execution;\n  prefer fan-out over RDP-clicking. Mind the double-hop (CredSSP\u002F Kerberos delegation) and use\n  Just Enough Administration (JEA) for least-privilege delegation.\n- **Desired State Configuration (DSC).** Declarative system state (\"this feature installed, this\n  service running\") — idempotent by design. The right tool when imperative scripts keep drifting.\n\n## Practical workflow\n\n1. **Start scripts with intent.**\n   ```powershell\n   [CmdletBinding(SupportsShouldProcess)]\n   param(\n     [Parameter(Mandatory, ValueFromPipelineByPropertyName)]\n     [ValidateNotNullOrEmpty()][string]$ComputerName\n   )\n   $ErrorActionPreference = 'Stop'\n   ```\n2. **Write advanced functions.** One verb-noun function per file in a module (`Get-`,\n   `Set-`, `New-`, `Remove-`, `Test-`, `Invoke-` per approved verbs); pipeline-aware via\n   `process {}` blocks.\n3. **Handle errors structurally.** `try\u002Fcatch` around risky operations; `-ErrorAction Stop` to\n   promote specific calls; always log context (which computer, which operation) — remote failures\n   without context are undebuggable.\n4. **Make it idempotent.** `Test-` functions that check state before `Set-` changes it; scripts\n   safe to rerun. Destructive operations behind `ShouldProcess` (`-WhatIf` support).\n5. **Test with Pester.** Unit-test functions with mocked cmdlets; integration-test against lab\n   machines. Pester is the standard — use it.\n6. **Operate securely.** Execution policy is not a security boundary (it's a guardrail); sign\n   scripts in production; never hardcode credentials — use secret management (SecretManagement\n   module, vaults); constrain remoting endpoints with JEA.\n\nIdiomatic snippets:\n\n```powershell\n# Advanced function: pipeline-aware, validated, WhatIf-safe\nfunction Remove-StaleProfile {\n    [CmdletBinding(SupportsShouldProcess, ConfirmImpact='High')]\n    param(\n        [Parameter(Mandatory, ValueFromPipelineByPropertyName)]\n        [ValidateNotNullOrEmpty()][string]$UserName,\n        [int]$OlderThanDays = 90\n    )\n    process {\n        $profile = Get-UserProfile $UserName\n        if ($profile.LastUse -lt (Get-Date).AddDays(-$OlderThanDays)) {\n            if ($PSCmdlet.ShouldProcess($UserName, 'Remove stale profile')) {\n                Remove-UserProfile $profile\n            }\n        }\n    }\n}\n```\n\n## Common pitfalls\n\n- **Text-parsing objects.** Converting rich objects to strings then regexing them — defeats the\n  entire platform. Stay in the object pipeline.\n- **Unscoped variables and scope bugs.** `$script:`\u002F`$global:` misuse, or assuming a variable set\n  inside `ForEach-Object` persists as expected. Learn the scopes; prefer function parameters and\n  return values.\n- **Non-terminating errors ignored.** A failed cmdlet in a loop that keeps going silently because\n  `$ErrorActionPreference` wasn't set. Decide the failure policy per script.\n- **`Invoke-Expression` on dynamic strings.** PowerShell's `eval` — injection risk and debugging\n  hell. Use scriptblocks, splatting (`@params`), and the call operator (`&`) instead.\n- **Hardcoded credentials.** Passwords in scripts, in history, in source control. Secret\n  management modules exist — use them; rotate anything ever committed.\n- **One giant script.** 1,000-line `Do-Everything.ps1` with no functions. Modularize: functions\n  → module → manifest → repository.\n- **Ignoring `-WhatIf`.** Destructive operations without `SupportsShouldProcess` — no dry-run, no\n  safety net. If it can destroy, it supports `-WhatIf`.\n",{},"main","af388a77c2fe5e0b4fd879cca4300a0ffa9a6579","skills\u002Fams-powershell-pro",1,"https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis","https:\u002F\u002Fgithub.com\u002FTanNhatCMS","https:\u002F\u002Fmrkiet.name.vn","2026-11-07 14:23:08",{"source":7,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add TanNhatCMS\u002Fjarvis --skill ams-powershell-pro",{"tool":37,"command":38},"bunx","bunx skills add TanNhatCMS\u002Fjarvis --skill ams-powershell-pro",{"tool":40,"command":41},"pnpm","pnpm dlx skills add TanNhatCMS\u002Fjarvis --skill ams-powershell-pro","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-powershell-pro\u002FSKILL.md",true,[],[46,53,61,68,75,82],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":18},"01M7EWYJR0J8DARY7E59Z6Y9MV","web-scrape","Turn web pages into LLM-ready markdown via the Firecrawl API (renders JS, anti-bot handling). Use when browser_open\u002Ffetch fails on JS-heavy pages, or when you need clean markdown\u002Fstructured extraction from a site. Requires FIRECRAWL_API_KEY.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fweb-scrape\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":57,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":18},"01M7EWYBN5P6F2AJG3FR24T9BP","design-taste-frontend","tasteskill v2, the anti-slop frontend skill. Art direction for websites, distilled from a study of 247 curated gallery sites (One Page Love, Awwwards Sites of the Day). Deals researched directions (idea, composition, type, palette, photographs, section blueprints) from a library, enforces a strict no-slop house style with a real-browser inspector, and runs a look-and-fix loop on screenshots. Use this whenever you build, design, redesign, restyle, polish or review a landing page, marketing site, portfolio, product page, one-pager, hero or any public-facing web page, in any stack (HTML\u002FCSS, React, Next.js, Vue, Svelte, Astro, Tailwind) — also when the user says a page looks generic, templated, \"AI-made\", sloppy, or asks to make it look designed, premium, award-level or less like every other site. Not for dashboards or app screens.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":18},"01M7EWY8FQFNQ2GB7NZZWGSSDX","test-driven-development","Use when implementing any feature or bugfix, before writing implementation code","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-tdd\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":18},"01M7EWY5SHBFRH1HDHVWM9K7TV","systematic-debugging","Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-debugging\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":18},"01M7EWY3NM0Z0JAKS7HDZ24K66","requesting-code-review","Use when completing tasks, implementing major features, or before merging to verify work meets requirements","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-code-review\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":18},"01M7EWY0WRMWX4M9ZFY0WKC593","brainstorming","You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-brainstorming\u002FSKILL.md",[],[]]