Skip to content

CP-13479 Add vsdk-code-review skill for Claude Code - #680

Merged
abhi4122 merged 1 commit into
developfrom
dlpx/pr/abhi4122/591bb139-b7f4-434b-aef6-e9d1c1180175
Jul 7, 2026
Merged

CP-13479 Add vsdk-code-review skill for Claude Code#680
abhi4122 merged 1 commit into
developfrom
dlpx/pr/abhi4122/591bb139-b7f4-434b-aef6-e9d1c1180175

Conversation

@abhi4122

@abhi4122 abhi4122 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Problem

Code reviewers rely on tribal knowledge for vSDK-specific conventions — correct exception class per package, proto conversion pattern, _internal_* operation guards, plugin_validator.py for required ops, import ordering, copyright headers, etc. New contributors and Claude Code both lack a single reference that combines the style rules with the correctness invariants specific to this repo.

Solution

Add .claude/skills/vsdk-code-review/SKILL.md — a Claude Code skill that loads automatically when /vsdk-code-review is invoked. The skill covers:

  • CI enforcement summary — what pytest and flake8 --max-line-length 88 actually gate vs. what is convention only
  • Style conventions — copyright headers, import ordering (stdlib → third-party → local, alphabetical), Google-style docstrings, logging, max line length 88
  • Exception hierarchy — 13-row table mapping each exception class to its package and correct usage context (covers common, libs, platform, and tools)
  • Proto conversionto_proto() / from_proto() pattern with isinstance validation, CopyFrom() for nested fields
  • Architecture invariantsOperationNotDefinedError guard in _internal_* methods, __all__ in _plugin_classes.py, pkgutil.extend_path for namespace packages, plugin_validator.py for new required operations
  • CLI structurecli.py declarations-only, logic in commands/<cmd>.py
  • Test conventionspytest + mock, Maven-style tree mirroring, conftest.py fixtures
  • Common review checklist — four sections (Style, Correctness, Architecture, Tests) plus a Docs-only section for release-note heading format and operation-table updates

Testing Done

Skill was tested against four merged commits/PRs by running the checklist manually and reporting findings:

PR #630source_to_physical operation (446042f)

  • Found: stale virtual_to_physical references in docstrings/comments in _virtual.py (line 870, 889) and _linked.py (lines 343, 362, 939, 958) — operation rename not fully propagated
  • Found: import ordering violation in both _virtual.py and _linked.pyPhysicalSource appended after alphabetically-later symbols instead of inserted in order
  • Skill correctly identified both via the "same operation name consistently" and import ordering checklist items

Commit 22e9b50 — Azure Vault docs + v5.1.0 release notes

  • Found: docs/docs/Release_Notes/5.1.0/5.1.0_Breaking_Changes.md heading # Breaking Changes - v.5.1.0 has a spurious period — should be v5.1.0
  • Skill correctly flagged via the Docs checklist item on release note heading format

Commit 089fb8b — dependency bumps + test fixes

  • No violations. Three test fixes (try/finally for os.chdir, global removal, backslash style) are all genuine improvements. Clean pass.

Commit 080343f — v5.1.0 version bump

  • Found: incomplete regex fix in package_util.py:68r'([0-9]\.[0-9]{1,2}\.[0-9])' adds 2-digit minor support but PATCH is still single-digit; get_external_version_string('1.11.49') returns '1.11.4' silently. Complete fix: r'([0-9]+\.[0-9]+\.[0-9]+)'
  • Found: no parametrized test case added for a 2-digit minor version to verify the regex change works
  • Skill surfaced both via the Correctness (return values, silently swallowed bugs) and Test Quality checklist items

@abhi4122
abhi4122 force-pushed the dlpx/pr/abhi4122/591bb139-b7f4-434b-aef6-e9d1c1180175 branch 5 times, most recently from d290e85 to 19463d8 Compare July 2, 2026 09:20
@abhi4122
abhi4122 marked this pull request as ready for review July 2, 2026 09:22
@abhi4122
abhi4122 requested a review from a team as a code owner July 2, 2026 09:22
Comment thread .claude/skills/vsdk-code-review/SKILL.md Outdated
Comment thread .claude/skills/vsdk-code-review/SKILL.md
Comment thread CLAUDE.md Outdated
@abhi4122
abhi4122 force-pushed the dlpx/pr/abhi4122/591bb139-b7f4-434b-aef6-e9d1c1180175 branch 2 times, most recently from dd1c5e7 to bed4bd9 Compare July 3, 2026 06:11

@SumoSourabh SumoSourabh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Comment thread .claude/skills/vsdk-code-review/SKILL.md Outdated
@abhi4122
abhi4122 force-pushed the dlpx/pr/abhi4122/591bb139-b7f4-434b-aef6-e9d1c1180175 branch from bed4bd9 to e1a93ac Compare July 6, 2026 11:38
@abhi4122
abhi4122 merged commit 909bfd0 into develop Jul 7, 2026
8 checks passed
@abhi4122
abhi4122 deleted the dlpx/pr/abhi4122/591bb139-b7f4-434b-aef6-e9d1c1180175 branch July 7, 2026 04:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants