Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4172 +/- ##
==========================================
- Coverage 68.85% 68.82% -0.03%
==========================================
Files 467 468 +1
Lines 46983 47087 +104
==========================================
+ Hits 32349 32407 +58
- Misses 11974 11998 +24
- Partials 2660 2682 +22 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@jerm-dro is generating an anti-pattern skill the way to go? What about having a code-review skill for vmcp in general and writing in the skill that it must watch for antipatterns. Those antipatterns could then go in a reference in the skill. wdyt? |
|
I would recommend:
Ideally, since vMCP is part of the same CC project that toolhive, I would try to consolidate in the existing Agent I am proposing: #4189 |
The current PR has
Nice, I'll change this to also use a rule.
I'll also update the |
Introduces a Claude Code skill that reviews vMCP code for 9 known anti-patterns: context variable coupling, repeated body read/restore, god object, middleware overuse, string-based error classification, silent error swallowing, SDK coupling leakage, config sprawl, and mutable shared state through context. Each anti-pattern includes detection guidance and concrete alternatives. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move anti-patterns catalog to docs/vmcp-anti-patterns.md as a single source of truth. Create a glob-scoped rule for automatic loading when editing vMCP code, rename the skill to vmcp-review, and integrate it into the code-reviewer agent as an additional check for vMCP changes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
05f039e to
b2800c1
Compare
|
@JAORMX @aponcedeleonch Thanks for the review. I've addressed your comments. PTAL! |
aponcedeleonch
left a comment
There was a problem hiding this comment.
nice! a couple of nits and suggestions but looks good
- Fix frontmatter: use `paths` instead of `globs`, remove unsupported `description` - Inline anti-pattern detection guidance directly in the rule instead of referencing docs/vmcp-anti-patterns.md, so the agent doesn't need an extra file read - Remove items 5 (String-Based Error Classification) and 6 (Silent Error Swallowing) since they're already covered by go-style.md - Update skill to reference the rule file instead of docs/ - Renumber remaining anti-patterns (now 1-7 instead of 1-9) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
91fbda1
The anti-pattern catalog is now inlined directly in the rule file (.claude/rules/vmcp-anti-patterns.md), so this file is no longer referenced by any agent or skill. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Thanks @aponcedeleonch. Comments addressed! PTAL. |
Summary
/vmcp-anti-pattern-review) that codifies 9 anti-patterns identified through codebase analysis, each with detection guidance and concrete alternatives.Type of change
Test plan
Invoked
/vmcp-anti-pattern-reviewin Claude Code and verified it loads the skill and anti-pattern catalog correctly.Changes
.claude/skills/vmcp-anti-pattern-review/SKILL.md.claude/skills/vmcp-anti-pattern-review/ANTI-PATTERNS.mdDoes this introduce a user-facing change?
No. This is internal developer tooling for AI-assisted code review.
Special notes for reviewers
The anti-patterns were identified through analysis of the current vMCP codebase (
pkg/vmcp/,cmd/vmcp/). The "known instances" sections reference real code locations. The catalog is intended to evolve — new anti-patterns can be added as they're identified, and existing entries updated as the codebase improves.Key design decisions in the alternatives:
#1(context coupling) recommends pushing data ontoMultiSessionas the primary alternative, since it's a well-typed domain object that's 1:1 with requests and decoupled from protocol concerns.#4(middleware overuse) similarly recommends domain objects over middleware for non-cross-cutting concerns.#7(SDK coupling) accepts the two-phase session pattern as necessary but emphasizes containing it at the adapter boundary.Generated with Claude Code