[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71R4EJF5K0SH62PDKMG79JZ":3,"skill-same:01M71R4EJF5K0SH62PDKMG79JZ":66},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":46,"commitSha":47,"skillDirectory":48,"forksCount":13,"repositoryHtmlUrl":49,"repositoryHomepageUrl":6,"ownerHtmlUrl":50,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":51,"install":52,"resources":65},"01M71R4EJF5K0SH62PDKMG79JZ","ps-compat",null,"PowerShell 5.1\u002F7 compatibility + encoding pre-write checklist - consolidates anti-patterns #10\u002F#13\u002F#14\u002F#16\u002F#20, GAP-2 hook incident, P1-1 CRLF false positives","LuisAlbertoMK\u002Fgentleman-agent-gh","LuisAlbertoMK","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F96153499?v=4","01M71QZX0CF9KKGQZ8ZN9BME63","01M71QZX11P5X6Z27HE1GQDF71",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FLuisAlbertoMK\u002Fgentleman-agent-gh\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fps-compat\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"ps compat","PS","patterns","2026","bom","hook","join","gap","false","pattern","incident","safe","CRLF","checklist","anti-patterns","catalog","write","Bash","powershell","encoding","2026-11-10 13:02:02",false,"﻿---\nname: ps-compat\ndescription: \"PowerShell 5.1\u002F7 compatibility + encoding pre-write checklist - consolidates anti-patterns #10\u002F#13\u002F#14\u002F#16\u002F#20, GAP-2 hook incident, P1-1 CRLF false positives\"\ntriggers: \"powershell 5.1, ps5, ps7, ps compatibility, encoding, CRLF, BOM, PSSA, Join-Path, cmatch, requires, bash-safe\"\nchangelog: \"2026-09-02 — created: consolidates ANTI-PATTERN-CATALOG #10\u002F#13\u002F#14\u002F#16\u002F#20 + GAP-2 + P1-1 CRLF trap\"\ntoken_budget: 3000\n---\n\n## When to Use\n\n- Before writing or modifying any `.ps1` file.\n- Before writing regex that scans Windows-authored files (frontmatter, docs, logs).\n- When a script must run in both PS5.1 hook context and PS7.\n- When output shows mojibake or garbled text (encoding suspect).\n\n## Rules\n\n1. Declare runtime: `#requires -Version 7.0` if PS7-only; PS5.1-compat → avoid ternary `? :`, `&&`\u002F`||`, `??`.\n2. PS5.1 rejects `&&`\u002F`||` — use `if`\u002F`then` or Invoke-Bash (`scripts\u002Fbash-safe.ps1`).\n3. Join-Path: named params only (`-Path`\u002F`-ChildPath`), never >2 positional (anti-pattern #10).\n4. Init accumulators before `+=`: `$errors = @()` (#13).\n5. `-match` is case-INSENSITIVE; use `-cmatch` when casing matters (#14).\n6. Write `.ps1` ASCII-only when possible; Unicode → UTF-8 with BOM; always `-Encoding UTF8` on `Get\u002FSet-Content`\u002F`Out-File` (#16).\n7. Windows files: `\\r?\\n` not `\\n`; multiline `(?m)^` — CRLF breaks `^key:` scans (P1-1: ~10 FPs, doc:31-46).\n8. Regex alternation: `[|]` not `\\|` — gates raw-scan `||` as FP (#20).\n9. Mojibake may be console codepage, NOT file corruption — verify bytes (hex\u002FUTF8) before \"fixing\".\n\n## Verification\n- `Invoke-ScriptAnalyzer -Path \u003Cscript>.ps1` clean (or documented baseline) before commit\n- `[Parser]::ParseFile('\u003Cscript>.ps1', [ref]$null, [ref]$errors)` → `$errors.Count -eq 0`\n- Encoding edits re-read with `Get-Content -Encoding UTF8`: no U+FFFD mojibake\n- Regex validated against LF (`\"`n\"`) + CRLF (`\"`r`n\"`) samples — both match\n## Anti-Rationalization\n| Rationalization | Red Flag | Check |\n|---|---|---|\n| \"PS7-only, 5.1 rules legacy\" | Skip chain\u002Fencoding rules | Hooks\u002FCI may run PS5.1 (GAP-2 2026-09-01) |\n| \"`\\\\n` works locally\" | LF-only scans | Windows = CRLF (P1-1 audit:46) |\n| \"Small script, skip #requires\" | Missing version decl | Gate + cross-ref flag it |\n## Red Flags\n- No `#requires` header; `Get-Content` w\u002Fo `-Encoding` on non-ASCII; `\\n`-only scans on Windows files; `&&` for PS5.1; empty `catch` on encoding ops -> STOP commit until each hit is fixed per Rules 1-9 (PS5.1 hook breakage is a BLOCKER).\n## Refs: quality-gate | command-wrapper | bash-safe (scripts\u002Fbash-safe.ps1) | ANTI-PATTERN-CATALOG.md:21,24,25,27,31 | docs\u002Fmejoras\u002F2026-09-01-gap-scan-repo.md:17-21 | docs\u002Fmejoras\u002F2026-09-01-p1-1-spec-audit.md:31-46","## When to Use\n\n- Before writing or modifying any `.ps1` file.\n- Before writing regex that scans Windows-authored files (frontmatter, docs, logs).\n- When a script must run in both PS5.1 hook context and PS7.\n- When output shows mojibake or garbled text (encoding suspect).\n\n## Rules\n\n1. Declare runtime: `#requires -Version 7.0` if PS7-only; PS5.1-compat → avoid ternary `? :`, `&&`\u002F`||`, `??`.\n2. PS5.1 rejects `&&`\u002F`||` — use `if`\u002F`then` or Invoke-Bash (`scripts\u002Fbash-safe.ps1`).\n3. Join-Path: named params only (`-Path`\u002F`-ChildPath`), never >2 positional (anti-pattern #10).\n4. Init accumulators before `+=`: `$errors = @()` (#13).\n5. `-match` is case-INSENSITIVE; use `-cmatch` when casing matters (#14).\n6. Write `.ps1` ASCII-only when possible; Unicode → UTF-8 with BOM; always `-Encoding UTF8` on `Get\u002FSet-Content`\u002F`Out-File` (#16).\n7. Windows files: `\\r?\\n` not `\\n`; multiline `(?m)^` — CRLF breaks `^key:` scans (P1-1: ~10 FPs, doc:31-46).\n8. Regex alternation: `[|]` not `\\|` — gates raw-scan `||` as FP (#20).\n9. Mojibake may be console codepage, NOT file corruption — verify bytes (hex\u002FUTF8) before \"fixing\".\n\n## Verification\n- `Invoke-ScriptAnalyzer -Path \u003Cscript>.ps1` clean (or documented baseline) before commit\n- `[Parser]::ParseFile('\u003Cscript>.ps1', [ref]$null, [ref]$errors)` → `$errors.Count -eq 0`\n- Encoding edits re-read with `Get-Content -Encoding UTF8`: no U+FFFD mojibake\n- Regex validated against LF (`\"`n\"`) + CRLF (`\"`r`n\"`) samples — both match\n## Anti-Rationalization\n| Rationalization | Red Flag | Check |\n|---|---|---|\n| \"PS7-only, 5.1 rules legacy\" | Skip chain\u002Fencoding rules | Hooks\u002FCI may run PS5.1 (GAP-2 2026-09-01) |\n| \"`\\\\n` works locally\" | LF-only scans | Windows = CRLF (P1-1 audit:46) |\n| \"Small script, skip #requires\" | Missing version decl | Gate + cross-ref flag it |\n## Red Flags\n- No `#requires` header; `Get-Content` w\u002Fo `-Encoding` on non-ASCII; `\\n`-only scans on Windows files; `&&` for PS5.1; empty `catch` on encoding ops -> STOP commit until each hit is fixed per Rules 1-9 (PS5.1 hook breakage is a BLOCKER).\n## Refs: quality-gate | command-wrapper | bash-safe (scripts\u002Fbash-safe.ps1) | ANTI-PATTERN-CATALOG.md:21,24,25,27,31 | docs\u002Fmejoras\u002F2026-09-01-gap-scan-repo.md:17-21 | docs\u002Fmejoras\u002F2026-09-01-p1-1-spec-audit.md:31-46",{"name":5,"triggers":43,"changelog":44,"description":7,"token_budget":45},"powershell 5.1, ps5, ps7, ps compatibility, encoding, CRLF, BOM, PSSA, Join-Path, cmatch, requires, bash-safe","2026-09-02 — created: consolidates ANTI-PATTERN-CATALOG #10\u002F#13\u002F#14\u002F#16\u002F#20 + GAP-2 + P1-1 CRLF trap",3000,"main","4af6946b30783e2c8f9182082324d530fc28f838",".agents\u002Fskills\u002Fps-compat","https:\u002F\u002Fgithub.com\u002FLuisAlbertoMK\u002Fgentleman-agent-gh","https:\u002F\u002Fgithub.com\u002FLuisAlbertoMK","2026-11-10 18:34:27",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add LuisAlbertoMK\u002Fgentleman-agent-gh --skill ps-compat",{"tool":58,"command":59},"bunx","bunx skills add LuisAlbertoMK\u002Fgentleman-agent-gh --skill ps-compat",{"tool":61,"command":62},"pnpm","pnpm dlx skills add LuisAlbertoMK\u002Fgentleman-agent-gh --skill ps-compat","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLuisAlbertoMK\u002Fgentleman-agent-gh\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fps-compat\u002FSKILL.md",true,[],[67,94,116,134,155,179],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":38},"01M71R7K35P668DYEPYGDQP2QA","web-quality-audit","Comprehensive web audit: performance, a11y, SEO, responsive, animation, design tokens.","https:\u002F\u002Fgithub.com\u002FLuisAlbertoMK\u002Fgentleman-agent-gh\u002Fblob\u002Fmain\u002Fdocs\u002Fciclos\u002Fc28-w1-backup\u002Fweb-quality-audit\u002FSKILL.md",[],[74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93],"quality","quality audit","web quality audit","audit","web","Animation","design audit","design","website","ui","responsive","seo","tokens","ui audit","Lighthouse","performance","review","optimize","a11y","page",{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":38},"01M71R7H1RA7CQ568DHRK37PE2","ui-engine","UI system — Grid\u002FFlexbox\u002F@layer\u002F:has(), container queries, compositor-only animation, OKLCH tokens, component patterns","https:\u002F\u002Fgithub.com\u002FLuisAlbertoMK\u002Fgentleman-agent-gh\u002Fblob\u002Fmain\u002Fdocs\u002Fciclos\u002Fc28-w1-backup\u002Fui-engine\u002FSKILL.md",[],[101,102,83,79,103,104,105,93,106,86,107,108,109,81,110,111,112,113,114,115],"ui engine","engine","compositor","css","dark","system","mode","hooks","container","only","query","components","dark mode","grid","queries",{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":122,"publishedAt":38},"01M71R7EPMZFKB833WE4B3GTHC","baseline-ui","Anti-slop UI — layout, typography, responsive, animation, tokens. Use for cleanup or polish.","https:\u002F\u002Fgithub.com\u002FLuisAlbertoMK\u002Fgentleman-agent-gh\u002Fblob\u002Fmain\u002Fdocs\u002Fciclos\u002Fc28-w1-backup\u002Fbaseline-ui\u002FSKILL.md",[],[123,124,83,79,125,126,127,128,86,129,109,81,130,131,132,87,133,111,114,90],"baseline ui","baseline","generic","slop","for","anti-slop","fix","interface","cleanup","design review","use",{"skillNo":135,"name":136,"nameZh":6,"description":137,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":138,"categories":139,"keywords":140,"publishedAt":38},"01M71R7CWK3FBW77Z8WD9GXQFE","skill-creator","Create new AI agent skills following Agent Skills spec -- auto-bootstrap unknown tasks, define structure, register in AGENTS.md","https:\u002F\u002Fgithub.com\u002FLuisAlbertoMK\u002Fgentleman-agent-gh\u002Fblob\u002Fmain\u002F.archive\u002Fskills\u002Fskill-creator\u002FSKILL.md",[],[141,142,143,144,145,21,146,147,148,149,150,151,152,153,154],"skill creator","creator","create","structure","register","spec","new","ai skill","auto","define","ai agent","unknown","tasks","bootstrap",{"skillNo":156,"name":157,"nameZh":6,"description":158,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":159,"categories":160,"keywords":161,"publishedAt":38},"01M71R78DZM1GA16F1KN8ND926","senior-engineer","Apply senior engineering competencies — system design, trade-off analysis, delegation, mentoring, and tech debt strategy","https:\u002F\u002Fgithub.com\u002FLuisAlbertoMK\u002Fgentleman-agent-gh\u002Fblob\u002Fmain\u002F.archive\u002Fskills\u002Fsenior-engineer\u002FSKILL.md",[],[162,163,164,165,166,167,168,81,169,170,21,171,172,173,106,174,175,176,177,178],"engineer","senior","senior engineer","system design","trade-offs","senior engineering","delegation","senior architect","analysis","debt","architect","tech","strategy","apply","trade","tech debt","engineering",{"skillNo":180,"name":181,"nameZh":6,"description":182,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":183,"categories":184,"keywords":185,"publishedAt":38},"01M71R74WQTXZMG3219RND96CE","prompt-engineering","Design effective prompts using SPEARS framework — scope, principles, examples, assertions, refinements, with ReAct and multi-agent patterns","https:\u002F\u002Fgithub.com\u002FLuisAlbertoMK\u002Fgentleman-agent-gh\u002Fblob\u002Fmain\u002F.archive\u002Fskills\u002Fprompt-engineering\u002FSKILL.md",[],[186,187,178,188,189,81,190,21,191,20,192,193,194,195,196,197,198,199,200,201],"prompt","prompt engineering","scope","improve","react","security","multi-agent","framework","agent patterns","assertions","examples","with","multi","principles","improve prompt","prompts"]