Conduct strict code review for AgentScope framework PRs following lazy loading, encapsulation, security, testing, and documentation standards
Conduct a strict code review for AgentScope framework pull requests. Each requirement is labeled with priority that determines review outcome.
#### [MUST] Lazy Loading
- Third-party libraries are those NOT in `dependencies` variable in `pyproject.toml`
```python
def get_xxx_cls() -> "MyClass":
from xxx import BaseClass
class MyClass(BaseClass): ...
return MyClass
```
#### [SHOULD] Code Conciseness
After understanding code intent, check for optimization opportunities:
#### [MUST] Encapsulation Standards
#### [MUST] Comment Standards
```python
def func(a: str, b: int | None = None) -> str:
"""{description}
Args:
a (`str`):
The argument a
b (`int | None`, optional):
The argument b
Returns:
`str`:
The return str
"""
```
```python
class MyClass:
"""xxx
`Example link <https://xxx>`_
.. note:: Example note
.. tip:: Example tip
.. important:: Example important info
.. code-block:: python
def hello_world():
print("Hello world!")
"""
```
#### [MUST] Pre-commit Checks
#### [MUST] PR Title
1. Read the PR description and changed files
2. Apply each checklist item systematically
3. Flag violations with priority level ([MUST], [SHOULD], [MAY])
4. For [MUST] violations, explicitly state PR cannot be approved
5. Provide specific file/line references for all findings
6. Suggest concrete fixes with code examples when applicable
Organize findings by priority level:
**[MUST] Blockers:**
**[SHOULD] Recommendations:**
**[MAY] Suggestions:**
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/agentscope-code-review-d4c8z9/raw