Add comprehensive plugin documentation: - README.md: Plugin overview, problem statement, tool docs, example workflows, issue types, best practices - claude-md-integration.md: CLAUDE.md snippets, interface documentation standards, CI/CD integration guide Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
3.0 KiB
3.0 KiB
contract-validator Plugin - CLAUDE.md Integration
Add this section to your marketplace or project's CLAUDE.md to enable contract validation features.
Suggested CLAUDE.md Section
## Contract Validation
This marketplace uses the contract-validator plugin for cross-plugin compatibility checks.
### Available Commands
| Command | Purpose |
|---------|---------|
| `/validate-contracts` | Full marketplace compatibility validation |
| `/check-agent` | Validate single agent definition |
| `/list-interfaces` | Show all plugin interfaces |
### Validation Workflow
Run before merging plugin changes:
1. `/validate-contracts` - Check for conflicts
2. Review errors (must fix) and warnings (should review)
3. Fix issues before merging
### Interface Documentation Standards
For plugins to be validated correctly, document interfaces in README.md:
**Commands Section:**
```markdown
## Commands
| Command | Description |
|---------|-------------|
| `/my-command` | What it does |
Tools Section:
## Tools Summary
### Category (N tools)
`tool_a`, `tool_b`, `tool_c`
Agents Section:
## Agents
| Agent | Description |
|-------|-------------|
| `my-agent` | What it does |
## Declaring Agent Tool References
For agent validation to work, document tool usage in CLAUDE.md:
### Option 1: Four-Agent Model Table
```markdown
### Four-Agent Model
| Agent | Personality | Responsibilities |
|-------|-------------|------------------|
| **Planner** | Methodical | Planning via `create_issue`, `search_lessons` |
Option 2: Agent Sections
### Planner Agent
Uses these tools:
- `create_issue` - Create planning issues
- `search_lessons` - Find relevant lessons
Best Practices for Plugin Authors
Unique Command Names
Avoid generic names that may conflict:
# BAD - Will conflict with other plugins
| `/setup` | Setup wizard |
# GOOD - Plugin-specific prefix
| `/data-setup` | Data platform setup wizard |
Document All Tools
Ensure every MCP tool is listed in README.md:
## Tools Summary
### pandas (14 tools)
`read_csv`, `read_parquet`, `read_json`, `to_csv`, `to_parquet`,
`describe`, `head`, `tail`, `filter`, `select`, `groupby`, `join`,
`list_data`, `drop_data`
Specify Dependencies
If agents depend on tools from other plugins, document it:
## Dependencies
This agent uses tools from:
- `projman` - Issue management (`create_issue`, `update_issue`)
- `data-platform` - Data loading (`read_csv`, `describe`)
Typical Workflows
Pre-Merge Validation
# Before merging new plugin
/validate-contracts
# Check specific agent after changes
/check-agent Orchestrator
Plugin Development
# See what interfaces exist
/list-interfaces
# After adding new command, verify no conflicts
/validate-contracts
CI/CD Integration
Add to your pipeline:
- name: Validate Plugin Contracts
run: |
claude --skill contract-validator:validate-contracts --args "${{ github.workspace }}"