Claude Code prompt library maintenance: टीम prompts को asset बनाएं
Claude Code टीमों के लिए prompt version, owner, review gate, deprecation, metrics और training CTA.
अच्छे prompts को chat history में मत छोड़िए
टीम जब Claude Code शुरू करती है, तो अच्छे prompts अलग-अलग जगह जमा हो जाते हैं: Slack, PR comment, Notion, निजी notes। कुछ दिन यह चल जाता है। फिर एक ही review prompt की कई copies बन जाती हैं, latest version पता नहीं रहता, owner साफ नहीं होता, और हर काम फिर से नए prompt से शुरू होता है।
Prompt library सिर्फ अच्छे वाक्यों की सूची नहीं है। यह team asset है। इसे versioning, owner, review gate, deprecation और metrics चाहिए। Official Claude Code Prompt library अच्छे patterns दिखाती है, लेकिन आपकी टीम को उन्हें अपने repository, product page, pricing, CTA और training process से जोड़ना होगा। साथ में CLAUDE.md and memory, Skills, Subagents और Hooks भी देखें।
यह लेख Claude Code review workflow checklist और first 30 minutes checklist के बाद का कदम है। लक्ष्य है कि team prompts को reusable template, paid product और training material में बदल सके।
पहले registry बनाएं
Versioning का मतलब है prompt के बदलावों का record। Owner वह व्यक्ति या role है जो prompt के लिए जिम्मेदार है। Review gate वह जांच है जिसे pass किए बिना prompt active नहीं होता। Deprecation का मतलब पुराने prompt को replacement के साथ retire करना है। Metrics बताते हैं कि prompt से risk कम हुआ, conversion बेहतर हुआ या time बचा।
इसे prompt-library.json के रूप में save किया जा सकता है।
[
{
"id": "review-risk-finder",
"version": "1.2.0",
"owner": "platform",
"status": "active",
"useWhen": "A pull request changes behavior, data flow, pricing, or CTA routing.",
"inputs": ["goal", "diff", "riskAreas", "expectedTests"],
"output": "Findings ordered by severity with evidence and smallest fix.",
"reviewGate": "Owner approval plus one successful run on a known risky diff.",
"deprecates": ["review-risk-finder@1.1.0"],
"metrics": ["reuse_count", "accepted_findings", "false_positive_rate"],
"officialDocs": [
"https://code.claude.com/docs/en/prompt-library",
"https://code.claude.com/docs/en/memory"
]
}
]
Registry prompt को अपने आप अच्छा नहीं बनाती। लेकिन यह उसे manage करने लायक बनाती है। Output noisy हो तो owner सुधारता है। Product page बदलता है तो CTA review prompt का minor version बनता है। Training में वही active version दिया जाता है।
एक template, एक outcome
सबसे आम गलती है एक ही prompt में review, tests, docs, refactor और CTA copy सुधार मांगना। यह efficient लगता है, लेकिन failure होने पर वजह साफ नहीं रहती। Team library में एक prompt को एक ही artifact देना चाहिए।
# review-risk-finder
You are reviewing a production change for business and user risk.
Context:
- Goal: {{goal}}
- Diff or changed files: {{diff}}
- Risk areas: {{riskAreas}}
- Expected tests: {{expectedTests}}
Return findings first. For each finding include:
1. Severity
2. Evidence from the diff
3. User or revenue impact
4. Smallest safe fix
5. Verification command
If there are no findings, list what you checked and what remains unverified.
इस format में Claude Code को पता है कि risk क्या है और evidence कैसे लौटाना है। Engineer verification command देखता है। Product lead revenue impact देखता है। Trainer इसी structure को workshop exercise बना सकता है।
Use case: revenue से जुड़े workflow
Use case 1 है pull request review। “देखो कोई problem है?” कहने के बजाय goal, diff, expected tests और riskAreas दें: billing, auth, permission, data deletion, CTA routing। इससे output vague advice नहीं, actionable finding बनता है।
Use case 2 है product page maintenance। products page के लिए prompt promise, target reader, purchase expectation, price language, proof और links check करे। इसका owner product या marketing भी हो सकता है, सिर्फ engineering नहीं।
Use case 3 है training और consultation। training page के लिए prompt team pain, current workflow maturity, Claude Code adoption risk और workshop के बाद मिलने वाले assets check करे। Metric सिर्फ traffic नहीं, qualified inquiry और repeated onboarding questions में कमी है।
Use case 4 है published article refresh। Official docs, commands, internal links और examples बदलते रहते हैं। Refresh prompt official links, updatedDate, executable examples, visuals और real experience section देखता है।
active होने से पहले review gate
तीन status काफी हैं: draft, active, deprecated। Draft test होता है। Active docs, products और training में जा सकता है। Deprecated replacement path के साथ रखा जाता है।
Semantic versioning को practical रखें। Output format टूटे तो major, नया input जुड़े तो minor, wording या example बदले तो patch। इससे team पुराने behavior पर निर्भर नहीं रहती।
flowchart LR
Draft["draft prompt"] --> Owner["owner review"]
Owner --> Gate["known-risk gate"]
Gate --> Active["active library"]
Active --> Metrics["monthly metrics"]
Metrics --> Deprecate["deprecate or improve"]
Known-risk gate में पुरानी असली failure चलाएं: missed risky diff, broken checkout CTA, hidden first build error, या outdated official URL वाला article। Prompt यह case नहीं पकड़ता तो active नहीं है।
agents को छोटा role दें
Agent को यहां focused काम करने वाला role समझें। Official subagents अलग context में काम कर सकते हैं, इसलिए task narrow होना चाहिए। Prompt library में librarian metadata check करे, reviewer known failures से output test करे, और owner final approval दे।
.claude/agents/prompt-librarian.md का example:
---
name: prompt-librarian
description: Maintains prompt library metadata, ownership, versions, metrics, and deprecation notes.
tools: Read, Grep
---
You audit prompt library entries. Do not rewrite product copy.
Check that each prompt has id, version, owner, status, useWhen, inputs, output,
reviewGate, deprecation note, and metrics. Report missing fields first.
इस agent को mostly read और audit तक रखें। Product copy या CTA चुपचाप rewrite न कराएं। जिन rules को block करना है, उन्हें Hooks, permissions या CI में रखें।
Pitfall: library कहां खराब होती है
Pitfall 1 है vague naming। good-review, debug-helper, marketing-check बाद में नहीं मिलते। checkout-cta-risk-review, build-log-first-failure, training-page-objection-check जैसे नाम बेहतर हैं।
Pitfall 2 है सिर्फ success examples रखना। Failure input भी रखें: “old price link miss हुआ” या “test names देखे, implementation नहीं”। यही अगली version को बेहतर बनाता है।
Pitfall 3 है सब कुछ CLAUDE.md में डालना। CLAUDE.md useful context है, hard policy नहीं। Blocking rules Hooks, permissions या CI में रखें।
Pitfall 4 है CTA को आखिरी में जोड़ना। Free article, product template और team training अलग stages हैं। उन्हें शुरुआत से design करें।
छोटा audit script
दस entries के बाद basic check automate करें।
import fs from "node:fs";
const file = process.argv[2] ?? "prompt-library.json";
const entries = JSON.parse(fs.readFileSync(file, "utf8"));
const required = [
"id",
"version",
"owner",
"status",
"useWhen",
"inputs",
"output",
"reviewGate",
"metrics"
];
let failed = false;
for (const entry of entries) {
const missing = required.filter((key) => !entry[key]);
if (!/^\\d+\\.\\d+\\.\\d+$/.test(entry.version ?? "")) {
missing.push("version must be semver");
}
if (!["draft", "active", "deprecated"].includes(entry.status)) {
missing.push("status must be draft, active, or deprecated");
}
if (missing.length > 0) {
failed = true;
console.error(`${entry.id ?? "(missing id)"}: ${missing.join(", ")}`);
}
}
if (failed) process.exit(1);
console.log(`OK: ${entries.length} prompt entries checked`);
यह script writing quality नहीं जांचता, लेकिन owner, version और reviewGate missing होने से रोकता है।
metrics कम रखें
| Metric | क्यों देखें | Action |
|---|---|---|
| reuse_count | Team prompt ढूंढ पा रही है या नहीं | नाम या जगह बदलें |
| accepted_findings | Output real fix देता है या नहीं | Output format tight करें |
| false_positive_rate | Reviewer time waste हो रहा है या नहीं | riskAreas specific करें |
| time_to_fix_minutes | Fix जल्दी हो रहा है या नहीं | smallest safe fix मांगें |
| cta_click_rate | Product/training path सुधरा या नहीं | CTA context बदलें |
Monthly review काफी है। Prompt इस्तेमाल नहीं हो रहा, trusted नहीं है, या decision से जुड़ा नहीं है तो deprecated करें।
product और training CTA
Maintained library से clear revenue path बनता है। Free articles सोचने का तरीका देते हैं। ClaudeCodeLab products individual builders को ready templates देते हैं। Claude Code training and consultation teams को owner, gates, hooks, metrics और rollout real repository में लागू करने में मदद करता है।
Masa ने पहले तीस से ज्यादा prompts रखे, लेकिन choice बढ़ने से speed कम हुई। बाद में review, debug, product page और training page चार groups बनाए, हर group में तीन active prompts रखे। Failure examples बचाने से अगली versions सच में बेहतर हुईं। यही prompt library को personal trick से team asset बनाता है।
मुफ़्त PDF: Claude Code cheatsheet
Email डालें और commands, review habits तथा safe workflow वाली एक-page PDF पाएँ.
हम आपका data सुरक्षित रखते हैं और spam नहीं भेजते.
लेखक के बारे में
Masa
Claude Code workflow और team adoption पर काम करने वाला engineer.
संबंधित लेख
Claude Code permission safety ladder: access धीरे-धीरे बढ़ाएं
read-only से limited edits, proof commands और deploy checks तक permission बढ़ाने की सुरक्षित ladder.
Claude Code Small PR Proof Pack: छोटे PR को review-ready बनाना
Claude Code PR के लिए diff, checks, public URL, CTA path और rollback वाला practical proof pack.
Claude Code Review Gate Before Commit: diff, test, public URL और CTA जांच
Claude Code से commit से पहले review gate बनाएं: diff, build, public URL, Gumroad, consultation, tests और unrelated files।