[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7C4VFMM94J78ST0G93EE7CQ":3,"skill-same:01M7C4VFMM94J78ST0G93EE7CQ":44},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"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":13,"repositoryHtmlUrl":26,"repositoryHomepageUrl":6,"ownerHtmlUrl":27,"ownerBlogUrl":6,"ownerDescription":28,"updatedAt":29,"install":30,"resources":43},"01M7C4VFMM94J78ST0G93EE7CQ","python-simplify",null,"Simplify existing Python code","Shozye\u002Fskills","Shozye","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F23239877?v=4","01M7C4V9PE5T003AABPZ97MFK2","01M7C4V9Q1RV4WGBZBSNE3TRYP",0,"MIT","https:\u002F\u002Fgithub.com\u002FShozye\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fpython-simplify\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: python-simplify\ndescription: Simplify existing Python code\nlicense: MIT\n---\n\n# Python Simplification\n\n## Governing goal\n\nMake **one small, evidence-based simplification at a time**.\nCode upgrades are also 'evidence-based' simplifications, so this skill describes good and bad behaviors.\n\n## Scope\n\n- Reusing existing project helpers\n- Inlining trivial indirection, removing unnecessary duplication, and simplifying control flow or data handling.\n- Improving names, local structure, and readability where behavior remains equivalent.\n- others\n\n## Decision rules\n- Treat fewer lines as a possible result, not the objective; clarity and risk reduction decide.\n\n- When Pydantic model validates something, there is no need to validate it later itself. \n- Do not create variables that are unnecessary. For example `total = page.total` is unnecessary. Use `page.total`\n\n## AntiPatterns\nThose are in general examples and rules of what to not follow with explanations what is better.\n\n### 1. Pydantic Antipattern - Everything as None\n```\nclass Detail(BaseModel):\n    location: str | None = None\n    description: str | None = None\n```\nThis is an antipattern, much better would be\n```\nclass Detail(BaseModel):\n    location: str\n    description: str\n```\nIt is good to make validation as fast as possible. \nOnly use the None when it really is possible that the API will give you None. \n\n### 2. Pydantic Antipattern - Field validator for strings\n```python\nclass Offer(BaseModel):\n    url: str\n\n    @field_validator(\"url\")\n    @classmethod\n    def require_nonblank_text(cls, value: str) -> str:\n        if not value.strip():\n            raise ValueError(\"value must not be blank\")\n        return value\n```\n\nIt is much better to use StrictStr and StringConstraints\n","# Python Simplification\n\n## Governing goal\n\nMake **one small, evidence-based simplification at a time**.\nCode upgrades are also 'evidence-based' simplifications, so this skill describes good and bad behaviors.\n\n## Scope\n\n- Reusing existing project helpers\n- Inlining trivial indirection, removing unnecessary duplication, and simplifying control flow or data handling.\n- Improving names, local structure, and readability where behavior remains equivalent.\n- others\n\n## Decision rules\n- Treat fewer lines as a possible result, not the objective; clarity and risk reduction decide.\n\n- When Pydantic model validates something, there is no need to validate it later itself. \n- Do not create variables that are unnecessary. For example `total = page.total` is unnecessary. Use `page.total`\n\n## AntiPatterns\nThose are in general examples and rules of what to not follow with explanations what is better.\n\n### 1. Pydantic Antipattern - Everything as None\n```\nclass Detail(BaseModel):\n    location: str | None = None\n    description: str | None = None\n```\nThis is an antipattern, much better would be\n```\nclass Detail(BaseModel):\n    location: str\n    description: str\n```\nIt is good to make validation as fast as possible. \nOnly use the None when it really is possible that the API will give you None. \n\n### 2. Pydantic Antipattern - Field validator for strings\n```python\nclass Offer(BaseModel):\n    url: str\n\n    @field_validator(\"url\")\n    @classmethod\n    def require_nonblank_text(cls, value: str) -> str:\n        if not value.strip():\n            raise ValueError(\"value must not be blank\")\n        return value\n```\n\nIt is much better to use StrictStr and StringConstraints\n",{"name":5,"license":14,"description":7},"main","df8d2c4f58ad37149fae6d62f8fdf76888ffa34e","skills\u002Fpython-simplify","https:\u002F\u002Fgithub.com\u002FShozye\u002Fskills","https:\u002F\u002Fgithub.com\u002FShozye","Python Developer | \r\nMaster's Student  |\r\n","2026-09-11 00:32:15",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add Shozye\u002Fskills --skill python-simplify",{"tool":36,"command":37},"bunx","bunx skills add Shozye\u002Fskills --skill python-simplify",{"tool":39,"command":40},"pnpm","pnpm dlx skills add Shozye\u002Fskills --skill python-simplify","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FShozye\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fpython-simplify\u002FSKILL.md",true,[],[45,52],{"skillNo":46,"name":47,"nameZh":6,"description":48,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":49,"categories":50,"keywords":51,"publishedAt":18},"01M7C4VJHC6027VR4TMEQV026K","ruff-ty-fix-validation","Should be read when tools such as `ruff` or `ty` find issue during static analysis of the code. It explain common ways to handle errors and how to change the code to accomodate for them.","https:\u002F\u002Fgithub.com\u002FShozye\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fruff-ty-fix-validation\u002FSKILL.md",[],[],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":18},"01M7C4VB1T2EYJH4WPANATX7QT","skill-name","Describe what this skill does and when to use it.","https:\u002F\u002Fgithub.com\u002FShozye\u002Fskills\u002Fblob\u002Fmain\u002Fskill-name\u002FSKILL.md",[],[]]