[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6C669YKHR4ZD8TA9X0NWWCS":3,"skill-same:01M6C669YKHR4ZD8TA9X0NWWCS":89},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":58,"linkOnly":59,"markdownContent":60,"markdownBody":61,"frontMatter":62,"refName":67,"commitSha":68,"skillDirectory":69,"forksCount":70,"repositoryHtmlUrl":71,"repositoryHomepageUrl":17,"ownerHtmlUrl":72,"ownerBlogUrl":17,"ownerDescription":73,"updatedAt":74,"install":75,"resources":88},"01M6C669YKHR4ZD8TA9X0NWWCS","black-to-ruff-format","Python 格式化 Black 迁移至 Ruff","Migrate Python formatting from black to ruff-format. Use when psf\u002Fblack is in .pre-commit-config.yaml or [tool.black] exists in pyproject.toml.","将 Python 代码格式化从 black 迁移到 ruff-format。适用于 .pre-commit-config.yaml 中存在 psf\u002Fblack，或 pyproject.toml 中存在 [tool.black] 的场景。","laurigates\u002Fclaude-plugins","laurigates","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F13014001?v=4","01M6C59YHWS9C7KMXKSRX1YXNP","Lauri Gates","01M6C59YP2APG9YAM4DWYQYGFJ",60,"MIT",null,"https:\u002F\u002Fgithub.com\u002Flaurigates\u002Fclaude-plugins\u002Fblob\u002Fmain\u002Fmigration-patterns-plugin\u002Fskills\u002Fblack-to-ruff-format\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8CEEYW9437JC839V6V453Q5","Python 开发","SCENARIO","使用场景",[31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57],"black","ruff","black to ruff format","format","read","2026","when","pyproject.toml","sonnet","formatting","only","use","fix","edit","write","python","check","find","grep","tool","migrate","Bash","pre-commit","yaml","config","commit","test","2026-11-10 10:12:30",false,"---\nname: black-to-ruff-format\ndescription: \"Migrate Python formatting from black to ruff-format. Use when psf\u002Fblack is in .pre-commit-config.yaml or [tool.black] exists in pyproject.toml.\"\nallowed-tools: Read, Write, Edit, Glob, Grep, Bash(find *), Bash(test *), Bash(pre-commit *), Bash(uvx *), AskUserQuestion, TodoWrite\nmodel: sonnet\nargs: \"[--check-only] [--fix]\"\nargument-hint: \"[--check-only] [--fix]\"\ncreated: 2026-04-14\nmodified: 2026-05-09\nreviewed: 2026-04-14\n---\n\n# \u002Fmigration-patterns:black-to-ruff-format\n\nMigrate from [black](https:\u002F\u002Fgithub.com\u002Fpsf\u002Fblack) to [ruff format](https:\u002F\u002Fdocs.astral.sh\u002Fruff\u002Fformatter\u002F) — Ruff's drop-in Black-compatible formatter written in Rust (~35x faster). Replaces the `psf\u002Fblack` pre-commit hook, migrates `[tool.black]` configuration, and removes black from dev dependencies.\n\n## When to Use This Skill\n\n| Use this skill when... | Keep black when... |\n|------------------------|-------------------|\n| `.pre-commit-config.yaml` contains `psf\u002Fblack` | Team has strong preference for black's exact output |\n| `[tool.black]` exists in pyproject.toml | CI uses `black --check` specifically by name |\n| Repo already uses ruff for linting | Project uses black's API in build scripts |\n| Wanting to consolidate formatting under ruff | |\n\n## Context\n\n- Pre-commit config: !`find . -maxdepth 1 -name '.pre-commit-config.yaml'`\n- pyproject.toml: !`find . -maxdepth 1 -name 'pyproject.toml'`\n- ruff already present: !`find . -maxdepth 1 -name 'ruff.toml'`\n\n## Parameters\n\n| Parameter | Description |\n|-----------|-------------|\n| `--check-only` | Report what would change without modifying files |\n| `--fix` | Apply migration automatically |\n\n## Execution\n\nExecute this black-to-ruff-format migration:\n\n### Step 1: Audit current black configuration\n\n1. Read `.pre-commit-config.yaml` and locate `psf\u002Fblack` entries.\n2. Read `pyproject.toml` and extract the `[tool.black]` section.\n3. Report findings:\n   ```\n   black → ruff-format migration audit\n   =====================================\n   pre-commit hook:  psf\u002Fblack found at rev \u003Crev>\n   pyproject.toml:   [tool.black] section found (line-length=\u003CN>, target-version=\u003CX>)\n   ruff already:     EXISTS \u002F NOT PRESENT\n   ```\n   If `--check-only`, stop here.\n\n### Step 2: Update .pre-commit-config.yaml\n\nRemove the `psf\u002Fblack` repo block. If `ruff-pre-commit` is already present, add the `ruff-format` hook ID. Otherwise add the full ruff-pre-commit repo block with both `ruff` and `ruff-format` hooks:\n\n```yaml\n- repo: https:\u002F\u002Fgithub.com\u002Fastral-sh\u002Fruff-pre-commit\n  rev: v0.9.1  # use latest stable ruff version\n  hooks:\n    - id: ruff\n      args: [--fix]\n    - id: ruff-format\n```\n\nIf `ruff-pre-commit` already exists but only has the `ruff` linter hook, add the `ruff-format` hook ID under the same repo block.\n\n### Step 3: Migrate [tool.black] → [tool.ruff.format] in pyproject.toml\n\nConvert black configuration to ruff format config:\n\n| black key | ruff equivalent | Notes |\n|-----------|----------------|-------|\n| `line-length` | `[tool.ruff] line-length` | Shared with linter |\n| `target-version` | `[tool.ruff] target-version` | Shared with linter |\n| `skip-string-normalization` | `[tool.ruff.format] quote-style = \"preserve\"` | |\n| `skip-magic-trailing-comma` | `[tool.ruff.format] skip-magic-trailing-comma = true` | |\n| `preview` | `[tool.ruff.format] preview = true` | |\n\nRemove the `[tool.black]` section. Merge settings into `[tool.ruff]` and `[tool.ruff.format]` sections (create if absent, merge if existing).\n\n### Step 4: Remove black from dependencies\n\nRemove `black` from dev\u002Flint dependencies:\n\n```bash\n# With uv\nuvx --from uv uv remove --dev black 2>\u002Fdev\u002Fnull || true\n```\n\nIf not using uv, note it for manual removal.\n\n### Step 5: Verify migration\n\nRun the new hook to confirm it works:\n\n```bash\npre-commit run ruff-format --all-files\n```\n\nIf it exits 0, the migration is complete. If it produces diffs, this is expected on first run (ruff format may reformat some files differently from black). Commit the reformatted files as part of the migration.\n\n### Step 6: Report\n\nPrint a summary of changes:\n\n```\nblack → ruff-format migration complete\n=======================================\n.pre-commit-config.yaml   UPDATED (removed psf\u002Fblack, added ruff-format hook)\npyproject.toml            UPDATED ([tool.black] → [tool.ruff.format])\n\nNote: ruff-format is Black-compatible (same defaults), but may reformat a small\nnumber of files. Review the diff and include these reformatted files in the\nmigration commit.\n\nFiles to stage:\n  git add .pre-commit-config.yaml pyproject.toml\n  git add \u003Cany reformatted .py files>\n```\n\n## Agentic Optimizations\n\n| Context | Command |\n|---------|---------|\n| Audit only | `\u002Fmigration-patterns:black-to-ruff-format --check-only` |\n| Apply migration | `\u002Fmigration-patterns:black-to-ruff-format --fix` |\n| Verify after migration | `pre-commit run ruff-format --all-files` |\n| Check format directly | `uvx ruff format --check .` |\n\n## Quick Reference\n\n| Item | Value |\n|------|-------|\n| ruff format docs | https:\u002F\u002Fdocs.astral.sh\u002Fruff\u002Fformatter\u002F |\n| Black compatibility | ruff format is designed as a Black drop-in with ~99.9% compatible output |\n| Config section | `[tool.ruff.format]` in pyproject.toml |\n| Pre-commit hook | `ruff-format` in `astral-sh\u002Fruff-pre-commit` |\n\n## See Also\n\n- `\u002Fmigration-patterns:flake8-to-ruff` — Migrate flake8\u002Fisort linting to ruff\n- `\u002Fmigration-patterns:mypy-to-ty` — Migrate mypy to ty\n- `\u002Fconfigure:repo` — End-to-end repo config driver\n","# \u002Fmigration-patterns:black-to-ruff-format\n\nMigrate from [black](https:\u002F\u002Fgithub.com\u002Fpsf\u002Fblack) to [ruff format](https:\u002F\u002Fdocs.astral.sh\u002Fruff\u002Fformatter\u002F) — Ruff's drop-in Black-compatible formatter written in Rust (~35x faster). Replaces the `psf\u002Fblack` pre-commit hook, migrates `[tool.black]` configuration, and removes black from dev dependencies.\n\n## When to Use This Skill\n\n| Use this skill when... | Keep black when... |\n|------------------------|-------------------|\n| `.pre-commit-config.yaml` contains `psf\u002Fblack` | Team has strong preference for black's exact output |\n| `[tool.black]` exists in pyproject.toml | CI uses `black --check` specifically by name |\n| Repo already uses ruff for linting | Project uses black's API in build scripts |\n| Wanting to consolidate formatting under ruff | |\n\n## Context\n\n- Pre-commit config: !`find . -maxdepth 1 -name '.pre-commit-config.yaml'`\n- pyproject.toml: !`find . -maxdepth 1 -name 'pyproject.toml'`\n- ruff already present: !`find . -maxdepth 1 -name 'ruff.toml'`\n\n## Parameters\n\n| Parameter | Description |\n|-----------|-------------|\n| `--check-only` | Report what would change without modifying files |\n| `--fix` | Apply migration automatically |\n\n## Execution\n\nExecute this black-to-ruff-format migration:\n\n### Step 1: Audit current black configuration\n\n1. Read `.pre-commit-config.yaml` and locate `psf\u002Fblack` entries.\n2. Read `pyproject.toml` and extract the `[tool.black]` section.\n3. Report findings:\n   ```\n   black → ruff-format migration audit\n   =====================================\n   pre-commit hook:  psf\u002Fblack found at rev \u003Crev>\n   pyproject.toml:   [tool.black] section found (line-length=\u003CN>, target-version=\u003CX>)\n   ruff already:     EXISTS \u002F NOT PRESENT\n   ```\n   If `--check-only`, stop here.\n\n### Step 2: Update .pre-commit-config.yaml\n\nRemove the `psf\u002Fblack` repo block. If `ruff-pre-commit` is already present, add the `ruff-format` hook ID. Otherwise add the full ruff-pre-commit repo block with both `ruff` and `ruff-format` hooks:\n\n```yaml\n- repo: https:\u002F\u002Fgithub.com\u002Fastral-sh\u002Fruff-pre-commit\n  rev: v0.9.1  # use latest stable ruff version\n  hooks:\n    - id: ruff\n      args: [--fix]\n    - id: ruff-format\n```\n\nIf `ruff-pre-commit` already exists but only has the `ruff` linter hook, add the `ruff-format` hook ID under the same repo block.\n\n### Step 3: Migrate [tool.black] → [tool.ruff.format] in pyproject.toml\n\nConvert black configuration to ruff format config:\n\n| black key | ruff equivalent | Notes |\n|-----------|----------------|-------|\n| `line-length` | `[tool.ruff] line-length` | Shared with linter |\n| `target-version` | `[tool.ruff] target-version` | Shared with linter |\n| `skip-string-normalization` | `[tool.ruff.format] quote-style = \"preserve\"` | |\n| `skip-magic-trailing-comma` | `[tool.ruff.format] skip-magic-trailing-comma = true` | |\n| `preview` | `[tool.ruff.format] preview = true` | |\n\nRemove the `[tool.black]` section. Merge settings into `[tool.ruff]` and `[tool.ruff.format]` sections (create if absent, merge if existing).\n\n### Step 4: Remove black from dependencies\n\nRemove `black` from dev\u002Flint dependencies:\n\n```bash\n# With uv\nuvx --from uv uv remove --dev black 2>\u002Fdev\u002Fnull || true\n```\n\nIf not using uv, note it for manual removal.\n\n### Step 5: Verify migration\n\nRun the new hook to confirm it works:\n\n```bash\npre-commit run ruff-format --all-files\n```\n\nIf it exits 0, the migration is complete. If it produces diffs, this is expected on first run (ruff format may reformat some files differently from black). Commit the reformatted files as part of the migration.\n\n### Step 6: Report\n\nPrint a summary of changes:\n\n```\nblack → ruff-format migration complete\n=======================================\n.pre-commit-config.yaml   UPDATED (removed psf\u002Fblack, added ruff-format hook)\npyproject.toml            UPDATED ([tool.black] → [tool.ruff.format])\n\nNote: ruff-format is Black-compatible (same defaults), but may reformat a small\nnumber of files. Review the diff and include these reformatted files in the\nmigration commit.\n\nFiles to stage:\n  git add .pre-commit-config.yaml pyproject.toml\n  git add \u003Cany reformatted .py files>\n```\n\n## Agentic Optimizations\n\n| Context | Command |\n|---------|---------|\n| Audit only | `\u002Fmigration-patterns:black-to-ruff-format --check-only` |\n| Apply migration | `\u002Fmigration-patterns:black-to-ruff-format --fix` |\n| Verify after migration | `pre-commit run ruff-format --all-files` |\n| Check format directly | `uvx ruff format --check .` |\n\n## Quick Reference\n\n| Item | Value |\n|------|-------|\n| ruff format docs | https:\u002F\u002Fdocs.astral.sh\u002Fruff\u002Fformatter\u002F |\n| Black compatibility | ruff format is designed as a Black drop-in with ~99.9% compatible output |\n| Config section | `[tool.ruff.format]` in pyproject.toml |\n| Pre-commit hook | `ruff-format` in `astral-sh\u002Fruff-pre-commit` |\n\n## See Also\n\n- `\u002Fmigration-patterns:flake8-to-ruff` — Migrate flake8\u002Fisort linting to ruff\n- `\u002Fmigration-patterns:mypy-to-ty` — Migrate mypy to ty\n- `\u002Fconfigure:repo` — End-to-end repo config driver\n",{"args":63,"name":5,"model":39,"created":64,"modified":65,"reviewed":64,"description":7,"allowed-tools":66,"argument-hint":63},"[--check-only] [--fix]",1776124800000,1778284800000,"Read, Write, Edit, Glob, Grep, Bash(find *), Bash(test *), Bash(pre-commit *), Bash(uvx *), AskUserQuestion, TodoWrite","main","bdd0582f1a2ba53d21061835bfd72d45f2f954f4","migration-patterns-plugin\u002Fskills\u002Fblack-to-ruff-format",6,"https:\u002F\u002Fgithub.com\u002Flaurigates\u002Fclaude-plugins","https:\u002F\u002Fgithub.com\u002Flaurigates","Linux enthusiast, cloud engineer, neovim addict, electronics hobbyist.","2026-11-15 03:36:11",{"source":9,"skillName":5,"commands":76,"prompt":86,"zipAvailable":87},[77,80,83],{"tool":78,"command":79},"npx","npx skills add laurigates\u002Fclaude-plugins --skill black-to-ruff-format",{"tool":81,"command":82},"bunx","bunx skills add laurigates\u002Fclaude-plugins --skill black-to-ruff-format",{"tool":84,"command":85},"pnpm","pnpm dlx skills add laurigates\u002Fclaude-plugins --skill black-to-ruff-format","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flaurigates\u002Fclaude-plugins\u002Fblob\u002Fmain\u002Fmigration-patterns-plugin\u002Fskills\u002Fblack-to-ruff-format\u002FSKILL.md",true,[],[90,98,120,139,155,177],{"skillNo":91,"name":92,"nameZh":17,"description":93,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":97},"01M7DS1CAJ1ESDX08PENF01J0S","session-workflow-capture","Workflow-tool scripts and workflow friction from this session, filed as issues here or in the plugins repo. Use when a session ran Workflow scripts.","https:\u002F\u002Fgithub.com\u002Flaurigates\u002Fclaude-plugins\u002Fblob\u002Fmain\u002Fsession-plugin\u002Fskills\u002Fsession-workflow-capture\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":99,"name":100,"nameZh":17,"description":101,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":58},"01M70PFHMH9ADY0CRE6047Y4B2","kitty-show-image","Show the user an image with a note on what to judge, via a file send or a labelled kitty tab. Use when the user must see an image, or icat fails with no \u002Fdev\u002Ftty.","https:\u002F\u002Fgithub.com\u002Flaurigates\u002Fclaude-plugins\u002Fblob\u002Fmain\u002Fkitty-plugin\u002Fskills\u002Fkitty-show-image\u002FSKILL.md",[],[105,106,107,108,109,110,111,112,113,114,42,37,52,115,116,117,118,119,36,35],"show","kitty show image","image","kitty","show image","ls","get","send","open","dev","file","text","with","xdg","via",{"skillNo":121,"name":122,"nameZh":17,"description":123,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":58},"01M70PFEN18HKQ4RCQ1VPGMPTB","kitty-session-persistence","Snapshot and restore kitty terminal sessions on macOS. Use when surviving WindowServer hangs without losing tabs, configuring snapshots, or restoring after a force-reboot.","https:\u002F\u002Fgithub.com\u002Flaurigates\u002Fclaude-plugins\u002Fblob\u002Fmain\u002Fkitty-plugin\u002Fskills\u002Fkitty-session-persistence\u002FSKILL.md",[],[108,127,128,129,130,131,37,52,132,133,134,36,35,45,44,135,136,137,138,42],"kitty session persistence","session","persistence","false","snapshots","uname","reboot","terminal","snapshot","macos","sessions","restore",{"skillNo":140,"name":141,"nameZh":17,"description":142,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":143,"categories":144,"keywords":145,"publishedAt":58},"01M70PFC77XGXCVQ1543VGZHYR","kitty-remote-control","Safe kitty remote control from an agent — read panes with kitty @ ls\u002Fget-text, notify, and never mutate the live terminal unasked. Use when running inside kitty.","https:\u002F\u002Fgithub.com\u002Flaurigates\u002Fclaude-plugins\u002Fblob\u002Fmain\u002Fkitty-plugin\u002Fskills\u002Fkitty-remote-control\u002FSKILL.md",[],[146,147,108,148,149,110,150,151,111,152,153,42,37,154,52,116,117,134,36,35],"kitty remote control","remote","control","remote control","running","never","panes","notify","query",{"skillNo":156,"name":157,"nameZh":17,"description":158,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":159,"categories":160,"keywords":161,"publishedAt":58},"01M70P6WVMCT5JG4SACTM69AF9","docs-reference-check","Dangling doc-reference gate: flag markdown naming repo paths or relative links that no longer exist. Use when docs cite moved\u002Fdeleted files, or wiring a doc-drift lint.","https:\u002F\u002Fgithub.com\u002Flaurigates\u002Fclaude-plugins\u002Fblob\u002Fmain\u002Fdocumentation-plugin\u002Fskills\u002Fdocs-reference-check\u002FSKILL.md",[],[162,47,163,164,165,166,167,168,169,170,42,37,52,171,115,172,173,174,175,176],"docs reference check","reference check","reference","docs","links","python3","repo","files","auto","drift","lint","wiring","chezmoi","references","cp",{"skillNo":178,"name":179,"nameZh":180,"description":181,"descriptionZh":182,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":183,"categories":184,"keywords":191,"publishedAt":58},"01M6C6NDE7DAQGNWSF22J5CJ0Z","youtube-upload","YouTube 视频上传与编辑","Upload a video to YouTube via the Data API v3 and edit its title, description, tags or thumbnail afterwards. Use when publishing or retitling a YouTube video.","通过 Data API v3 将视频上传到 YouTube，并在之后编辑其标题、描述、标签或缩略图。适用于发布 YouTube 视频或修改其标题。","https:\u002F\u002Fgithub.com\u002Flaurigates\u002Fclaude-plugins\u002Fblob\u002Fmain\u002Fyoutube-plugin\u002Fskills\u002Fyoutube-upload\u002FSKILL.md",[185,188],{"categoryNo":186,"categoryName":187,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQV98WRP4APE9VKKKKJ6FV","社交媒体与内容平台管理",{"categoryNo":189,"categoryName":190,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8C55A3R2M9C8CAKG3W16HTA","内容创作者",[192,193,194,195,167,196,35,197,44,198,199,200,42,52,115,201,202,37,203,204,205,119,36],"youtube upload","upload","youtube","Video","run","uv run","publishing","data","uv","api","v3","tags","id","title"]