self-review-checklist
npx machina-cli add skill theinterneti/TTA.dev/self-review-checklist --openclawFiles (1)
SKILL.md
1.7 KB
Self-Review Checklist (TTA.dev)
Run through this checklist before marking any task or PR as complete.
Code Quality
- All new functions have type annotations (
str | None, notOptional[str]) - All public functions have Google-style docstrings
- No manual retry/timeout/cache loops — use primitives
- State passed via
WorkflowContext, not globals - Import order: stdlib → third-party → local
Testing
- 100% coverage on new code
- Tests follow AAA pattern (Arrange-Act-Assert)
- Uses
MockPrimitivefor mocking (not real implementations) - Uses
@pytest.mark.asyncioon async tests - Tests cover success, failure, and edge cases
- No external dependencies in tests (databases, APIs, filesystem)
Security
- No secrets or credentials in code
- No new
eval(),exec(), orsubprocess.shell=True - URL validation uses
urlparse(), not substring checks
Quality Gate
-
uv run ruff format --check .— zero violations -
uv run ruff check .— zero violations -
uvx pyright platform/— zero errors -
uv run pytest -v— all tests pass
Documentation
- README updated if public API changed
- Code examples are copy-paste runnable
- Changed files have updated docstrings
Deep Reference
- Testing details:
docs/agent-guides/testing-architecture.md - Python standards:
docs/agent-guides/python-standards.md
Source
git clone https://github.com/theinterneti/TTA.dev/blob/main/.claude/skills/self-review-checklist/SKILL.mdView on GitHub Overview
This skill provides a thorough pre-merge checklist to catch common mistakes before code review. It organizes checks across code quality, testing, security, quality gates, and documentation to help teams ship reliable changes.
How This Skill Works
Apply the checklist to your PR branch before submission: verify type annotations and docstrings, ensure tests meet coverage goals, guard against secrets or unsafe calls, and confirm formatting and tooling checks pass. Reference linked docs for testing standards and Python standards as needed.
When to Use It
- Before submitting a pull request for review or merging a PR
- After implementing new code or features to ensure quality gates are met
- When adding or updating tests to achieve or validate 100% coverage
- When making public API changes or code changes that affect external interfaces
- When preparing for CI checks or a security review
Quick Start
- Step 1: Run through the Self-Review Checklist on your branch before pushing
- Step 2: Verify code quality, tests, security, and docs items are checked off
- Step 3: Push changes and open the PR for review
Best Practices
- Aim for 100% test coverage on new code
- Annotate new functions and provide Google-style docstrings for public APIs
- Avoid manual retry loops; prefer primitives and explicit control flow
- Keep secrets out of code and avoid dangerous constructs like eval/exec
- Run formatting and type checks locally (ruff, pyright) and ensure docs reflect public APIs
Example Use Cases
- PR adds a new data processing function with complete type hints, docstring, and dedicated tests achieving full coverage
- PR introduces a public API change with updated docstrings and README examples
- PR updates tests to use MockPrimitive and covers success, failure, and edge cases
- PR passes local ruff format/check and pyright without errors
- PR ensures no secrets are committed and URL validation uses urlparse
Frequently Asked Questions
Add this skill to your agents