Leetcode Py
wislertt/leetcode-py
Generates Python LeetCode practice environments and manages a 307-problem catalog with the lcpy CLI.
Read before writing or reviewing any Python code in this repository.
$ npx skills add lightly-ai/lightly-studio --skill python-guide -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install lightly-ai/lightly-studio python-guide --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/lightly-ai/lightly-studio.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/python-guide .claude/skills/python-guide && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "python-guide" agent skill from https://github.com/lightly-ai/lightly-studio/tree/main/.agents/skills/python-guide into .claude/skills/python-guide/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "python-guide", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/lightly-ai/lightly-studio/tree/main/.agents/skills/python-guideType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add lightly-ai/lightly-studio --skill python-guide -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install lightly-ai/lightly-studio python-guide --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/lightly-ai/lightly-studio.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/python-guide .agents/skills/python-guide && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "python-guide" agent skill from https://github.com/lightly-ai/lightly-studio/tree/main/.agents/skills/python-guide into .agents/skills/python-guide/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "python-guide", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add lightly-ai/lightly-studio --skill python-guide -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install lightly-ai/lightly-studio python-guide --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/lightly-ai/lightly-studio.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/python-guide .cursor/skills/python-guide && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "python-guide" agent skill from https://github.com/lightly-ai/lightly-studio/tree/main/.agents/skills/python-guide into .cursor/skills/python-guide/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "python-guide", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/lightly-ai/lightly-studio.git --path .agents/skills/python-guide--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add lightly-ai/lightly-studio --skill python-guide -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install lightly-ai/lightly-studio python-guide --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/lightly-ai/lightly-studio.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/python-guide .gemini/skills/python-guide && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "python-guide" agent skill from https://github.com/lightly-ai/lightly-studio/tree/main/.agents/skills/python-guide into .gemini/skills/python-guide/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "python-guide", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install lightly-ai/lightly-studio python-guideInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add lightly-ai/lightly-studio --skill python-guide -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/lightly-ai/lightly-studio.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/python-guide .github/skills/python-guide && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "python-guide" agent skill from https://github.com/lightly-ai/lightly-studio/tree/main/.agents/skills/python-guide into .github/skills/python-guide/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "python-guide", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add lightly-ai/lightly-studio --skill python-guide -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install lightly-ai/lightly-studio python-guide --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/lightly-ai/lightly-studio.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/python-guide .opencode/skills/python-guide && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "python-guide" agent skill from https://github.com/lightly-ai/lightly-studio/tree/main/.agents/skills/python-guide into .opencode/skills/python-guide/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "python-guide", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
python-guideRead before writing or reviewing any Python code in this repository.
Python Guide is an agent skill from lightly-ai/lightly-studio. Read before writing or reviewing any Python code in this repository. Covers import style (modules for functions, direct for classes), file layout ordering (private functions at the bottom), protocols vs ABCs, TODO and comment format, assertions, preference for keyword arguments, docstrings including tensor shapes, typing, and pytest conventions.
Its SKILL.md is about 3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Testing & QA, covering Technical documentation and Unit testing. It works with Python and pytest. The repository describes itself as: LightlyStudio - The Unified Data Platform for Multimodal ML. The licence is Apache-2.0.
Read from SKILL.md and the folder at commit 66da613. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are python).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Python Guide loads about 3k tokens when it runs. Until then it costs about 90 tokens; SKILL.md has 1,070 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from lightly-ai/lightly-studio at commit 66da613, republished under its Apache-2.0 licence (© lightly-ai). 1,070 words, ~2,967 tokens.
.claude/skills/python-guide/SKILL.md (or your agent's skills folder).No rules here are hard, but they are strong recommendations. The golden rule is to make the code easy to understand and difficult to break.
We use the ruff code formatter and mypy type checker with custom settings. You don't need to check rules enforced by these tools like e.g. line length.
from mypackage import mymodule
from mypackage.mymodule import MyClass
mymodule.foo()
c = MyClass()Exceptions from the guidelines:
typing, dataclasses, abc, sqlmodel, sqlalchemyfrom x import y
class MyClass:
def __init__(self):
...
def foo(self):
...
def _helper_method(self):
...
def bar(...):
...
def _helper_func(...):
...Use the following format: # TODO({name}, {mm}/{yyyy}): Blah blah
# TODO(Michal, 08/2023): Blah blahUse ASD-STE100 Simplified Technical English, avoid bloat. Describe the current state, not the change. Prefer properly formatted comments with a leading capital and punctuation. Final full stop may be omitted for a single sentence.
# This is a proper comment. It spans multiple sentences.
...
# Single sentences can have the final full stop omitted
...
# we don't do this <-
...They can be used:
It’s ok to not test assertions as they’re not the intended behavior of a function.
Example:
def get_metrics(values: list[float]) -> Something:
...
if len(values) < 2:
std = 0 # Or an Error is raised.
else:
std = _get_std(values)
...
def _get_std(sequence: Sequence[float]) -> float:
"""Gets the standard deviation of a sequence
Args:
sequence:
The sequence to get the std of.
Must have a length >= 2.
Returns:
The standard deviation of a sequence.
"""
assert len(sequence) >= 2
return np.std(sequence)Call functions using keyword arguments, whether or not the arguments are declared keyword-only with *. Do not declare arguments as keyword-only with * in our code.
def fn(hello: str, person: str) -> None:
...
fn(hello="Grüezi", person="Bob")The exception of using positional arguments is allowed for
transform: Callable[[Tensor], Tensor] must be called as transformed = transform(tensor)print, math.exp, zip, isinstance, dict.get, etc.datetime, pytest, numpy, pytorch, logging, etc.select, col, etc.__init__.py filesDon't put logic in __init__.py files. They should be preferrably empty, or just expose submodule symbols for convenience.
Exceptions may apply occasionally. Such logic should be accompanied by a comment explaining why it is done.
We use Google style docstrings.
def foo(bar: int) -> str:
"""Summary of function here.
Longer function information...
Args:
bar: Description of the argument `bar`.
Returns:
Description of the return value.
Raises:
ValueError: Description of the error that may be raised.
"""Document the functionality of the class and its public attributes if they are not already documented on the class level.
class SampleClass:
"""Summary of class here.
Longer class information...
Attributes:
likes_spam: A boolean indicating if we like SPAM or not.
eggs: An integer count of the eggs we have laid.
"""
name: str
"""An example docstring."""
Args and Returns sections should be documented through capital letters in parentheses.dtypes must be documented unless the dtype is torch.float32 which is assumed to be the default. def forward(self, pointclouds: Tensor, index: Tensor) -> Tensor:
"""Propagates a batch of 3D point clouds through the model.
B corresponds to the batch size, N is the number of points in each (padded)
pointcloud and D is the output dimension of the extracted features.
Args:
pointclouds: Tensor of shape (B, N, 3).
index: Binary index for the padded pointcloud of shape (B, N) of dtype
`torch.bool`.
Returns:
Reduced point clouds of the shape (B, D).
"""
self.likes_spam = likes_spam
self.eggs = 0All our code must be typed.
Prefer Python 3.10+ syntax for built-ins
lst: list[int], bad: lst: typing.List[int]path: str | None, bad: path: typing.Optional[str]from __future__ import annotations . To use also Pydantic, pip install eval_type_backport. Also typing_extensions package might be needed.Use built in ABCs
Sequence and Mapping for immutable list and dictfrom collections.abc import Sequence, Mappingfrom typing import Sequence, MappingUse abstract inputs and concrete outputs:
Good (note: toy example, it could accept and return Iterable in this case):
def add_suffix_to_list(lst: Sequence[str], suffix: str) -> list[str]:
return [x + suffix for x in lst]Be specific when ignoring a type error
def foo(x: Any) -> None: # type: ignore[misc]def foo(x: Any) -> None: # type: ignoreTorch typing
from torch import TensorFloatTensor and LongTensor should NOT be used as they are deprecated and cannot be typed by mypy.P(correct|passes): The probability that an implementation is correct given the test passes.pytest.mark.parametrize decorator on the test# Bad: The first import stores dimension 3, the RandomEmbedder() default in patch_collection.
# The name "wider" is true only while that default is less than 4.
dataset.add_images_from_path(path=tmp_path / "first")
_register_wider_random_embedder(mocker=mocker)
with pytest.raises(ValueError, match=r"does not match"):
dataset.add_images_from_path(path=tmp_path / "second")
# Good: The test body shows both dimensions.
_patch_registry(mocker=mocker, embedder=RandomEmbedder(dimension=3))
dataset.add_images_from_path(path=tmp_path / "first")
_patch_registry(mocker=mocker, embedder=RandomEmbedder(dimension=4))
with pytest.raises(ValueError, match=r"does not match"):
dataset.add_images_from_path(path=tmp_path / "second")from pytest_mock import MockerFixture
def test_foo(mocker: MockerFixture):
mock_bar = mocker.patch.object(mymodule, "bar", return_value=42)
mock_bar.assert_called_once_with(...)
mock_obj = mocker.MagicMock()Tests must be located in a folder structure parallel
to src/{package_name} and use the following naming conventions:
# src/my_package/dir/source.py
class MyClass:
def __init__(self): ...
def foo(self): ...
class _InternalClass:
def _helper_method(self): ...
def bar(...): ...
def _helper_func(...): ...# tests/dir/test_source.py
class TestMyClass:
def test_init(self): ...
def test_init__some_special_case(self): ...
def test_foo(self): ...
def test_{method_name_underscores_stripped}{__{special_case} | ''}
class TestInternalClass:
def test_helper_method(self): ...
def test_helper_method__my_special_case(self): ...
def test_bar(): ...
def test_helper_func(): ...Keep the order of test functions the same as the tested functions order.
© lightly-ai, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/python-guide of lightly-ai/lightly-studio.
Open the folder on GitHubat commit 66da613
Python Guide next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Python Guide this skilllightly-ai/lightly-studio | 896 | — | ~3k | Automated safety check: Pass | Apache-2.0 | |
| Leetcode Pywislertt/leetcode-py | 142 | — | ~1.4k | Automated safety check: Pass | Apache-2.0 | |
| Python Testingmacalbert/envilder | 138 | — | ~3.1k | Automated safety check: Pass | MIT | |
| Simple Modern Uvjlevy/simple-modern-uv | 301 | — | ~1.9k | Automated safety check: Pass | MIT | |
| JS-in-HTML Testingliaohch3/claude-tap | 3.3k | — | ~924 | Automated safety check: Pass | MIT | |
| Python Helpershepherdjerred/monorepo | 112 | — | ~2.3k | Automated safety check: Pass | GPL-3.0 |
wislertt/leetcode-py
Generates Python LeetCode practice environments and manages a 307-problem catalog with the lcpy CLI.
macalbert/envilder
Mandatory testing conventions including AAA pattern, test naming, assertions, and mocks.
jlevy/simple-modern-uv
Start, selectively modernize, fully migrate, or update Python projects using simple-modern-uv practices: uv, ruff, BasedPyright, pytest, GitHub Actions CI, and tag-driven PyPI publishing.
liaohch3/claude-tap
Tests JavaScript embedded in an HTML file in two layers: pytest checks of the logic ported to Python, and Playwright runs in a real browser for the DOM.
shepherdjerred/monorepo
Current Python development guidance for versions, uv and pip, packaging, typing, asyncio, pytest, Ruff, security, and runtime boundaries.
google/adk-python
Checks that every Python code block in a Markdown file actually compiles and runs, by extracting each block to a temporary file, executing it in an isolated subprocess, and writing a pass/fail…
lightly-ai/lightly-studio
Read before adding or changing backend code in lightlystudio - FastAPI routes, services, resolvers, SQLModel tables, or database access.
lightly-ai/lightly-studio
Read before writing or reviewing any frontend code in lightlystudioview - Svelte, TypeScript, or SvelteKit files.
lightly-ai/lightly-studio
Read when naming anything user-facing - GUI text, docs, public Python API names, arguments, docstrings, or error messages.
lightly-ai/lightly-studio
Read when opening a pull request, writing a PR description, splitting work into PRs, or deciding whether a change is too large to review.
lightly-ai/lightly-studio
Read when adding a new function, module, or component, or when a file is growing large enough that splitting it is worth considering.
Categories
Read before writing or reviewing any Python code in this repository. Python Guide is an agent skill from lightly-ai/lightly-studio. Read before writing or reviewing any Python code in this repository.
Python Guide fits situations like: tasks that involve Technical documentation; tasks that involve Unit testing.
Run `npx skills add lightly-ai/lightly-studio --skill python-guide -a claude-code`. Or copy the skill folder (.agents/skills/python-guide in lightly-ai/lightly-studio) into .claude/skills/python-guide in your project. Claude Code loads it when a task matches its description.
Run `npx skills add lightly-ai/lightly-studio --skill python-guide -a codex`. Or copy the skill folder (.agents/skills/python-guide in lightly-ai/lightly-studio) into .agents/skills/python-guide in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add lightly-ai/lightly-studio --skill python-guide -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/python-guide, .gemini/skills/python-guide, .github/skills/python-guide and .opencode/skills/python-guide in your project.
SKILL.md names no scripts, command-line tools or credentials: Python Guide is instructions for the agent only. Our summary lists: Python 3.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Python Guide is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 3k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Python Guide: Leetcode Py (wislertt/leetcode-py, 142 stars), Python Testing (macalbert/envilder, 138 stars), Simple Modern Uv (jlevy/simple-modern-uv, 301 stars) and JS-in-HTML Testing (liaohch3/claude-tap, 3.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
lightly-ai (a GitHub organization) maintains it in lightly-ai/lightly-studio, which has 896 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 7, 2026.
Source: lightly-ai/lightly-studio on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.