[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M740WKY8XFPWZWMGCZ6F8J9X":3,"skill-same:01M740WKY8XFPWZWMGCZ6F8J9X":60},{"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":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":31,"ownerHtmlUrl":32,"ownerBlogUrl":33,"ownerDescription":34,"updatedAt":35,"install":36,"resources":49},"01M740WKY8XFPWZWMGCZ6F8J9X","python-style-guide",null,"Comprehensive Python programming guidelines based on Google's Python Style Guide. Use when Claude needs to write Python code, review Python code for style issues, refactor Python code, or provide Python programming guidance. Covers language rules (imports, exceptions, type annotations), style rules (naming conventions, formatting, docstrings), and best practices for clean, maintainable Python code.","bg-szy\u002FTOP-SKILLS","bg-szy","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F106576190?v=4","01M73A4E8KPV67SFXRY8XZGNBX","ShuZhiyong","01M73A4E96MQ294MHM74TZBVQD",6,"CC-BY-4.0","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fpython-style-guide\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fpython-style-guide\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: python-style-guide\ndescription: Comprehensive Python programming guidelines based on Google's Python Style Guide. Use when Claude needs to write Python code, review Python code for style issues, refactor Python code, or provide Python programming guidance. Covers language rules (imports, exceptions, type annotations), style rules (naming conventions, formatting, docstrings), and best practices for clean, maintainable Python code.\nlicense: Complete terms in LICENSE.txt\n---\n\n# Python Style Guide\n\nComprehensive guidelines for writing clean, maintainable Python code based on [Google's Python Style Guide](https:\u002F\u002Fgoogle.github.io\u002Fstyleguide\u002Fpyguide.html).\n\n## Core Philosophy\n\n**BE CONSISTENT.** Match the style of the code around you. Use these guidelines as defaults, but always prioritize consistency with existing code.\n\n## Language Rules\n\n### Imports\n\nUse `import` statements for packages and modules only, not for individual classes or functions.\n\n**Yes:**\n```python\nfrom doctor.who import jodie\nimport sound_effects.utils\n```\n\n**No:**\n```python\nfrom sound_effects.utils import EffectsRegistry  # Don't import classes directly\n```\n\n#### Import Formatting\n\n- Group imports: standard library, third-party, application-specific\n- Alphabetize within each group\n- Use absolute imports (not relative imports)\n- One import per line (except for multiple items from `typing` or `collections.abc`)\n\n```python\n# Standard library\nimport os\nimport sys\n\n# Third-party\nimport numpy as np\nimport tensorflow as tf\n\n# Application-specific\nfrom myproject.backend import api_utils\n```\n\n### Exceptions\n\nUse exceptions appropriately. Do not suppress errors with bare `except:` clauses.\n\n**Yes:**\n```python\ntry:\n    result = risky_operation()\nexcept ValueError as e:\n    logging.error(f\"Invalid value: {e}\")\n    raise\n```\n\n**No:**\n```python\ntry:\n    result = risky_operation()\nexcept:  # Too broad, hides bugs\n    pass\n```\n\n### Type Annotations\n\nAnnotate all function signatures. Type annotations improve code readability and catch errors early.\n\n**General rules:**\n- Annotate all public APIs\n- Use built-in types (`list`, `dict`, `set`) instead of `typing.List`, etc. (Python 3.9+)\n- Import typing symbols directly: `from typing import Any, Union`\n- Use `None` instead of `type(None)` or `NoneType`\n\n```python\ndef fetch_data(url: str, timeout: int = 30) -> dict[str, Any]:\n    \"\"\"Fetch data from URL.\"\"\"\n    ...\n\ndef process_items(items: list[str]) -> None:\n    \"\"\"Process a list of items.\"\"\"\n    ...\n```\n\n### Default Argument Values\n\nNever use mutable objects as default values in function definitions.\n\n**Yes:**\n```python\ndef foo(a: int, b: list[int] | None = None) -> None:\n    if b is None:\n        b = []\n```\n\n**No:**\n```python\ndef foo(a: int, b: list[int] = []) -> None:  # Mutable default - WRONG!\n    b.append(a)\n```\n\n### True\u002FFalse Evaluations\n\nUse implicit false where possible. Empty sequences, `None`, and `0` are false in boolean contexts.\n\n**Yes:**\n```python\nif not users:  # Preferred\nif not some_dict:\nif value:\n```\n\n**No:**\n```python\nif len(users) == 0:  # Verbose\nif users == []:\nif value == True:  # Never compare to True\u002FFalse explicitly\n```\n\n### Comprehensions & Generators\n\nUse comprehensions and generators for simple cases. Keep them readable.\n\n**Yes:**\n```python\nresult = [x for x in data if x > 0]\nsquares = (x**2 for x in range(10))\n```\n\n**No:**\n```python\n# Too complex\nresult = [\n    x.strip().lower() for x in data \n    if x and len(x) > 5 and not x.startswith('#')\n    for y in x.split(',') if y\n]  # Use a regular loop instead\n```\n\n### Lambda Functions\n\nUse lambdas for one-liners only. For anything complex, define a proper function.\n\n**Yes:**\n```python\nsorted(data, key=lambda x: x.timestamp)\n```\n\n**Acceptable but prefer named function:**\n```python\ndef get_timestamp(item):\n    return item.timestamp\n\nsorted(data, key=get_timestamp)\n```\n\n## Style Rules\n\n### Line Length\n\nMaximum line length: 80 characters. Exceptions allowed for imports, URLs, and long strings that can't be broken.\n\n### Indentation\n\nUse 4 spaces per indentation level. Never use tabs.\n\nFor hanging indents, align wrapped elements vertically or use 4-space hanging indent:\n\n```python\n# Aligned with opening delimiter\nfoo = long_function_name(var_one, var_two,\n                         var_three, var_four)\n\n# Hanging indent (4 spaces)\nfoo = long_function_name(\n    var_one, var_two, var_three,\n    var_four)\n```\n\n### Blank Lines\n\n- Two blank lines between top-level definitions\n- One blank line between method definitions\n- Use blank lines sparingly within functions to show logical sections\n\n### Naming Conventions\n\n| Type | Convention | Examples |\n|------|-----------|----------|\n| Packages\u002FModules | `lower_with_under` | `my_module.py` |\n| Classes | `CapWords` | `MyClass` |\n| Functions\u002FMethods | `lower_with_under()` | `my_function()` |\n| Constants | `CAPS_WITH_UNDER` | `MAX_SIZE` |\n| Variables | `lower_with_under` | `my_var` |\n| Private | `_leading_underscore` | `_private_var` |\n\n**Avoid:**\n- Single character names except for counters\u002Fiterators (`i`, `j`, `k`)\n- Dashes in any name\n- `__double_leading_and_trailing_underscore__` (reserved for Python)\n\n### Comments and Docstrings\n\n#### Docstring Format\n\nUse Google-style docstrings for all public modules, functions, classes, and methods.\n\n**Function docstring:**\n```python\ndef fetch_smalltable_rows(\n    table_handle: smalltable.Table,\n    keys: Sequence[bytes | str],\n    require_all_keys: bool = False,\n) -> Mapping[bytes, tuple[str, ...]]:\n    \"\"\"Fetches rows from a Smalltable.\n\n    Retrieves rows pertaining to the given keys from the Table instance\n    represented by table_handle. String keys will be UTF-8 encoded.\n\n    Args:\n        table_handle: An open smalltable.Table instance.\n        keys: A sequence of strings representing the key of each table\n            row to fetch. String keys will be UTF-8 encoded.\n        require_all_keys: If True, raise ValueError if any key is missing.\n\n    Returns:\n        A dict mapping keys to the corresponding table row data\n        fetched. Each row is represented as a tuple of strings.\n\n    Raises:\n        IOError: An error occurred accessing the smalltable.\n        ValueError: A key is missing and require_all_keys is True.\n    \"\"\"\n    ...\n```\n\n**Class docstring:**\n```python\nclass SampleClass:\n    \"\"\"Summary of class here.\n\n    Longer class information...\n    Longer class information...\n\n    Attributes:\n        likes_spam: A boolean indicating if we like SPAM or not.\n        eggs: An integer count of the eggs we have laid.\n    \"\"\"\n\n    def __init__(self, likes_spam: bool = False):\n        \"\"\"Initializes the instance based on spam preference.\n\n        Args:\n            likes_spam: Defines if instance exhibits this preference.\n        \"\"\"\n        self.likes_spam = likes_spam\n        self.eggs = 0\n```\n\n#### Block and Inline Comments\n\n- Use complete sentences with proper capitalization\n- Block comments indent to the same level as the code\n- Inline comments should be separated by at least 2 spaces\n- Use inline comments sparingly\n\n```python\n# Block comment explaining the following code.\n# Can span multiple lines.\nx = x + 1  # Inline comment (use sparingly)\n```\n\n### Strings\n\nUse f-strings for formatting (Python 3.6+).\n\n**Yes:**\n```python\nx = f\"name: {name}; score: {score}\"\n```\n\n**Acceptable:**\n```python\nx = \"name: %s; score: %d\" % (name, score)\nx = \"name: {}; score: {}\".format(name, score)\n```\n\n**No:**\n```python\nx = \"name: \" + name + \"; score: \" + str(score)  # Avoid + for formatting\n```\n\n#### Logging\n\nUse `%` formatting for logging, not f-strings (allows lazy evaluation):\n\n```python\nlogging.info(\"Request from %s resulted in %d\", ip_address, status_code)\n```\n\n### Files and Resources\n\nAlways use context managers (`with` statements) for file operations:\n\n```python\nwith open(\"file.txt\") as f:\n    data = f.read()\n```\n\n### Statements\n\nGenerally avoid multiple statements on one line.\n\n**Yes:**\n```python\nif foo:\n    bar()\n```\n\n**No:**\n```python\nif foo: bar()  # Avoid\n```\n\n### Main\n\nFor executable scripts, use:\n\n```python\ndef main():\n    ...\n\nif __name__ == \"__main__\":\n    main()\n```\n\n### Function Length\n\nKeep functions focused and reasonably sized. If a function exceeds about 40 lines, consider splitting it unless it remains very readable.\n\n## Type Annotation Details\n\n### Forward Declarations\n\nUse string quotes for forward references:\n\n```python\nclass MyClass:\n    def method(self) -> \"MyClass\":\n        return self\n```\n\n### Type Aliases\n\nCreate aliases for complex types:\n\n```python\nfrom typing import TypeAlias\n\nConnectionOptions: TypeAlias = dict[str, str]\nAddress: TypeAlias = tuple[str, int]\nServer: TypeAlias = tuple[Address, ConnectionOptions]\n```\n\n### TypeVars\n\nUse descriptive names for TypeVars:\n\n```python\nfrom typing import TypeVar\n\n_T = TypeVar(\"_T\")  # Good: private, unconstrained\nAddableType = TypeVar(\"AddableType\", int, float, str)  # Good: descriptive\n```\n\n### Generics\n\nAlways specify type parameters for generic types:\n\n**Yes:**\n```python\ndef get_names(employee_ids: list[int]) -> dict[int, str]:\n    ...\n```\n\n**No:**\n```python\ndef get_names(employee_ids: list) -> dict:  # Missing type parameters\n    ...\n```\n\n### Imports for Typing\n\nImport typing symbols directly:\n\n```python\nfrom collections.abc import Mapping, Sequence\nfrom typing import Any, Union\n\n# Use built-in types for containers (Python 3.9+)\ndef foo(items: list[str]) -> dict[str, int]:\n    ...\n```\n\n## Common Patterns\n\n### Properties\n\nUse properties for simple attribute access:\n\n```python\nclass Square:\n    def __init__(self, side: float):\n        self._side = side\n    \n    @property\n    def area(self) -> float:\n        return self._side ** 2\n```\n\n### Conditional Expressions\n\nUse ternary operators for simple conditions:\n\n```python\nx = \"yes\" if condition else \"no\"\n```\n\n### Context Managers\n\nCreate custom context managers when appropriate:\n\n```python\nfrom contextlib import contextmanager\n\n@contextmanager\ndef managed_resource(*args, **kwargs):\n    resource = acquire_resource(*args, **kwargs)\n    try:\n        yield resource\n    finally:\n        release_resource(resource)\n```\n\n## Linting\n\nRun `pylint` on all Python code. Suppress warnings only when necessary with clear explanations:\n\n```python\ndict = 'something'  # pylint: disable=redefined-builtin\n```\n\n## Summary\n\nWhen writing Python code:\n\n1. Use type annotations for all functions\n2. Follow naming conventions consistently\n3. Write clear docstrings for all public APIs\n4. Keep functions focused and reasonably sized\n5. Use comprehensions for simple cases\n6. Prefer implicit false in boolean contexts\n7. Use f-strings for formatting\n8. Always use context managers for resources\n9. Run pylint and fix issues\n10. **BE CONSISTENT** with existing code\n\n## Additional Resources\n\nFor detailed reference on specific topics, see:\n\n- **references\u002Fadvanced_types.md** - Advanced type annotation patterns including Protocol, TypedDict, Literal, ParamSpec, and more\n- **references\u002Fantipatterns.md** - Common Python mistakes and their fixes\n- **references\u002Fdocstring_examples.md** - Comprehensive docstring examples for all Python constructs\n","# Python Style Guide\n\nComprehensive guidelines for writing clean, maintainable Python code based on [Google's Python Style Guide](https:\u002F\u002Fgoogle.github.io\u002Fstyleguide\u002Fpyguide.html).\n\n## Core Philosophy\n\n**BE CONSISTENT.** Match the style of the code around you. Use these guidelines as defaults, but always prioritize consistency with existing code.\n\n## Language Rules\n\n### Imports\n\nUse `import` statements for packages and modules only, not for individual classes or functions.\n\n**Yes:**\n```python\nfrom doctor.who import jodie\nimport sound_effects.utils\n```\n\n**No:**\n```python\nfrom sound_effects.utils import EffectsRegistry  # Don't import classes directly\n```\n\n#### Import Formatting\n\n- Group imports: standard library, third-party, application-specific\n- Alphabetize within each group\n- Use absolute imports (not relative imports)\n- One import per line (except for multiple items from `typing` or `collections.abc`)\n\n```python\n# Standard library\nimport os\nimport sys\n\n# Third-party\nimport numpy as np\nimport tensorflow as tf\n\n# Application-specific\nfrom myproject.backend import api_utils\n```\n\n### Exceptions\n\nUse exceptions appropriately. Do not suppress errors with bare `except:` clauses.\n\n**Yes:**\n```python\ntry:\n    result = risky_operation()\nexcept ValueError as e:\n    logging.error(f\"Invalid value: {e}\")\n    raise\n```\n\n**No:**\n```python\ntry:\n    result = risky_operation()\nexcept:  # Too broad, hides bugs\n    pass\n```\n\n### Type Annotations\n\nAnnotate all function signatures. Type annotations improve code readability and catch errors early.\n\n**General rules:**\n- Annotate all public APIs\n- Use built-in types (`list`, `dict`, `set`) instead of `typing.List`, etc. (Python 3.9+)\n- Import typing symbols directly: `from typing import Any, Union`\n- Use `None` instead of `type(None)` or `NoneType`\n\n```python\ndef fetch_data(url: str, timeout: int = 30) -> dict[str, Any]:\n    \"\"\"Fetch data from URL.\"\"\"\n    ...\n\ndef process_items(items: list[str]) -> None:\n    \"\"\"Process a list of items.\"\"\"\n    ...\n```\n\n### Default Argument Values\n\nNever use mutable objects as default values in function definitions.\n\n**Yes:**\n```python\ndef foo(a: int, b: list[int] | None = None) -> None:\n    if b is None:\n        b = []\n```\n\n**No:**\n```python\ndef foo(a: int, b: list[int] = []) -> None:  # Mutable default - WRONG!\n    b.append(a)\n```\n\n### True\u002FFalse Evaluations\n\nUse implicit false where possible. Empty sequences, `None`, and `0` are false in boolean contexts.\n\n**Yes:**\n```python\nif not users:  # Preferred\nif not some_dict:\nif value:\n```\n\n**No:**\n```python\nif len(users) == 0:  # Verbose\nif users == []:\nif value == True:  # Never compare to True\u002FFalse explicitly\n```\n\n### Comprehensions & Generators\n\nUse comprehensions and generators for simple cases. Keep them readable.\n\n**Yes:**\n```python\nresult = [x for x in data if x > 0]\nsquares = (x**2 for x in range(10))\n```\n\n**No:**\n```python\n# Too complex\nresult = [\n    x.strip().lower() for x in data \n    if x and len(x) > 5 and not x.startswith('#')\n    for y in x.split(',') if y\n]  # Use a regular loop instead\n```\n\n### Lambda Functions\n\nUse lambdas for one-liners only. For anything complex, define a proper function.\n\n**Yes:**\n```python\nsorted(data, key=lambda x: x.timestamp)\n```\n\n**Acceptable but prefer named function:**\n```python\ndef get_timestamp(item):\n    return item.timestamp\n\nsorted(data, key=get_timestamp)\n```\n\n## Style Rules\n\n### Line Length\n\nMaximum line length: 80 characters. Exceptions allowed for imports, URLs, and long strings that can't be broken.\n\n### Indentation\n\nUse 4 spaces per indentation level. Never use tabs.\n\nFor hanging indents, align wrapped elements vertically or use 4-space hanging indent:\n\n```python\n# Aligned with opening delimiter\nfoo = long_function_name(var_one, var_two,\n                         var_three, var_four)\n\n# Hanging indent (4 spaces)\nfoo = long_function_name(\n    var_one, var_two, var_three,\n    var_four)\n```\n\n### Blank Lines\n\n- Two blank lines between top-level definitions\n- One blank line between method definitions\n- Use blank lines sparingly within functions to show logical sections\n\n### Naming Conventions\n\n| Type | Convention | Examples |\n|------|-----------|----------|\n| Packages\u002FModules | `lower_with_under` | `my_module.py` |\n| Classes | `CapWords` | `MyClass` |\n| Functions\u002FMethods | `lower_with_under()` | `my_function()` |\n| Constants | `CAPS_WITH_UNDER` | `MAX_SIZE` |\n| Variables | `lower_with_under` | `my_var` |\n| Private | `_leading_underscore` | `_private_var` |\n\n**Avoid:**\n- Single character names except for counters\u002Fiterators (`i`, `j`, `k`)\n- Dashes in any name\n- `__double_leading_and_trailing_underscore__` (reserved for Python)\n\n### Comments and Docstrings\n\n#### Docstring Format\n\nUse Google-style docstrings for all public modules, functions, classes, and methods.\n\n**Function docstring:**\n```python\ndef fetch_smalltable_rows(\n    table_handle: smalltable.Table,\n    keys: Sequence[bytes | str],\n    require_all_keys: bool = False,\n) -> Mapping[bytes, tuple[str, ...]]:\n    \"\"\"Fetches rows from a Smalltable.\n\n    Retrieves rows pertaining to the given keys from the Table instance\n    represented by table_handle. String keys will be UTF-8 encoded.\n\n    Args:\n        table_handle: An open smalltable.Table instance.\n        keys: A sequence of strings representing the key of each table\n            row to fetch. String keys will be UTF-8 encoded.\n        require_all_keys: If True, raise ValueError if any key is missing.\n\n    Returns:\n        A dict mapping keys to the corresponding table row data\n        fetched. Each row is represented as a tuple of strings.\n\n    Raises:\n        IOError: An error occurred accessing the smalltable.\n        ValueError: A key is missing and require_all_keys is True.\n    \"\"\"\n    ...\n```\n\n**Class docstring:**\n```python\nclass SampleClass:\n    \"\"\"Summary of class here.\n\n    Longer class information...\n    Longer class information...\n\n    Attributes:\n        likes_spam: A boolean indicating if we like SPAM or not.\n        eggs: An integer count of the eggs we have laid.\n    \"\"\"\n\n    def __init__(self, likes_spam: bool = False):\n        \"\"\"Initializes the instance based on spam preference.\n\n        Args:\n            likes_spam: Defines if instance exhibits this preference.\n        \"\"\"\n        self.likes_spam = likes_spam\n        self.eggs = 0\n```\n\n#### Block and Inline Comments\n\n- Use complete sentences with proper capitalization\n- Block comments indent to the same level as the code\n- Inline comments should be separated by at least 2 spaces\n- Use inline comments sparingly\n\n```python\n# Block comment explaining the following code.\n# Can span multiple lines.\nx = x + 1  # Inline comment (use sparingly)\n```\n\n### Strings\n\nUse f-strings for formatting (Python 3.6+).\n\n**Yes:**\n```python\nx = f\"name: {name}; score: {score}\"\n```\n\n**Acceptable:**\n```python\nx = \"name: %s; score: %d\" % (name, score)\nx = \"name: {}; score: {}\".format(name, score)\n```\n\n**No:**\n```python\nx = \"name: \" + name + \"; score: \" + str(score)  # Avoid + for formatting\n```\n\n#### Logging\n\nUse `%` formatting for logging, not f-strings (allows lazy evaluation):\n\n```python\nlogging.info(\"Request from %s resulted in %d\", ip_address, status_code)\n```\n\n### Files and Resources\n\nAlways use context managers (`with` statements) for file operations:\n\n```python\nwith open(\"file.txt\") as f:\n    data = f.read()\n```\n\n### Statements\n\nGenerally avoid multiple statements on one line.\n\n**Yes:**\n```python\nif foo:\n    bar()\n```\n\n**No:**\n```python\nif foo: bar()  # Avoid\n```\n\n### Main\n\nFor executable scripts, use:\n\n```python\ndef main():\n    ...\n\nif __name__ == \"__main__\":\n    main()\n```\n\n### Function Length\n\nKeep functions focused and reasonably sized. If a function exceeds about 40 lines, consider splitting it unless it remains very readable.\n\n## Type Annotation Details\n\n### Forward Declarations\n\nUse string quotes for forward references:\n\n```python\nclass MyClass:\n    def method(self) -> \"MyClass\":\n        return self\n```\n\n### Type Aliases\n\nCreate aliases for complex types:\n\n```python\nfrom typing import TypeAlias\n\nConnectionOptions: TypeAlias = dict[str, str]\nAddress: TypeAlias = tuple[str, int]\nServer: TypeAlias = tuple[Address, ConnectionOptions]\n```\n\n### TypeVars\n\nUse descriptive names for TypeVars:\n\n```python\nfrom typing import TypeVar\n\n_T = TypeVar(\"_T\")  # Good: private, unconstrained\nAddableType = TypeVar(\"AddableType\", int, float, str)  # Good: descriptive\n```\n\n### Generics\n\nAlways specify type parameters for generic types:\n\n**Yes:**\n```python\ndef get_names(employee_ids: list[int]) -> dict[int, str]:\n    ...\n```\n\n**No:**\n```python\ndef get_names(employee_ids: list) -> dict:  # Missing type parameters\n    ...\n```\n\n### Imports for Typing\n\nImport typing symbols directly:\n\n```python\nfrom collections.abc import Mapping, Sequence\nfrom typing import Any, Union\n\n# Use built-in types for containers (Python 3.9+)\ndef foo(items: list[str]) -> dict[str, int]:\n    ...\n```\n\n## Common Patterns\n\n### Properties\n\nUse properties for simple attribute access:\n\n```python\nclass Square:\n    def __init__(self, side: float):\n        self._side = side\n    \n    @property\n    def area(self) -> float:\n        return self._side ** 2\n```\n\n### Conditional Expressions\n\nUse ternary operators for simple conditions:\n\n```python\nx = \"yes\" if condition else \"no\"\n```\n\n### Context Managers\n\nCreate custom context managers when appropriate:\n\n```python\nfrom contextlib import contextmanager\n\n@contextmanager\ndef managed_resource(*args, **kwargs):\n    resource = acquire_resource(*args, **kwargs)\n    try:\n        yield resource\n    finally:\n        release_resource(resource)\n```\n\n## Linting\n\nRun `pylint` on all Python code. Suppress warnings only when necessary with clear explanations:\n\n```python\ndict = 'something'  # pylint: disable=redefined-builtin\n```\n\n## Summary\n\nWhen writing Python code:\n\n1. Use type annotations for all functions\n2. Follow naming conventions consistently\n3. Write clear docstrings for all public APIs\n4. Keep functions focused and reasonably sized\n5. Use comprehensions for simple cases\n6. Prefer implicit false in boolean contexts\n7. Use f-strings for formatting\n8. Always use context managers for resources\n9. Run pylint and fix issues\n10. **BE CONSISTENT** with existing code\n\n## Additional Resources\n\nFor detailed reference on specific topics, see:\n\n- **references\u002Fadvanced_types.md** - Advanced type annotation patterns including Protocol, TypedDict, Literal, ParamSpec, and more\n- **references\u002Fantipatterns.md** - Common Python mistakes and their fixes\n- **references\u002Fdocstring_examples.md** - Comprehensive docstring examples for all Python constructs\n",{"name":5,"license":25,"description":7},"Complete terms in LICENSE.txt","master","63f17866001c5ca854bf2fa0b678ce277133de5b","skills\u002Fmarketplace\u002Fpython-style-guide",0,"https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS","https:\u002F\u002Fbg-szy.github.io\u002FTOP-SKILLS\u002F","https:\u002F\u002Fgithub.com\u002Fbg-szy","https:\u002F\u002Fwww.ecust.edu.cn\u002F","a student of East China University of Science and Technology","2026-11-15 03:38:02",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add bg-szy\u002FTOP-SKILLS --skill python-style-guide",{"tool":42,"command":43},"bunx","bunx skills add bg-szy\u002FTOP-SKILLS --skill python-style-guide",{"tool":45,"command":46},"pnpm","pnpm dlx skills add bg-szy\u002FTOP-SKILLS --skill python-style-guide","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fpython-style-guide\u002FSKILL.md",true,[50,54],{"path":51,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":16},"LICENSE","许可证",18650,{"path":55,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":58,"sourceHtmlUrl":59},"skill-report.json","REFERENCE","参考文档",92887,"https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fpython-style-guide\u002Fskill-report.json",[61,70,77,84,91,98],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":65,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":69},"01M7DXW9N826PKXK174PVW3038","serpmaven","Scrape Google search results (SERP) to JSON with SERP Maven (serpmaven) - a real Chrome browser on a residential proxy with sticky sessions. Run it as a CLI, a Python library, a local HTTP search API (`serve`), an MCP server or a Docker image; set the proxy login, workers, pages and cost tracking. Use when the user wants Google results, rank tracking, a self-hosted SERP API, or live Google search for an AI agent.","MIT","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fserpmaven\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":65,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":69},"01M7DXVHSTWDV65475QEQ915M7","revnu-landing-page-audit","Find out why a landing page isn't turning visitors into signups, demos or sales. Audits one page against what the ad, post or search that sends people there promised, then checks the first screen, proof, call to action, friction and mobile. Returns at most 7 prioritized fixes, plus what is fine and what could not be checked; rewrites specific lines and fixes the page in the repo when asked. Never promises a conversion lift. Works without a Revnu account. Use when the user says or asks: \"audit my landing page\", \"why isn't this page converting\", \"review my homepage\", \"my ads get clicks but no signups\", \"people bounce from the pricing page\", \"CRO review\", \"improve conversion rate\", \"is my hero section clear\", \"roast my landing page\", \"rewrite my headline\", \"what's wrong with this page\", \"landing page feedback\", \"make the signup page convert better\". Not for SEO or AI-search audits, page speed engineering on its own, or building a new page from scratch.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-landing-page-audit\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":65,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":69},"01M7DXV8X2D7B3VTD4HHYYHTGR","revnu-growth-context","Write down once who buys, what they're stuck on, what it costs, what proof you have and what you've already tried, so every growth task starts from facts instead of a questionnaire. Creates or updates .agents\u002Frevnu-growth.md from the repo, the live site and the user, and imports an existing product-marketing.md. Use when the user says \"set up our marketing context\", \"who is our ideal customer\", \"write our ICP\", \"describe the product for marketing\", \"positioning doc\", \"what's our brand voice\", \"remember this about our customers\", \"log what we tried\", \"what have we learned from marketing\", \"we changed pricing, update the context\", \"update our growth notes\", \"summarize the business for the agent\", \"import my product-marketing.md\", \"start a growth doc\", or before a first marketing, SEO, outreach or launch task when no context file exists. Works without a Revnu account.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-growth-context\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":65,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":69},"01M7DXV0DGJ1G0A60PAHC6J3C5","revnu-get-listed","Get onto the third-party pages AI answers and search cite when buyers ask for the best tool in your category: \"best X\" roundups, directories, review sites, GitHub awesome lists, community threads and comparison pages. Finds which ones are cited, ranks them by fit and effort, and drafts each submission, PR or pitch by the target's own rules. Use when the user says \"get us listed\", \"which directories should we submit to\", \"how do we get into best-of lists\", \"why does ChatGPT recommend competitors and not us\", \"get mentioned in AI answers\", \"submit to awesome lists\", \"get on G2\", \"where are our competitors listed\", \"pitch listicle authors\", \"find backlink opportunities\", \"launch directories\", \"get into roundups\", \"Product Hunt alternatives\", \"where should we be listed\", \"get cited by Perplexity\". Never submits, pays or posts without a yes. Works without a Revnu account.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-get-listed\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":65,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":69},"01M7DXTSPMGT9D6DSS0HP9BSTA","revnu-ai-readiness-audit","Audit whether your website gives ChatGPT, Perplexity, Claude, Gemini and Google's AI Overviews something worth quoting, and fix the pages that don't. Use when the user says or asks \"is my site ready for AI search\", \"audit my site for AI answers\", \"AEO audit\", \"GEO audit\", \"why doesn't ChatGPT quote our pricing\", \"make our pages citable by AI\", \"do I need llms.txt\", \"does schema help with ChatGPT\", \"check our structured data\", \"is our content visible without JavaScript\", \"AI SEO audit\", \"optimize our homepage for AI answers\", \"LLM SEO check\", \"why does AI get our product wrong\", \"fix our site for AI Overviews\". Checks fetchability and indexability, answers in the raw HTML, entity facts, schema (including JS-injected markup), headings, dates and llms.txt, then gives at most 10 prioritised fixes and edits the repo when asked. Works without a Revnu account.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-ai-readiness-audit\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":65,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":69},"01M7DXSZHCVTRS620GC3S97JZV","proxy-troubleshooting","Diagnose residential proxy failures, with NodeMaven's gateway as the reference - 407 with correct credentials, 406, 410, 500, a connection that hangs, ERR_TUNNEL_CONNECTION_FAILED in a browser, Playwright or Puppeteer ignoring proxy credentials, a sticky session that changes IP, geo-targeting that is silently ignored, passwords with special characters, and unexpected traffic from headless Chrome. Use when a proxy connection fails, returns the wrong location, or costs more traffic than expected.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fproxy-troubleshooting\u002FSKILL.md",[],[]]