2.6 KiB
2.6 KiB
molecule-skill-code-review — Multi-Criteria Code Review Skill
molecule-skill-code-review provides a multi-criteria code review skill
that checks PRs against best practices, modularity, scalability, abstraction,
test coverage, redundancy, hardcoded values, type safety, performance, naming,
API design, async patterns, config/env sync, template consistency, and
documentation alignment.
Version: 1.0.0
Runtime: claude_code
Repository Layout
molecule-skill-code-review/
├── plugin.yaml — Plugin manifest
├── skills/
│ └── code-review/
│ └── SKILL.md — Full review criteria and process
└── adapters/ — Harness adaptors
Review Criteria
The skill evaluates PRs across these dimensions:
| Category | Checks |
|---|---|
| Best practices | Language idioms, error handling, resource cleanup |
| Modularity | Single responsibility, low coupling |
| Scalability | Algorithm complexity, pagination, streaming |
| Abstraction | Correct use of interfaces/types |
| Test coverage | Tests for new logic, edge cases |
| Redundancy | DRY violations, copy-paste |
| Hardcoded values | Secrets, URLs, magic numbers |
| Type safety | Explicit types, no any |
| Performance | N+1 queries, missing indexes |
| Naming | Descriptive, consistent |
| API design | REST conventions, idempotency |
| Async patterns | Correct use of async/await |
| Config/env sync | Config changes reflected in env |
| Template consistency | Follows repo conventions |
Development
Prerequisites
- Python 3.11+
ghCLI authenticated- Write access to
Molecule-AI/molecule-ai-plugin-molecule-skill-code-review
Setup
git clone https://git.moleculesai.app/molecule-ai/molecule-ai-plugin-molecule-skill-code-review.git
cd molecule-ai-plugin-molecule-skill-code-review
python3 -c "import yaml; yaml.safe_load(open('plugin.yaml'))"
Pre-Commit Checklist
python3 -c "import yaml; yaml.safe_load(open('plugin.yaml'))"
python3 -c "
import re, sys
with open('plugin.yaml') as f:
content = f.read()
patterns = [r'sk.ant', r'ghp.', r'AKIA[A-Z0-9]']
if any(re.search(p, content) for p in patterns):
print('FAIL: possible credentials found')
sys.exit(1)
print('No credentials: OK')
"
Release Process
- Review changes:
git log origin/main..HEAD --oneline - Bump
versioninplugin.yaml(semver) - Commit:
chore: bump version to X.Y.Z - Tag and push:
git tag vX.Y.Z && git push origin main --tags - Create GitHub Release with changelog
Known Issues
See known-issues.md at the repo root.