marketplaces — Claude Code rule: what it does, how to install
The marketplaces rule for Claude Code organizes component discovery and integration from external registries. It helps the agent evaluate code quality before adding dependencies.
Apache-2.0 ★ 141 updated 2026-11-17
.claude/rules/marketplaces.mdWhat marketplaces does
This rule guides the agent when sourcing and using components from platforms like 21st.dev. It defines criteria for checking production-readiness, documentation depth, and demo availability, preventing the inclusion of substandard dependencies.
To install for Claude Code, create a file at .claude/rules/marketplaces.md. The rule accounts for integration patterns like shadcn/ui and enforces diligence by requiring verification of author reputation and maintenance status, reducing long-term technical debt.
What it helps with
- evaluate third-party component quality
- execute installation via
npx shadcn@latest - verify component compliance with project requirements
- audit dependencies before integration
Example prompts for the agent
- Find a suitable dialog component on 21st.dev and verify it against the marketplaces rule
- Install a component from 21st.dev using
npx shadcn@latest add - Check if the selected UI component meets accessibility and testing requirements
How to install marketplaces
Manually: put the files in place
.claude/rules/marketplaces.mdThe paths frontmatter field limits the files
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.cursor/rules/marketplaces.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.github/instructions/marketplaces.instructions.mdThe applyTo field sets which files it applies to
Manually: put the files in place
.devin/rules/marketplaces.mdManually: put the files in place
.clinerules/marketplaces.mdStep by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use
Questions about marketplaces
How to install the marketplaces rule in Claude Code?
Create a .claude/rules/marketplaces.md file in your project root and paste the rule content inside.
What does the marketplaces rule do?
It establishes standards for evaluating and integrating components from marketplaces to ensure that only tested, high-quality code enters your codebase.
What is required to use components with this rule?
You need Node.js installed in your environment and the shadcn/ui CLI available to run the npx shadcn@latest add command.
Source text
marketplaces.md · Apache-2.0
---
title: Component Marketplaces
impact: LOW
impactDescription: Centralized discovery and distribution
tags: marketplaces, 21st-dev, distribution, discovery, publishing
---
## Component Marketplaces
Marketplaces like [21st.dev](https://21st.dev) combine registry accessibility with package repository discoverability.
### When to Use
**For Publishing:**
- Share without managing infrastructure
- Reach built-in audience
- Monetize your work
- Get community feedback
**For Consuming:**
- Curated discovery by category
- Quality assurance
- Unified tooling
### Installation Pattern
```bash
npx shadcn@latest add https://21st.dev/r/<author>/<component>
```
Example:
```bash
npx shadcn@latest add https://21st.dev/r/haydenbleasel/dialog-stack
```
### What Marketplaces Provide
1. **Hosting** - No infrastructure management
2. **Unified CLI** - Same installation pattern
3. **Previews** - Live demos and examples
4. **Discovery** - Search, categories, recommendations
### Publishing Requirements
Ensure components have:
- Comprehensive documentation
- Multiple demo variations
- Responsive design
- Cross-browser testing
- Accessibility compliance
- Production-ready code
**Bad:**
```json
{
"name": "my-component",
"description": "A component",
"demos": []
}
```
Incomplete documentation, no demos, minimal description - marketplace users can't evaluate quality.
**Good:**
```json
{
"name": "dialog-stack",
"description": "A composable dialog system with stack management, keyboard navigation, and focus trapping",
"demos": [
{
"title": "Basic Dialog",
"description": "Simple modal dialog with close button",
"code": "..."
},
{
"title": "Nested Dialogs",
"description": "Multiple dialogs in a stack",
"code": "..."
},
{
"title": "Form Dialog",
"description": "Dialog with form validation",
"code": "..."
}
],
"documentation": {
"props": "...",
"examples": "...",
"accessibility": "..."
}
}
```
Comprehensive documentation, multiple demo variations, clear descriptions - enables proper evaluation.
### Benefits
**For Authors:**
- Distribution without infrastructure
- Built-in audience and discovery
- Monetization opportunities
- Community feedback (ratings, comments)
**For Consumers:**
- Curated discovery by category
- Quality assurance through reviews
- Unified installation tooling
### Challenges
**For Authors:**
- Competition and visibility
- Platform dependency
- Quality pressure
**For Consumers:**
- Variable quality despite reviews
- Lock-in concerns
- Discovery paradox (too much choice)
### Best Practices
**When Publishing:**
1. Only publish production-ready components
2. Document thoroughly
3. Create multiple demos
4. Test extensively
5. Maintain actively
6. Engage with community
**When Consuming:**
1. Evaluate before installing
2. Test in your environment
3. Check maintenance status
4. Review code quality
5. Consider alternatives
### Discovery Categories
```
Browse by category:
├── Marketing (Heroes, Pricing, Testimonials)
├── Application (Dashboards, Forms, Data Display)
└── E-commerce (Product Cards, Cart, Checkout)
```
### Due Diligence
Always check:
- Component age and last update
- Documentation quality
- Author reputation
- Dependencies and compatibility
- Test in your environment
© maxtrigify · Apache-2.0 · maxtrigify/Otto