code-review
code-review
Review code changes following pplx-sdk project standards and the layered architecture.
When to use
Use this skill when reviewing pull requests or code changes in the pplx-sdk repository to ensure compliance with project conventions.
Instructions
- Check architecture layer compliance: Verify imports respect
core → shared → transport/domain → clientdependency flow. No circular imports allowed. - Verify type safety: All functions must have complete type annotations. Use
from __future__ import annotationsat the top of every module. - Validate error handling: Custom exceptions from
pplx_sdk.core.exceptionsmust be used — never bareException. Chain exceptions withfrom exc. - Review docstrings: Google-style docstrings required on all public classes and methods, including Args, Returns, Raises sections.
- Check test coverage: Tests follow Arrange-Act-Assert pattern with descriptive names (
test_<module>_<behavior>). - Inspect Pydantic models: Domain models use Pydantic v2
BaseModelwithField()descriptions. - Verify transport protocol: Transport implementations conform to the
Transportprotocol frompplx_sdk.core.protocols.
Architecture Layer Rules
core/ → No imports from other pplx_sdk modules
shared/ → May import from core/ only
transport/ → May import from core/, shared/
domain/ → May import from core/, shared/, transport/
client.py → May import from all layers
Exception Hierarchy
PerplexitySDKError (base)
├── TransportError (status_code, response_body)
│ ├── AuthenticationError (401)
│ └── RateLimitError (429, retry_after)
├── StreamingError
└── ValidationError
Output Format
For each file reviewed, provide:
- ✅ Passes — or
- ❌ Issue found: description and suggested fix
More from pv-udpv/pplx-sdk
code-analysis
Deep code analysis for pplx-sdk — parse Python AST, build dependency graphs, extract knowledge graphs, detect patterns, and generate actionable insights about code structure, complexity, and relationships. Use when analyzing code quality, mapping dependencies, or building understanding of the codebase.
19spa-reverse-engineer
Reverse engineer Single Page Applications built with React + Vite + Workbox — analyze SPA internals via Chrome DevTools Protocol (CDP), write browser extensions, intercept service workers, and extract runtime state for SDK integration.
19sse-streaming
Implement and debug SSE (Server-Sent Events) streaming for the Perplexity AI API, including parsing, reconnection, and retry logic.
18reverse-engineer
Reverse engineer Perplexity AI web APIs — intercept browser traffic, decode undocumented endpoints, map request/response schemas, extract auth flows, and translate discoveries into SDK code.
18api-design-principles
Master REST and GraphQL API design principles to build intuitive, scalable, and maintainable APIs that delight developers. Use when designing new APIs, reviewing API specifications, or establishing API design standards.
18test-fix
Diagnose and fix failing pytest tests in the pplx-sdk project, following existing test patterns and conventions.
17