用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/ForceInjection/domain-driven-design-skills --skill clerk命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | clerk |
| description | clerk expert with self-populating documentation |
| tools | Read, Write, WebSearch, WebFetch, Bash, Grep |
⚠️⚠️⚠️ MANDATORY PRE-EXECUTION CHECKLIST ⚠️⚠️⚠️
DO NOT SKIP THESE STEPS - Complete them in order before proceeding.
═══════════════════════════════════════════════
Action: Check if reference documentation file exists
ls -la .claude/skills/clerk/references/external/clerk-patterns.md 2>/dev/null && wc -w .claude/skills/clerk/references/external/clerk-patterns.md
Evaluate Result:
Action: Read metadata to determine age
cat .claude/skills/clerk/.skill-metadata.json | grep last_verified
Calculate Age:
Current date: 2025-11-12
Last verified: [value from metadata, or null if never verified]
Age in days: [calculate difference, or ∞ if null]
Evaluate Result:
Status: Documentation is fresh and ready to use.
Action: Skip to "Domain Knowledge" section below and apply clerk expertise from:
references/external/clerk-patterns.md
Status: Documentation is missing, empty, or stale. Must fetch current information.
Read project context to make searches relevant:
cat .claude/core/context.yaml | grep -E "framework|database|auth"
Extract:
Run ALL of these search queries and collect results:
Query Set 1: Official Documentation
WebSearch: "clerk official documentation 2025"
WebSearch: "clerk getting started guide 2025"
Query Set 2: Best Practices & Patterns
WebSearch: "clerk best practices 2025"
WebSearch: "clerk architecture patterns 2025"
WebSearch: "clerk design principles"
Query Set 3: Common Pitfalls
WebSearch: "clerk common mistakes to avoid"
WebSearch: "clerk anti-patterns"
WebSearch: "clerk gotchas and pitfalls 2025"
Query Set 4: Integration (Context-Specific)
If framework detected:
WebSearch: "clerk [FRAMEWORK] integration best practices"
If database detected:
WebSearch: "clerk [DATABASE] patterns"
If auth detected:
WebSearch: "clerk [AUTH] integration"
Record: Save all URLs fetched for metadata
Create file: references/external/clerk-patterns.md
Required Structure:
# clerk Patterns & Best Practices
**Last Updated:** 2025-11-12
**Tech Version:** [from web search - e.g., "6.19.0"]
**Sources:**
- [List all URLs fetched]
---
## ⚠️ CRITICAL PATTERNS (Follow These)
[Extract 3-5 most important patterns from search results]
### Pattern 1: [Most Critical Pattern Name]
✅ **CORRECT APPROACH:**
[Code example showing the right way]
❌ **WRONG - Avoid This:**
[Code example showing common mistake]
**Why this matters:** [Explanation of consequences]
**When to use:** [Guidelines for application]
[Repeat for patterns 2-5]
---
## 🚫 COMMON MISTAKES (Avoid These)
[Extract top 5 mistakes from "pitfalls" searches]
### Mistake 1: [Most Common Error]
**Symptom:** [How it manifests]
**Why it's bad:** [Consequences]
**How to fix:** [Solution with code example]
[Repeat for mistakes 2-5]
---
## 🔧 INTEGRATION PATTERNS
### clerk + [DETECTED_FRAMEWORK]
[Framework-specific integration examples if framework detected]
### clerk + [DETECTED_DATABASE]
[Database integration patterns if database detected]
### clerk + [DETECTED_AUTH]
[Auth integration patterns if auth detected]
---
## 📚 Quick Reference
[Create cheat sheet of 10-15 most common operations]
**Installation:**
```bash
[commands]
Basic Setup:
[code]
Common Operations:
[Common errors and solutions from search results]
Error: [Error message] Cause: [Why it happens] Solution: [How to fix]
**Quality Check:**
- Minimum 1500 words
- At least 3 critical patterns
- At least 5 common mistakes
- Integration examples for detected stack
- Code examples throughout
### Step 4D: Update Metadata
**Write to:** `.claude/skills/clerk/.skill-metadata.json`
```json
{
"skill_name": "clerk",
"tech_version": "[from web search]",
"last_verified": "2025-11-12T10:32:28.617648",
"age_days": 0,
"status": "fresh",
"search_metadata": {
"queries_used": [
"[list all search queries executed]"
],
"sources_fetched": [
"[list all URLs from web search]"
],
"search_timestamp": "2025-11-12T10:32:28.617648",
"search_engine": "WebSearch"
},
"content_metadata": {
"word_count": [actual count],
"patterns_count": [number of critical patterns],
"mistakes_count": [number of common mistakes],
"has_official_docs": true/false,
"has_best_practices": true/false,
"has_antipatterns": true/false,
"has_integration_examples": true/false,
"confidence": "high/medium/low"
},
"detected_context": {
"framework": "[from context.yaml]",
"database": "[from context.yaml]",
"auth": "[from context.yaml]"
}
}
Verify documentation was created successfully:
wc -w .claude/skills/clerk/references/external/clerk-patterns.md
Expected: Minimum 1500 words
If validation passes: ✅ Continue to Step 4F
If validation fails:
⚠️⚠️⚠️ DOCUMENTATION FETCH FAILED ⚠️⚠️⚠️
Attempted: 2025-11-12T10:32:28.617648
Word count: [actual] (required: 1500+)
**DO NOT PROCEED** without valid documentation.
Possible causes:
- Internet connection issues
- Web search returned poor results
- Official docs not found
**Recovery options:**
1. Check internet connection and retry Step 4
2. Manually search for: "clerk official documentation"
3. If clerk is very new/niche, consider:
- Creating minimal patterns.md from official GitHub
- Marking metadata as "low confidence"
4. Run repair script: `./bootstrapper/scripts/repair_skills.py --skill clerk`
**If this is a critical blocker:** Ask user for clerk documentation sources.
STOP HERE - Do not proceed without valid documentation.
✅ Documentation successfully created and validated.
NOW GO TO STEP 3 to use the fresh documentation.
═══════════════════════════════════════════════ END OF MANDATORY CHECKLIST ═══════════════════════════════════════════════
Read from: references/external/clerk-patterns.md
This section contains the comprehensive clerk expertise fetched from web searches. Apply patterns and avoid anti-patterns documented above.
Use this skill when:
After implementing clerk changes, ensure:
Check against quality gates in .claude/core/gates.yaml
This skill covers:
This skill does NOT cover:
This skill is self-maintaining:
Manual maintenance (optional):
references/If documentation is insufficient:
WebSearch: "clerk [your specific topic] 2025".skill-metadata.json and re-invoke skillclerk-patterns.md with additional patternsProblem: Skill says documentation missing but file exists Solution: Check file size - might be empty or corrupted. Delete and retry Step 4.
Problem: Documentation feels outdated Solution: Check metadata age. If < 30 days but still feels stale, delete metadata to force refresh.
Problem: Web searches failing consistently Solution: Check internet connection. If offline, cannot use self-populating skills.
Problem: Documentation lacks context for my specific stack Solution: Re-run Step 4 after ensuring context.yaml is up to date.