← back to ClawCoder

src/lib/marketplace/data.ts

844 lines

// =============================================================================
// Marketplace Data — Curated listings from the Claude Code ecosystem
// =============================================================================

export interface MarketplaceListing {
  id: string
  name: string
  category: 'skill' | 'subagent' | 'mcp-server' | 'hook' | 'template'
  description: string
  source: string
  installCmd: string
  author: string
  trustLevel: 'official' | 'verified' | 'community'
  stars?: number
  tags: string[]
  profileMatch: string[]
}

// =============================================================================
// SKILLS (10)
// =============================================================================

const skills: MarketplaceListing[] = [
  {
    id: 'skill-self-improving-agent',
    name: 'Self-Improving Agent',
    category: 'skill',
    description:
      'Enables Claude to iteratively improve its own outputs by self-critiquing, revising, and validating results against defined quality criteria.',
    source: 'https://github.com/alirezarezvani/claude-skills',
    installCmd: 'claude skills add self-improving-agent --from alirezarezvani/claude-skills',
    author: 'alirezarezvani',
    trustLevel: 'community',
    stars: 1200,
    tags: ['meta', 'self-improvement', 'iteration', 'quality'],
    profileMatch: [
      'professional-intermediate',
      'professional-expert',
      'young-adult-expert',
      'pre-senior-expert',
      'senior-expert',
    ],
  },
  {
    id: 'skill-security-auditor',
    name: 'Security Auditor',
    category: 'skill',
    description:
      'Scans code for common vulnerabilities including injection attacks, hardcoded secrets, insecure dependencies, and OWASP Top 10 issues.',
    source: 'https://github.com/alirezarezvani/claude-skills',
    installCmd: 'claude skills add security-auditor --from alirezarezvani/claude-skills',
    author: 'alirezarezvani',
    trustLevel: 'community',
    stars: 1200,
    tags: ['security', 'audit', 'OWASP', 'vulnerability'],
    profileMatch: [
      'professional-intermediate',
      'professional-expert',
      'young-adult-expert',
      'pre-senior-intermediate',
      'pre-senior-expert',
    ],
  },
  {
    id: 'skill-compound-engineering',
    name: 'Compound Engineering',
    category: 'skill',
    description:
      'Built-in Claude Code superpower that chains multiple tools together for complex multi-step engineering tasks like refactoring entire modules.',
    source: 'https://docs.anthropic.com/en/docs/claude-code/skills',
    installCmd: '# Built-in — enable in CLAUDE.md with: "Use compound tool chains for complex tasks"',
    author: 'Anthropic',
    trustLevel: 'official',
    tags: ['built-in', 'multi-step', 'refactoring', 'automation'],
    profileMatch: [
      'professional-intermediate',
      'professional-expert',
      'young-adult-intermediate',
      'young-adult-expert',
    ],
  },
  {
    id: 'skill-git-commit-helper',
    name: 'Git Commit Helper',
    category: 'skill',
    description:
      'Analyzes staged changes and generates conventional commit messages with proper scope, type, and breaking change annotations.',
    source: 'https://github.com/anthropics/claude-code-skills',
    installCmd: 'claude skills add git-commit-helper',
    author: 'community',
    trustLevel: 'verified',
    stars: 850,
    tags: ['git', 'commit', 'conventional-commits', 'automation'],
    profileMatch: [
      'teen-intermediate',
      'teen-expert',
      'young-adult-beginner',
      'young-adult-intermediate',
      'young-adult-expert',
      'professional-beginner',
      'professional-intermediate',
      'professional-expert',
    ],
  },
  {
    id: 'skill-playwright-testing',
    name: 'Playwright Testing',
    category: 'skill',
    description:
      'Generates end-to-end browser tests using Playwright with page object models, fixtures, and cross-browser validation strategies.',
    source: 'https://github.com/anthropics/claude-code-skills',
    installCmd: 'claude skills add playwright-testing',
    author: 'Anthropic',
    trustLevel: 'official',
    stars: 2100,
    tags: ['testing', 'e2e', 'playwright', 'browser', 'automation'],
    profileMatch: [
      'young-adult-intermediate',
      'young-adult-expert',
      'professional-intermediate',
      'professional-expert',
    ],
  },
  {
    id: 'skill-excel-analysis',
    name: 'Excel Analysis',
    category: 'skill',
    description:
      'Reads, analyzes, and transforms Excel/CSV files with pivot tables, charts, formulas, and data cleaning operations.',
    source: 'https://github.com/anthropics/claude-code-skills',
    installCmd: 'claude skills add excel-analysis',
    author: 'Anthropic',
    trustLevel: 'official',
    stars: 980,
    tags: ['excel', 'csv', 'data', 'analysis', 'spreadsheet'],
    profileMatch: [
      'professional-beginner',
      'professional-intermediate',
      'pre-senior-beginner',
      'pre-senior-intermediate',
      'senior-beginner',
      'senior-intermediate',
    ],
  },
  {
    id: 'skill-pdf-processing',
    name: 'PDF Processing',
    category: 'skill',
    description:
      'Extracts text, tables, and metadata from PDF documents. Supports multi-page parsing, OCR fallback, and structured data extraction.',
    source: 'https://github.com/anthropics/claude-code-skills',
    installCmd: 'claude skills add pdf-processing',
    author: 'Anthropic',
    trustLevel: 'official',
    stars: 760,
    tags: ['pdf', 'extraction', 'documents', 'OCR'],
    profileMatch: [
      'professional-beginner',
      'professional-intermediate',
      'professional-expert',
      'pre-senior-beginner',
      'pre-senior-intermediate',
      'senior-beginner',
      'senior-intermediate',
    ],
  },
  {
    id: 'skill-code-review',
    name: 'Code Review',
    category: 'skill',
    description:
      'Performs thorough code reviews checking for bugs, performance issues, naming conventions, SOLID principles, and suggests improvements with rationale.',
    source: 'https://github.com/anthropics/claude-code-skills',
    installCmd: 'claude skills add code-review',
    author: 'community',
    trustLevel: 'verified',
    stars: 1450,
    tags: ['review', 'quality', 'best-practices', 'SOLID'],
    profileMatch: [
      'teen-expert',
      'young-adult-intermediate',
      'young-adult-expert',
      'professional-beginner',
      'professional-intermediate',
      'professional-expert',
    ],
  },
  {
    id: 'skill-music-creation',
    name: 'Music Creation',
    category: 'skill',
    description:
      'Generates MIDI files, music notation, and audio synthesis scripts. Supports chord progressions, melodies, and basic arrangement.',
    source: 'https://github.com/anthropics/claude-code-skills',
    installCmd: 'claude skills add music-creation',
    author: 'Anthropic',
    trustLevel: 'official',
    stars: 520,
    tags: ['music', 'MIDI', 'audio', 'creative'],
    profileMatch: [
      'teen-beginner',
      'teen-intermediate',
      'teen-expert',
      'young-adult-beginner',
      'young-adult-intermediate',
    ],
  },
  {
    id: 'skill-web-app-testing',
    name: 'Web App Testing',
    category: 'skill',
    description:
      'Generates comprehensive test suites for web applications including unit tests, integration tests, and accessibility audits.',
    source: 'https://github.com/anthropics/claude-code-skills',
    installCmd: 'claude skills add web-app-testing',
    author: 'Anthropic',
    trustLevel: 'official',
    stars: 1780,
    tags: ['testing', 'unit', 'integration', 'accessibility', 'web'],
    profileMatch: [
      'young-adult-intermediate',
      'young-adult-expert',
      'professional-beginner',
      'professional-intermediate',
      'professional-expert',
    ],
  },
]

// =============================================================================
// SUBAGENTS (8)
// =============================================================================

const subagents: MarketplaceListing[] = [
  {
    id: 'subagent-python-expert',
    name: 'Python Expert',
    category: 'subagent',
    description:
      'Specialized subagent for Python development with expertise in type hints, async patterns, FastAPI, Django, and scientific computing.',
    source: 'https://github.com/VoltAgent/claude-subagents',
    installCmd: 'claude subagent add python-expert --from VoltAgent/claude-subagents',
    author: 'VoltAgent',
    trustLevel: 'verified',
    stars: 640,
    tags: ['python', 'FastAPI', 'Django', 'async', 'typing'],
    profileMatch: [
      'young-adult-intermediate',
      'young-adult-expert',
      'professional-intermediate',
      'professional-expert',
      'pre-senior-intermediate',
    ],
  },
  {
    id: 'subagent-typescript-expert',
    name: 'TypeScript Expert',
    category: 'subagent',
    description:
      'Specialized subagent for TypeScript with deep knowledge of generics, conditional types, mapped types, and strict compiler configurations.',
    source: 'https://github.com/VoltAgent/claude-subagents',
    installCmd: 'claude subagent add typescript-expert --from VoltAgent/claude-subagents',
    author: 'VoltAgent',
    trustLevel: 'verified',
    stars: 640,
    tags: ['typescript', 'generics', 'types', 'compiler'],
    profileMatch: [
      'young-adult-intermediate',
      'young-adult-expert',
      'professional-intermediate',
      'professional-expert',
    ],
  },
  {
    id: 'subagent-react-specialist',
    name: 'React Specialist',
    category: 'subagent',
    description:
      'Focused on React 19+, Server Components, Suspense boundaries, hooks composition, and performance optimization patterns.',
    source: 'https://github.com/0xfurai/claude-react-agent',
    installCmd: 'claude subagent add react-specialist --from 0xfurai/claude-react-agent',
    author: '0xfurai',
    trustLevel: 'community',
    stars: 380,
    tags: ['react', 'server-components', 'hooks', 'RSC', 'Next.js'],
    profileMatch: [
      'teen-expert',
      'young-adult-intermediate',
      'young-adult-expert',
      'professional-intermediate',
      'professional-expert',
    ],
  },
  {
    id: 'subagent-database-architect',
    name: 'Database Architect',
    category: 'subagent',
    description:
      'Designs schemas, writes migrations, optimizes queries, and manages indexes for PostgreSQL, MySQL, and MongoDB with performance analysis.',
    source: 'https://github.com/VoltAgent/claude-subagents',
    installCmd: 'claude subagent add database-architect --from VoltAgent/claude-subagents',
    author: 'VoltAgent',
    trustLevel: 'verified',
    stars: 640,
    tags: ['database', 'SQL', 'PostgreSQL', 'schema', 'optimization'],
    profileMatch: [
      'professional-intermediate',
      'professional-expert',
      'pre-senior-intermediate',
      'pre-senior-expert',
      'senior-intermediate',
      'senior-expert',
    ],
  },
  {
    id: 'subagent-security-auditor',
    name: 'Security Auditor Agent',
    category: 'subagent',
    description:
      'Autonomous security analysis subagent that scans for vulnerabilities, checks dependencies, and generates security reports with remediation steps.',
    source: 'https://github.com/VoltAgent/claude-subagents',
    installCmd: 'claude subagent add security-auditor --from VoltAgent/claude-subagents',
    author: 'VoltAgent',
    trustLevel: 'verified',
    stars: 640,
    tags: ['security', 'audit', 'dependencies', 'CVE', 'remediation'],
    profileMatch: [
      'professional-expert',
      'pre-senior-expert',
      'senior-expert',
    ],
  },
  {
    id: 'subagent-performance-engineer',
    name: 'Performance Engineer',
    category: 'subagent',
    description:
      'Analyzes application performance bottlenecks, suggests optimizations, profiles memory usage, and benchmarks critical code paths.',
    source: 'https://github.com/VoltAgent/claude-subagents',
    installCmd: 'claude subagent add performance-engineer --from VoltAgent/claude-subagents',
    author: 'VoltAgent',
    trustLevel: 'verified',
    stars: 640,
    tags: ['performance', 'profiling', 'optimization', 'benchmarks', 'memory'],
    profileMatch: [
      'professional-intermediate',
      'professional-expert',
      'young-adult-expert',
    ],
  },
  {
    id: 'subagent-code-reviewer',
    name: 'Code Reviewer Agent',
    category: 'subagent',
    description:
      'Automated PR review subagent that checks code quality, style consistency, test coverage, and provides actionable feedback comments.',
    source: 'https://github.com/0xfurai/claude-code-reviewer',
    installCmd: 'claude subagent add code-reviewer --from 0xfurai/claude-code-reviewer',
    author: '0xfurai',
    trustLevel: 'community',
    stars: 290,
    tags: ['code-review', 'PR', 'quality', 'style', 'coverage'],
    profileMatch: [
      'young-adult-intermediate',
      'young-adult-expert',
      'professional-beginner',
      'professional-intermediate',
      'professional-expert',
    ],
  },
  {
    id: 'subagent-test-engineer',
    name: 'Test Engineer Agent',
    category: 'subagent',
    description:
      'Generates comprehensive test suites with unit, integration, and E2E tests. Understands testing pyramids and mock strategies.',
    source: 'https://github.com/0xfurai/claude-test-agent',
    installCmd: 'claude subagent add test-engineer --from 0xfurai/claude-test-agent',
    author: '0xfurai',
    trustLevel: 'community',
    stars: 310,
    tags: ['testing', 'unit-tests', 'integration', 'mocks', 'coverage'],
    profileMatch: [
      'young-adult-intermediate',
      'young-adult-expert',
      'professional-intermediate',
      'professional-expert',
      'teen-expert',
    ],
  },
]

// =============================================================================
// MCP SERVERS (8)
// =============================================================================

const mcpServers: MarketplaceListing[] = [
  {
    id: 'mcp-context7',
    name: 'Context7',
    category: 'mcp-server',
    description:
      'Injects up-to-date documentation for any library directly into Claude context. The most popular MCP server with version-aware docs resolution.',
    source: 'https://github.com/upstash/context7',
    installCmd: 'claude mcp add context7 -- npx -y @upstash/context7-mcp@latest',
    author: 'Upstash',
    trustLevel: 'verified',
    stars: 8500,
    tags: ['documentation', 'context', 'libraries', 'up-to-date'],
    profileMatch: [
      'teen-beginner',
      'teen-intermediate',
      'teen-expert',
      'young-adult-beginner',
      'young-adult-intermediate',
      'young-adult-expert',
      'professional-beginner',
      'professional-intermediate',
      'professional-expert',
      'pre-senior-beginner',
      'pre-senior-intermediate',
      'pre-senior-expert',
      'senior-beginner',
      'senior-intermediate',
      'senior-expert',
    ],
  },
  {
    id: 'mcp-playwright',
    name: 'Playwright MCP',
    category: 'mcp-server',
    description:
      'Browser automation via Playwright. Navigate pages, click elements, fill forms, take screenshots, and run E2E tests from Claude.',
    source: 'https://github.com/microsoft/playwright-mcp',
    installCmd: 'claude mcp add playwright -- npx -y @anthropic-ai/mcp-server-playwright',
    author: 'Microsoft',
    trustLevel: 'official',
    stars: 5200,
    tags: ['browser', 'automation', 'testing', 'e2e', 'screenshots'],
    profileMatch: [
      'young-adult-intermediate',
      'young-adult-expert',
      'professional-intermediate',
      'professional-expert',
      'teen-expert',
    ],
  },
  {
    id: 'mcp-github',
    name: 'GitHub MCP',
    category: 'mcp-server',
    description:
      'Full GitHub API access: create repos, manage issues, open PRs, review code, manage releases, and query repository data.',
    source: 'https://github.com/modelcontextprotocol/servers',
    installCmd: 'claude mcp add github -- npx -y @modelcontextprotocol/server-github',
    author: 'Anthropic',
    trustLevel: 'official',
    stars: 15000,
    tags: ['github', 'git', 'issues', 'PRs', 'repos'],
    profileMatch: [
      'teen-intermediate',
      'teen-expert',
      'young-adult-beginner',
      'young-adult-intermediate',
      'young-adult-expert',
      'professional-beginner',
      'professional-intermediate',
      'professional-expert',
      'pre-senior-intermediate',
      'pre-senior-expert',
    ],
  },
  {
    id: 'mcp-filesystem',
    name: 'Filesystem MCP',
    category: 'mcp-server',
    description:
      'Secure file system access with configurable root directories. Read, write, search, and manage files with sandboxed permissions.',
    source: 'https://github.com/modelcontextprotocol/servers',
    installCmd: 'claude mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem /path/to/dir',
    author: 'Anthropic',
    trustLevel: 'official',
    stars: 15000,
    tags: ['files', 'filesystem', 'read', 'write', 'search'],
    profileMatch: [
      'teen-beginner',
      'teen-intermediate',
      'teen-expert',
      'young-adult-beginner',
      'young-adult-intermediate',
      'young-adult-expert',
      'professional-beginner',
      'professional-intermediate',
      'professional-expert',
      'pre-senior-beginner',
      'pre-senior-intermediate',
      'pre-senior-expert',
      'senior-beginner',
      'senior-intermediate',
      'senior-expert',
    ],
  },
  {
    id: 'mcp-brave-search',
    name: 'Brave Search MCP',
    category: 'mcp-server',
    description:
      'Web search powered by Brave Search API. Perform web and news searches with privacy-focused results directly from Claude.',
    source: 'https://github.com/modelcontextprotocol/servers',
    installCmd: 'claude mcp add brave-search -- npx -y @modelcontextprotocol/server-brave-search',
    author: 'Anthropic',
    trustLevel: 'official',
    stars: 15000,
    tags: ['search', 'web', 'brave', 'news', 'research'],
    profileMatch: [
      'teen-intermediate',
      'teen-expert',
      'young-adult-intermediate',
      'young-adult-expert',
      'professional-intermediate',
      'professional-expert',
      'pre-senior-intermediate',
      'senior-intermediate',
    ],
  },
  {
    id: 'mcp-21st-magic',
    name: '21st.dev Magic',
    category: 'mcp-server',
    description:
      'AI-powered UI component generation. Describe a component in natural language and get production-ready React/Tailwind code instantly.',
    source: 'https://github.com/21st-dev/magic-mcp',
    installCmd: 'claude mcp add magic -- npx -y @21st-dev/magic-mcp',
    author: '21st.dev',
    trustLevel: 'verified',
    stars: 3400,
    tags: ['UI', 'components', 'React', 'Tailwind', 'generation'],
    profileMatch: [
      'teen-beginner',
      'teen-intermediate',
      'young-adult-beginner',
      'young-adult-intermediate',
      'professional-beginner',
    ],
  },
  {
    id: 'mcp-firecrawl',
    name: 'Firecrawl MCP',
    category: 'mcp-server',
    description:
      'Web scraping and crawling server. Extract structured data, scrape entire sites, and convert web pages to clean markdown.',
    source: 'https://github.com/firecrawl/firecrawl-mcp-server',
    installCmd: 'claude mcp add firecrawl -- npx -y firecrawl-mcp',
    author: 'Firecrawl',
    trustLevel: 'verified',
    stars: 2800,
    tags: ['scraping', 'crawling', 'extraction', 'markdown', 'web'],
    profileMatch: [
      'young-adult-expert',
      'professional-intermediate',
      'professional-expert',
      'pre-senior-expert',
    ],
  },
  {
    id: 'mcp-postgresql',
    name: 'PostgreSQL MCP',
    category: 'mcp-server',
    description:
      'Direct PostgreSQL database access. Run queries, inspect schemas, manage tables, and perform database operations from Claude.',
    source: 'https://github.com/modelcontextprotocol/servers',
    installCmd: 'claude mcp add postgres -- npx -y @modelcontextprotocol/server-postgres postgresql://user:pass@host/db',
    author: 'Anthropic',
    trustLevel: 'official',
    stars: 15000,
    tags: ['database', 'PostgreSQL', 'SQL', 'queries', 'schema'],
    profileMatch: [
      'professional-intermediate',
      'professional-expert',
      'pre-senior-intermediate',
      'pre-senior-expert',
      'senior-intermediate',
      'senior-expert',
    ],
  },
]

// =============================================================================
// HOOKS (5)
// =============================================================================

const hooks: MarketplaceListing[] = [
  {
    id: 'hook-destructive-blocker',
    name: 'Destructive Command Blocker',
    category: 'hook',
    description:
      'PreToolUse hook that blocks dangerous commands like rm -rf, git reset --hard, DROP TABLE, and force pushes. Returns exit code 2 to deny.',
    source: 'https://github.com/disler/hooks-mastery',
    installCmd: `# Add to .claude/settings.json hooks.PreToolUse:
# { "matcher": "Bash", "hooks": [{ "type": "command", "command": "bash .claude/hooks/block-destructive.sh \\"$TOOL_INPUT\\"" }] }`,
    author: 'disler',
    trustLevel: 'verified',
    stars: 920,
    tags: ['safety', 'protection', 'destructive', 'blocker'],
    profileMatch: [
      'teen-beginner',
      'teen-intermediate',
      'teen-expert',
      'young-adult-beginner',
      'young-adult-intermediate',
      'pre-senior-beginner',
      'pre-senior-intermediate',
      'senior-beginner',
      'senior-intermediate',
      'senior-expert',
    ],
  },
  {
    id: 'hook-auto-formatter',
    name: 'Auto-Formatter',
    category: 'hook',
    description:
      'PostToolUse hook that automatically runs Prettier or your configured formatter after every file write operation to maintain code style.',
    source: 'https://github.com/ChrisWiles/claude-hooks-showcase',
    installCmd: `# Add to .claude/settings.json hooks.PostToolUse:
# { "matcher": "Write|Edit", "hooks": [{ "type": "command", "command": "npx prettier --write \\"$FILEPATH\\"" }] }`,
    author: 'ChrisWiles',
    trustLevel: 'community',
    stars: 340,
    tags: ['formatting', 'prettier', 'style', 'auto'],
    profileMatch: [
      'young-adult-intermediate',
      'young-adult-expert',
      'professional-beginner',
      'professional-intermediate',
      'professional-expert',
      'teen-expert',
    ],
  },
  {
    id: 'hook-credential-warning',
    name: 'Credential Warning',
    category: 'hook',
    description:
      'PreToolUse hook that scans file writes for hardcoded API keys, passwords, tokens, and secrets. Warns before committing sensitive data.',
    source: 'https://docs.anthropic.com/en/docs/claude-code/hooks',
    installCmd: `# Add to .claude/settings.json hooks.PreToolUse:
# { "matcher": "Write|Edit", "hooks": [{ "type": "command", "command": "bash .claude/hooks/check-credentials.sh \\"$TOOL_INPUT\\"" }] }`,
    author: 'Anthropic',
    trustLevel: 'official',
    tags: ['security', 'credentials', 'secrets', 'prevention'],
    profileMatch: [
      'teen-beginner',
      'teen-intermediate',
      'teen-expert',
      'young-adult-beginner',
      'young-adult-intermediate',
      'young-adult-expert',
      'professional-beginner',
      'professional-intermediate',
      'professional-expert',
      'pre-senior-beginner',
      'pre-senior-intermediate',
      'pre-senior-expert',
      'senior-beginner',
      'senior-intermediate',
      'senior-expert',
    ],
  },
  {
    id: 'hook-test-reminder',
    name: 'Test Reminder',
    category: 'hook',
    description:
      'Stop hook that checks if tests were run during the session and reminds the developer to run the test suite before ending.',
    source: 'https://docs.anthropic.com/en/docs/claude-code/hooks',
    installCmd: `# Add to .claude/settings.json hooks.Stop:
# { "matcher": ".*", "hooks": [{ "type": "command", "command": "bash .claude/hooks/remind-tests.sh" }] }`,
    author: 'Anthropic',
    trustLevel: 'official',
    tags: ['testing', 'reminder', 'quality', 'CI'],
    profileMatch: [
      'young-adult-beginner',
      'young-adult-intermediate',
      'young-adult-expert',
      'professional-beginner',
      'professional-intermediate',
      'teen-intermediate',
      'teen-expert',
    ],
  },
  {
    id: 'hook-commit-lint',
    name: 'Commit Message Linter',
    category: 'hook',
    description:
      'PostToolUse hook that validates git commit messages against conventional commit format and rejects non-conforming messages.',
    source: 'https://github.com/disler/hooks-mastery',
    installCmd: `# Add to .claude/settings.json hooks.PostToolUse:
# { "matcher": "Bash(git commit)", "hooks": [{ "type": "command", "command": "bash .claude/hooks/lint-commit.sh \\"$TOOL_INPUT\\"" }] }`,
    author: 'disler',
    trustLevel: 'verified',
    stars: 920,
    tags: ['git', 'commit', 'linting', 'conventional'],
    profileMatch: [
      'young-adult-intermediate',
      'young-adult-expert',
      'professional-beginner',
      'professional-intermediate',
      'professional-expert',
    ],
  },
]

// =============================================================================
// TEMPLATES (4)
// =============================================================================

const templates: MarketplaceListing[] = [
  {
    id: 'template-minimal-starter',
    name: 'Minimal Starter CLAUDE.md',
    category: 'template',
    description:
      'A clean, minimal CLAUDE.md template under 40 lines. Perfect for small projects that need basic rules without complexity.',
    source: 'https://docs.anthropic.com/en/docs/claude-code/claude-md',
    installCmd: '# Use ClawCoder Builder: /builder?profile=professional-beginner',
    author: 'Anthropic',
    trustLevel: 'official',
    tags: ['minimal', 'starter', 'simple', 'template'],
    profileMatch: [
      'teen-beginner',
      'young-adult-beginner',
      'professional-beginner',
      'pre-senior-beginner',
      'senior-beginner',
    ],
  },
  {
    id: 'template-full-stack',
    name: 'Full-Stack CLAUDE.md',
    category: 'template',
    description:
      'Comprehensive template for full-stack web applications with frontend, backend, database, testing, and deployment sections.',
    source: 'https://docs.anthropic.com/en/docs/claude-code/claude-md',
    installCmd: '# Use ClawCoder Builder: /builder?profile=professional-intermediate',
    author: 'ClawCoder',
    trustLevel: 'verified',
    tags: ['full-stack', 'web', 'comprehensive', 'production'],
    profileMatch: [
      'young-adult-intermediate',
      'young-adult-expert',
      'professional-intermediate',
      'professional-expert',
    ],
  },
  {
    id: 'template-enterprise',
    name: 'Enterprise CLAUDE.md',
    category: 'template',
    description:
      'Enterprise-grade template with compliance rules, audit trails, security policies, team conventions, and CI/CD integration hooks.',
    source: 'https://docs.anthropic.com/en/docs/claude-code/claude-md',
    installCmd: '# Use ClawCoder Builder: /builder?profile=professional-expert',
    author: 'ClawCoder',
    trustLevel: 'verified',
    tags: ['enterprise', 'compliance', 'security', 'team', 'CI/CD'],
    profileMatch: [
      'professional-expert',
      'pre-senior-expert',
      'senior-expert',
    ],
  },
  {
    id: 'template-learning',
    name: 'Learning-Focused CLAUDE.md',
    category: 'template',
    description:
      'Template optimized for learning with verbose explanations, step-by-step guidance, safety guardrails, and beginner-friendly language.',
    source: 'https://docs.anthropic.com/en/docs/claude-code/claude-md',
    installCmd: '# Use ClawCoder Builder: /builder?profile=teen-beginner',
    author: 'ClawCoder',
    trustLevel: 'verified',
    tags: ['learning', 'beginner', 'education', 'guided'],
    profileMatch: [
      'teen-beginner',
      'teen-intermediate',
      'young-adult-beginner',
      'pre-senior-beginner',
      'senior-beginner',
    ],
  },
]

// =============================================================================
// Combined listings
// =============================================================================

export const MARKETPLACE_LISTINGS: MarketplaceListing[] = [
  ...skills,
  ...subagents,
  ...mcpServers,
  ...hooks,
  ...templates,
]

// =============================================================================
// Query functions
// =============================================================================

export function getListingsByCategory(category: string): MarketplaceListing[] {
  return MARKETPLACE_LISTINGS.filter((l) => l.category === category)
}

export function getListingsForProfile(profileSlug: string): MarketplaceListing[] {
  return MARKETPLACE_LISTINGS.filter((l) => l.profileMatch.includes(profileSlug))
}

export function searchListings(query: string): MarketplaceListing[] {
  const q = query.toLowerCase().trim()
  if (!q) return MARKETPLACE_LISTINGS

  return MARKETPLACE_LISTINGS.filter((l) => {
    const haystack = [
      l.name,
      l.description,
      l.author,
      l.category,
      ...l.tags,
    ]
      .join(' ')
      .toLowerCase()

    // Support multi-word search: all terms must match
    const terms = q.split(/\s+/)
    return terms.every((term) => haystack.includes(term))
  })
}

export function getListingById(id: string): MarketplaceListing | undefined {
  return MARKETPLACE_LISTINGS.find((l) => l.id === id)
}