इसे छोड़कर कंटेंट पर जाएं

प्लगइन का योगदान करना

यह मार्गदर्शिका बताती है कि एक नया प्लगइन कैसे बनाएं और उसे f5-sales-demo मार्केटप्लेस में कैसे जोड़ें।

प्रत्येक प्लगइन plugins/ के अंतर्गत अपनी निर्देशिका में रहता है और इस संरचना का पालन करता है:

  • Directoryplugins/
    • Directoryexample-plugin/
      • Directory.claude-plugin/
        • plugin.json
      • Directoryskills/
        • Directoryexample-skill/
          • SKILL.md
          • Directoryreferences/
            • reference-data.md
      • Directorycommands/
        • example-command.md
      • Directoryagents/
        • example-agent.md
      • README.md
  1. प्लगइन निर्देशिका बनाएं

    Terminal window
    mkdir -p plugins/example-plugin/.claude-plugin
    mkdir -p plugins/example-plugin/skills
    mkdir -p plugins/example-plugin/commands
  2. plugin.json लिखें

    plugins/example-plugin/.claude-plugin/plugin.json बनाएं:

    {
    "name": "example-plugin",
    "description": "What this plugin does",
    "version": "1.0.0",
    "author": {
    "name": "f5-sales-demo"
    },
    "homepage": "https://github.com/f5-sales-demo/marketplace/tree/main/plugins/example-plugin",
    "keywords": ["relevant", "keywords"],
    "license": "Apache-2.0",
    "repository": "https://github.com/f5-sales-demo/marketplace"
    }
  3. स्किल जोड़ें

    plugins/example-plugin/skills/example-skill/SKILL.md को frontmatter के साथ बनाएं:

    ---
    name: example-skill
    description: One-line description of what this skill does
    ---
    Detailed instructions for Claude when this skill activates.

    कोई भी संदर्भ डेटा SKILL.md के साथ references/ उपनिर्देशिका में रखें।

  4. कमांड जोड़ें

    plugins/example-plugin/commands/example-command.md बनाएं:

    ---
    description: What this command does
    argument_hint: "[optional-args]"
    allowed_tools:
    - Read
    - Glob
    - Grep
    ---
    Instructions for Claude when the user invokes this command.
  5. प्लगइन को marketplace.json में जोड़ें

    .claude-plugin/marketplace.json में plugins ऐरे में एक प्रविष्टि जोड़ें:

    {
    "name": "example-plugin",
    "description": "What this plugin does",
    "version": "1.0.0",
    "author": { "name": "f5-sales-demo" },
    "source": "./plugins/example-plugin",
    "category": "productivity",
    "homepage": "https://github.com/f5-sales-demo/marketplace/tree/main/plugins/example-plugin",
    "license": "Apache-2.0",
    "keywords": ["relevant", "keywords"],
    "tags": ["searchable", "tags"],
    "repository": "https://github.com/f5-sales-demo/marketplace"
    }
  6. स्थानीय स्तर पर परीक्षण करें

    प्रकाशित किए बिना अपने प्लगइन का परीक्षण करें, Claude Code को स्थानीय निर्देशिका की ओर इंगित करके:

    Terminal window
    claude --plugin-dir ./plugins/example-plugin

    सत्यापित करें कि स्किल सही संदर्भ में सक्रिय होती हैं और कमांड अपेक्षित आउटपुट उत्पन्न करते हैं।

अपना प्लगइन सबमिट करना

Section titled “अपना प्लगइन सबमिट करना”
  1. नए प्लगइन का वर्णन करते हुए एक GitHub issue बनाएं
  2. main से एक feature branch बनाएं
  3. अपनी प्लगइन निर्देशिका जोड़ें और marketplace.json अपडेट करें
  4. docs/plugins/example-plugin.mdx पर एक दस्तावेज़ीकरण पृष्ठ जोड़ें
  5. Closes #N के साथ issue से लिंक करते हुए एक PR खोलें
  6. किसी भी CI विफलता को ठीक करें और जाँच पास होने के बाद merge करें

सर्वोत्तम प्रथाएं

Section titled “सर्वोत्तम प्रथाएं”
  • स्किल को केंद्रित रखें — एक स्किल को एक काम अच्छे से करना चाहिए
  • संदर्भ फ़ाइलों का उपयोग करें — बड़े डेटासेट, स्कीमा और लुकअप तालिकाएं SKILL.md में इनलाइन करने के बजाय references/ में रखें
  • बुद्धिमानी से दायरा तय करें — जब संभव हो तो कार्यशील सेट को सीमित करने के लिए uncommitted परिवर्तनों की जाँच करें
  • आउटपुट को गंभीरता के अनुसार समूहित करें — ERROR, WARNING और INFO स्तरों का उपयोग करें ताकि उपयोगकर्ता सुधारों को प्राथमिकता दे सकें
  • एक README लिखें — उपयोग के उदाहरण और प्रत्येक स्किल और कमांड का विवरण शामिल करें