refactor: extract skills from commands across 10 plugins #338

Merged
lmiranda merged 7 commits from refactor/all-plugins-skills-extraction into development 2026-01-30 22:35:21 +00:00
Owner

Summary

Refactored all plugin commands to extract reusable skills following the Commands → Skills separation pattern established in projman.

  • 82 skill files created across 10 plugins
  • 65 commands refactored from avg ~150 lines to avg ~50 lines
  • ~66% reduction in command file sizes

Plugins Refactored

Plugin Commands Skills Created Reduction
clarity-assist 2 5 62%
cmdb-assistant 11 10 68%
claude-config-maintainer 5 7 82%
code-sentinel 3 3 35%
contract-validator 5 6 62%
data-platform 10 6 57%
doc-guardian 5 6 58%
git-flow 8 8 55%
pr-review 7 6 72%
viz-platform 10 7 69%

Architecture

Before: Commands contained detailed workflows, validation logic, conventions, and reference data (100-348 lines each)

After:

  • Commands: Entry points with YAML frontmatter, agent assignment, skills list, brief workflow steps (~50 lines)
  • Skills: Reusable knowledge files containing workflows, validation rules, conventions, tool references

Benefits

  • No duplication - Shared knowledge exists in ONE place
  • Composable - Agents can load different skill combinations
  • Maintainable - Update once, applies everywhere
  • Consistent - All plugins follow same pattern as projman

Test Plan

  • All marketplace validations pass (pre-commit hook)
  • No functionality removed (structural refactor only)
  • Verify commands still execute correctly
  • Verify skills are loaded by agents

🤖 Generated with Claude Code

## Summary Refactored all plugin commands to extract reusable skills following the Commands → Skills separation pattern established in projman. - **82 skill files** created across 10 plugins - **65 commands** refactored from avg ~150 lines to avg ~50 lines - **~66% reduction** in command file sizes ### Plugins Refactored | Plugin | Commands | Skills Created | Reduction | |--------|----------|----------------|-----------| | clarity-assist | 2 | 5 | 62% | | cmdb-assistant | 11 | 10 | 68% | | claude-config-maintainer | 5 | 7 | 82% | | code-sentinel | 3 | 3 | 35% | | contract-validator | 5 | 6 | 62% | | data-platform | 10 | 6 | 57% | | doc-guardian | 5 | 6 | 58% | | git-flow | 8 | 8 | 55% | | pr-review | 7 | 6 | 72% | | viz-platform | 10 | 7 | 69% | ### Architecture **Before:** Commands contained detailed workflows, validation logic, conventions, and reference data (100-348 lines each) **After:** - Commands: Entry points with YAML frontmatter, agent assignment, skills list, brief workflow steps (~50 lines) - Skills: Reusable knowledge files containing workflows, validation rules, conventions, tool references ### Benefits - **No duplication** - Shared knowledge exists in ONE place - **Composable** - Agents can load different skill combinations - **Maintainable** - Update once, applies everywhere - **Consistent** - All plugins follow same pattern as projman ## Test Plan - [x] All marketplace validations pass (pre-commit hook) - [x] No functionality removed (structural refactor only) - [ ] Verify commands still execute correctly - [ ] Verify skills are loaded by agents 🤖 Generated with [Claude Code](https://claude.ai/code)
lmiranda added 7 commits 2026-01-30 22:34:59 +00:00
Extract shared knowledge from 5 command files into 6 reusable skills:
- plugin-discovery.md: Plugin scanning and discovery
- interface-parsing.md: README.md and CLAUDE.md parsing
- dependency-analysis.md: MCP server and data flow analysis
- validation-rules.md: Compatibility and agent validation
- mcp-tools-reference.md: Available MCP tools
- visual-output.md: Standard formatting and headers

Slim commands from 263-164 lines down to 44-55 lines each.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Extract shared knowledge from 10 commands into 7 reusable skills:
- mcp-tools-reference.md: All viz-platform MCP tool signatures
- theming-system.md: Theme tokens, CSS variables, color palettes
- accessibility-rules.md: WCAG contrast, color-blind safe palettes
- dmc-components.md: DMC categories, validation, common props
- responsive-design.md: Breakpoints, mobile-first, grid config
- chart-types.md: Plotly chart types, export formats, resolution
- layout-templates.md: Dashboard templates, filter types

All commands now reference skills via "Skills to Load" section.
Commands reduced from 1396 lines total to 427 lines (69% reduction).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Extract 9 skill files from command knowledge:
  - mcp-tools-reference.md: Complete NetBox MCP tools reference
  - system-discovery.md: Bash commands for system info gathering
  - device-registration.md: Device registration workflow
  - sync-workflow.md: Machine sync process
  - audit-workflow.md: Data quality audit checks
  - ip-management.md: IP/prefix management and conflict detection
  - topology-generation.md: Mermaid diagram generation
  - change-audit.md: NetBox change audit workflow
  - visual-header.md: Standard visual header pattern

- Slim all 11 commands to under 60 lines:
  - cmdb-sync.md: 348 -> 57 lines
  - cmdb-register.md: 334 -> 51 lines
  - ip-conflicts.md: 238 -> 58 lines
  - cmdb-audit.md: 207 -> 58 lines
  - cmdb-topology.md: 194 -> 54 lines
  - initial-setup.md: 176 -> 74 lines
  - change-audit.md: 175 -> 57 lines
  - cmdb-site.md: 68 -> 50 lines
  - cmdb-ip.md: 65 -> 52 lines
  - cmdb-device.md: 64 -> 55 lines
  - cmdb-search.md: 46 lines (unchanged)

- Update agent to reference skills for best practices
- Preserve existing netbox-patterns skill

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Extract shared knowledge from clarify.md and quick-clarify.md into
reusable skill files:
- 4d-methodology.md: Core 4-phase clarification process
- nd-accommodations.md: Neurodivergent-friendly question patterns
- clarification-techniques.md: Anti-patterns and question templates
- escalation-patterns.md: Mode switching guidelines

Commands slimmed from 149/96 lines to 44/49 lines respectively.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Refactored commands to extract reusable skills following the
Commands → Skills separation pattern. Each command is now <50 lines
and references skill files for detailed knowledge.

Plugins refactored:
- claude-config-maintainer: 5 commands → 7 skills
- code-sentinel: 3 commands → 2 skills
- contract-validator: 5 commands → 6 skills
- data-platform: 10 commands → 6 skills
- doc-guardian: 5 commands → 6 skills (replaced nested dir)
- git-flow: 8 commands → 7 skills

Skills contain: workflows, validation rules, conventions,
reference data, tool documentation

Commands now contain: YAML frontmatter, agent assignment,
skills list, brief workflow steps, parameters

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
lmiranda merged commit f684b47161 into development 2026-01-30 22:35:21 +00:00
lmiranda deleted branch refactor/all-plugins-skills-extraction 2026-01-30 22:35:21 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: personal-projects/leo-claude-mktplace#338