-
Notifications
You must be signed in to change notification settings - Fork 2.7k
feat: Add Claude Agent Skills for automated PR descriptions and docstrings #4607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
xprabhudayal
wants to merge
3
commits into
livekit:main
Choose a base branch
from
xprabhudayal:add-claude-agent-skills
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+116
−0
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| --- | ||
| name: docstring | ||
| description: Generate Google-style docstrings for Python classes and functions | ||
| --- | ||
|
|
||
| Add or update docstrings for Python code. This skill follows Google-style docstrings compatible with pdoc3. | ||
|
|
||
| **Note:** For pdoc3 to properly render Google-style docstrings, ensure the module includes `__docformat__ = "google"` at the top, or run pdoc with `--docformat google`. | ||
|
|
||
| ## Usage | ||
|
|
||
| ```bash | ||
| /docstring ClassName | ||
| /docstring path/to/file.py | ||
| ``` | ||
|
|
||
| ## Instructions | ||
|
|
||
| 1. Find the target class or function | ||
| 2. If multiple matches exist, ask for clarification | ||
| 3. Skip already-documented code unless explicitly asked to update | ||
| 4. Generate comprehensive docstrings | ||
|
|
||
| ## Format | ||
|
|
||
| ```python | ||
| def function_name(arg1: str, arg2: int = 0) -> bool: | ||
| """Short one-line description. | ||
|
|
||
| Longer description if needed, explaining the purpose | ||
| and any important behavior. | ||
|
|
||
| Args: | ||
| arg1: Description of arg1. | ||
| arg2: Description of arg2. Defaults to 0. | ||
|
|
||
| Returns: | ||
| Description of return value. | ||
|
|
||
| Raises: | ||
| ValueError: When arg1 is empty. | ||
|
|
||
| Example: | ||
| >>> function_name("hello", 42) | ||
| True | ||
| """ | ||
| ``` | ||
|
|
||
| ## Class Docstrings | ||
|
|
||
| ```python | ||
| class MyClass: | ||
| """Short description of the class. | ||
|
|
||
| Longer description explaining the purpose and usage. | ||
|
|
||
| Attributes: | ||
| attr1: Description of attr1. | ||
| attr2: Description of attr2. | ||
| """ | ||
| ``` | ||
|
|
||
| ## Guidelines | ||
|
|
||
| - Keep the first line under 80 characters | ||
| - Use imperative mood ("Return" not "Returns") | ||
| - Document all public methods and attributes | ||
| - Include type hints in signatures, not docstrings | ||
| - Add Examples section for complex functionality | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| --- | ||
| name: pr-description | ||
| description: Generate or update PR descriptions following LiveKit conventions | ||
| --- | ||
|
|
||
| Create a pull request description for this branch. If updating, preserve key information. | ||
|
|
||
| ## Format | ||
|
|
||
| ```markdown | ||
| ## Summary | ||
|
|
||
| - Clear, bullet-point overview of changes | ||
| - Focus on the _why_, not just the _what_ | ||
|
|
||
| ## Changes | ||
|
|
||
| - List specific files/modules affected | ||
| - Note any breaking changes with ⚠️ prefix | ||
|
|
||
| ## Testing | ||
|
|
||
| - How was this tested? | ||
| - Include commands or steps if applicable | ||
|
|
||
| ## Related | ||
|
|
||
| - Fixes #XXX (if applicable) | ||
| ``` | ||
|
|
||
| ## Guidelines | ||
|
|
||
| - **Be concise** - Reviewers should understand in 30 seconds | ||
| - **Use bullet points** - Easier to scan | ||
| - **Don't duplicate the diff** - Explain intent, not implementation | ||
| - Follow [CONTRIBUTING.md](/CONTRIBUTING.md) guidelines | ||
| - **For Python changes:** Run `ruff check --fix` and `ruff format` before finalizing | ||
|
|
||
| ## Checklist | ||
|
|
||
| Before updating the PR: | ||
|
|
||
| - [ ] Verified existing description needs updating (not already complete) | ||
| - [ ] Summary accurately reflects the changes | ||
| - [ ] Breaking changes are clearly documented (if any) | ||
| - [ ] No unnecessary sections included | ||
| - [ ] Description is concise and scannable |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.