[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7DBK4DDF3B6CNP7MWM6F4RW":3,"skill-same:01M7DBK4DDF3B6CNP7MWM6F4RW":51},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7DBK4DDF3B6CNP7MWM6F4RW","setup-pre-commit",null,"Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting\u002Ftypechecking\u002Ftesting.","msurkovsky\u002Fgist","msurkovsky","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F618135?v=4","01M7DBFZY3C5C90611RG7ZJJAG","Martin Šurkovský","01M7DBFZYQC296ZH4GJTJ54565",0,"MIT","https:\u002F\u002Fgithub.com\u002Fmsurkovsky\u002Fgist\u002Fblob\u002Fmain\u002Fexperimental\u002Fmattpocock\u002Fskills\u002Fmisc\u002Fsetup-pre-commit\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: setup-pre-commit\ndescription: Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting\u002Ftypechecking\u002Ftesting.\n---\n\n# Setup Pre-Commit Hooks\n\n## What This Sets Up\n\n- **Husky** pre-commit hook\n- **lint-staged** running Prettier on all staged files\n- **Prettier** config (if missing)\n- **typecheck** and **test** scripts in the pre-commit hook\n\n## Steps\n\n### 1. Detect package manager\n\nCheck for `package-lock.json` (npm), `pnpm-lock.yaml` (pnpm), `yarn.lock` (yarn), `bun.lockb` (bun). Use whichever is present. Default to npm if unclear.\n\n### 2. Install dependencies\n\nInstall as devDependencies:\n\n```\nhusky lint-staged prettier\n```\n\n### 3. Initialize Husky\n\n```bash\nnpx husky init\n```\n\nThis creates `.husky\u002F` dir and adds `prepare: \"husky\"` to package.json.\n\n### 4. Create `.husky\u002Fpre-commit`\n\nWrite this file (no shebang needed for Husky v9+):\n\n```\nnpx lint-staged\nnpm run typecheck\nnpm run test\n```\n\n**Adapt**: Replace `npm` with detected package manager. If repo has no `typecheck` or `test` script in package.json, omit those lines and tell the user.\n\n### 5. Create `.lintstagedrc`\n\n```json\n{\n  \"*\": \"prettier --ignore-unknown --write\"\n}\n```\n\n### 6. Create `.prettierrc` (if missing)\n\nOnly create if no Prettier config exists. Use these defaults:\n\n```json\n{\n  \"useTabs\": false,\n  \"tabWidth\": 2,\n  \"printWidth\": 80,\n  \"singleQuote\": false,\n  \"trailingComma\": \"es5\",\n  \"semi\": true,\n  \"arrowParens\": \"always\"\n}\n```\n\n### 7. Verify\n\n- [ ] `.husky\u002Fpre-commit` exists and is executable\n- [ ] `.lintstagedrc` exists\n- [ ] `prepare` script in package.json is `\"husky\"`\n- [ ] `prettier` config exists\n- [ ] Run `npx lint-staged` to verify it works\n\n### 8. Commit\n\nStage all changed\u002Fcreated files and commit with message: `Add pre-commit hooks (husky + lint-staged + prettier)`\n\nThis will run through the new pre-commit hooks: a good smoke test that everything works.\n\n## Notes\n\n- Husky v9+ doesn't need shebangs in hook files\n- `prettier --ignore-unknown` skips files Prettier can't parse (images, etc.)\n- The pre-commit runs lint-staged first (fast, staged-only), then full typecheck and tests\n","# Setup Pre-Commit Hooks\n\n## What This Sets Up\n\n- **Husky** pre-commit hook\n- **lint-staged** running Prettier on all staged files\n- **Prettier** config (if missing)\n- **typecheck** and **test** scripts in the pre-commit hook\n\n## Steps\n\n### 1. Detect package manager\n\nCheck for `package-lock.json` (npm), `pnpm-lock.yaml` (pnpm), `yarn.lock` (yarn), `bun.lockb` (bun). Use whichever is present. Default to npm if unclear.\n\n### 2. Install dependencies\n\nInstall as devDependencies:\n\n```\nhusky lint-staged prettier\n```\n\n### 3. Initialize Husky\n\n```bash\nnpx husky init\n```\n\nThis creates `.husky\u002F` dir and adds `prepare: \"husky\"` to package.json.\n\n### 4. Create `.husky\u002Fpre-commit`\n\nWrite this file (no shebang needed for Husky v9+):\n\n```\nnpx lint-staged\nnpm run typecheck\nnpm run test\n```\n\n**Adapt**: Replace `npm` with detected package manager. If repo has no `typecheck` or `test` script in package.json, omit those lines and tell the user.\n\n### 5. Create `.lintstagedrc`\n\n```json\n{\n  \"*\": \"prettier --ignore-unknown --write\"\n}\n```\n\n### 6. Create `.prettierrc` (if missing)\n\nOnly create if no Prettier config exists. Use these defaults:\n\n```json\n{\n  \"useTabs\": false,\n  \"tabWidth\": 2,\n  \"printWidth\": 80,\n  \"singleQuote\": false,\n  \"trailingComma\": \"es5\",\n  \"semi\": true,\n  \"arrowParens\": \"always\"\n}\n```\n\n### 7. Verify\n\n- [ ] `.husky\u002Fpre-commit` exists and is executable\n- [ ] `.lintstagedrc` exists\n- [ ] `prepare` script in package.json is `\"husky\"`\n- [ ] `prettier` config exists\n- [ ] Run `npx lint-staged` to verify it works\n\n### 8. Commit\n\nStage all changed\u002Fcreated files and commit with message: `Add pre-commit hooks (husky + lint-staged + prettier)`\n\nThis will run through the new pre-commit hooks: a good smoke test that everything works.\n\n## Notes\n\n- Husky v9+ doesn't need shebangs in hook files\n- `prettier --ignore-unknown` skips files Prettier can't parse (images, etc.)\n- The pre-commit runs lint-staged first (fast, staged-only), then full typecheck and tests\n",{"name":5,"description":7},"main","e3e4cfd3ffe30ed9a8ef3479e758aacac9c4636d","experimental\u002Fmattpocock\u002Fskills\u002Fmisc\u002Fsetup-pre-commit","https:\u002F\u002Fgithub.com\u002Fmsurkovsky\u002Fgist","https:\u002F\u002Fgithub.com\u002Fmsurkovsky","https:\u002F\u002Fsurkovsky.cz\u002F","2026-10-06 04:56:29",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add msurkovsky\u002Fgist --skill setup-pre-commit",{"tool":37,"command":38},"bunx","bunx skills add msurkovsky\u002Fgist --skill setup-pre-commit",{"tool":40,"command":41},"pnpm","pnpm dlx skills add msurkovsky\u002Fgist --skill setup-pre-commit","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmsurkovsky\u002Fgist\u002Fblob\u002Fmain\u002Fexperimental\u002Fmattpocock\u002Fskills\u002Fmisc\u002Fsetup-pre-commit\u002FSKILL.md",true,[45],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"agents\u002Fopenai.yaml","REFERENCE","参考文档",99,"https:\u002F\u002Fgithub.com\u002Fmsurkovsky\u002Fgist\u002Fblob\u002Fmain\u002Fexperimental\u002Fmattpocock\u002Fskills\u002Fmisc\u002Fsetup-pre-commit\u002Fagents\u002Fopenai.yaml",[52,59,66,73,80,87],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":19},"01M7DBM4VPVT6W1GYRBEJ00KMX","gist-outline","Summarize a codebase's file counts, dominant languages, and size when asked for an overview or when unfamiliar-tree orientation helps the requested work.","https:\u002F\u002Fgithub.com\u002Fmsurkovsky\u002Fgist\u002Fblob\u002Fmain\u002Fskills\u002Fgist-outline\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M7DBKZCSV1QAQDG6VWF2A2M3","gist-md-review","Let the user review a markdown file in a browser page, commenting on selected text, while you revise it round by round until they approve. Use when the user wants to read and comment on a document themselves, as in \"review docs\u002Fplan.md with me\", \"let me review this doc\", \"I want to comment on the design\", or \"continue the review of docs\u002Fplan.md\". Not for reviewing code, and not when the user asks you to review a document yourself.","https:\u002F\u002Fgithub.com\u002Fmsurkovsky\u002Fgist\u002Fblob\u002Fmain\u002Fskills\u002Fgist-md-review\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M7DBKSQF24E7HD7EEVB949F3","gist-doc-review","Review the comments and doc strings in a change — cut the ones restating the code, shorten the bloated ones, add the missing line on public API. Use when asked to \"review the docs\", \"check my comments\", \"am I overdocumenting\", \"doc review\", or before shipping a change that added a lot of prose.","https:\u002F\u002Fgithub.com\u002Fmsurkovsky\u002Fgist\u002Fblob\u002Fmain\u002Fskills\u002Fgist-doc-review\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M7DBKNKB340B59SNBZKXPAEF","writing-for-agents","Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.","https:\u002F\u002Fgithub.com\u002Fmsurkovsky\u002Fgist\u002Fblob\u002Fmain\u002Fexperimental\u002Fmattpocock\u002Fskills\u002Fproductivity\u002Fwriting-for-agents\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M7DBKM0QBGKNFN3V7SGAQ9YA","wait-what","Stop. That last message did not land: re-pitch it.","https:\u002F\u002Fgithub.com\u002Fmsurkovsky\u002Fgist\u002Fblob\u002Fmain\u002Fexperimental\u002Fmattpocock\u002Fskills\u002Fproductivity\u002Fwait-what\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M7DBKHXYJV0Y3MJ7F1SJ098P","to-questionnaire","Turn a decision you can't fully answer into a questionnaire for someone else to fill in.","https:\u002F\u002Fgithub.com\u002Fmsurkovsky\u002Fgist\u002Fblob\u002Fmain\u002Fexperimental\u002Fmattpocock\u002Fskills\u002Fproductivity\u002Fto-questionnaire\u002FSKILL.md",[],[]]