@bgicli/bgicli 2.2.8 → 2.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/data/skills/anthropic-algorithmic-art/SKILL.md +405 -0
  2. package/data/skills/anthropic-canvas-design/SKILL.md +130 -0
  3. package/data/skills/anthropic-claude-api/SKILL.md +243 -0
  4. package/data/skills/anthropic-doc-coauthoring/SKILL.md +375 -0
  5. package/data/skills/anthropic-docx/SKILL.md +590 -0
  6. package/data/skills/anthropic-frontend-design/SKILL.md +42 -0
  7. package/data/skills/anthropic-internal-comms/SKILL.md +32 -0
  8. package/data/skills/anthropic-mcp-builder/SKILL.md +236 -0
  9. package/data/skills/anthropic-pdf/SKILL.md +314 -0
  10. package/data/skills/anthropic-pptx/SKILL.md +232 -0
  11. package/data/skills/anthropic-skill-creator/SKILL.md +485 -0
  12. package/data/skills/anthropic-webapp-testing/SKILL.md +96 -0
  13. package/data/skills/anthropic-xlsx/SKILL.md +292 -0
  14. package/data/skills/arxiv-database/SKILL.md +362 -0
  15. package/data/skills/astropy/SKILL.md +329 -0
  16. package/data/skills/ctx-advanced-evaluation/SKILL.md +402 -0
  17. package/data/skills/ctx-bdi-mental-states/SKILL.md +311 -0
  18. package/data/skills/ctx-context-compression/SKILL.md +272 -0
  19. package/data/skills/ctx-context-degradation/SKILL.md +206 -0
  20. package/data/skills/ctx-context-fundamentals/SKILL.md +201 -0
  21. package/data/skills/ctx-context-optimization/SKILL.md +195 -0
  22. package/data/skills/ctx-evaluation/SKILL.md +251 -0
  23. package/data/skills/ctx-filesystem-context/SKILL.md +287 -0
  24. package/data/skills/ctx-hosted-agents/SKILL.md +260 -0
  25. package/data/skills/ctx-memory-systems/SKILL.md +225 -0
  26. package/data/skills/ctx-multi-agent-patterns/SKILL.md +257 -0
  27. package/data/skills/ctx-project-development/SKILL.md +291 -0
  28. package/data/skills/ctx-tool-design/SKILL.md +271 -0
  29. package/data/skills/dhdna-profiler/SKILL.md +162 -0
  30. package/data/skills/generate-image/SKILL.md +183 -0
  31. package/data/skills/geomaster/SKILL.md +365 -0
  32. package/data/skills/get-available-resources/SKILL.md +275 -0
  33. package/data/skills/hamelsmu-build-review-interface/SKILL.md +96 -0
  34. package/data/skills/hamelsmu-error-analysis/SKILL.md +164 -0
  35. package/data/skills/hamelsmu-eval-audit/SKILL.md +183 -0
  36. package/data/skills/hamelsmu-evaluate-rag/SKILL.md +177 -0
  37. package/data/skills/hamelsmu-generate-synthetic-data/SKILL.md +131 -0
  38. package/data/skills/hamelsmu-validate-evaluator/SKILL.md +212 -0
  39. package/data/skills/hamelsmu-write-judge-prompt/SKILL.md +144 -0
  40. package/data/skills/hf-cli/SKILL.md +174 -0
  41. package/data/skills/hf-mcp/SKILL.md +178 -0
  42. package/data/skills/hugging-face-dataset-viewer/SKILL.md +121 -0
  43. package/data/skills/hugging-face-datasets/SKILL.md +542 -0
  44. package/data/skills/hugging-face-evaluation/SKILL.md +651 -0
  45. package/data/skills/hugging-face-jobs/SKILL.md +1042 -0
  46. package/data/skills/hugging-face-model-trainer/SKILL.md +717 -0
  47. package/data/skills/hugging-face-paper-pages/SKILL.md +239 -0
  48. package/data/skills/hugging-face-paper-publisher/SKILL.md +624 -0
  49. package/data/skills/hugging-face-tool-builder/SKILL.md +110 -0
  50. package/data/skills/hugging-face-trackio/SKILL.md +115 -0
  51. package/data/skills/hugging-face-vision-trainer/SKILL.md +593 -0
  52. package/data/skills/huggingface-gradio/SKILL.md +245 -0
  53. package/data/skills/matlab/SKILL.md +376 -0
  54. package/data/skills/modal/SKILL.md +381 -0
  55. package/data/skills/openai-cloudflare-deploy/SKILL.md +224 -0
  56. package/data/skills/openai-develop-web-game/SKILL.md +149 -0
  57. package/data/skills/openai-doc/SKILL.md +80 -0
  58. package/data/skills/openai-figma/SKILL.md +42 -0
  59. package/data/skills/openai-figma-implement-design/SKILL.md +264 -0
  60. package/data/skills/openai-gh-address-comments/SKILL.md +25 -0
  61. package/data/skills/openai-gh-fix-ci/SKILL.md +69 -0
  62. package/data/skills/openai-imagegen/SKILL.md +174 -0
  63. package/data/skills/openai-jupyter-notebook/SKILL.md +107 -0
  64. package/data/skills/openai-linear/SKILL.md +87 -0
  65. package/data/skills/openai-netlify-deploy/SKILL.md +247 -0
  66. package/data/skills/openai-notion-knowledge-capture/SKILL.md +56 -0
  67. package/data/skills/openai-notion-meeting-intelligence/SKILL.md +60 -0
  68. package/data/skills/openai-notion-research-documentation/SKILL.md +59 -0
  69. package/data/skills/openai-notion-spec-to-implementation/SKILL.md +58 -0
  70. package/data/skills/openai-openai-docs/SKILL.md +69 -0
  71. package/data/skills/openai-pdf/SKILL.md +67 -0
  72. package/data/skills/openai-playwright/SKILL.md +147 -0
  73. package/data/skills/openai-render-deploy/SKILL.md +479 -0
  74. package/data/skills/openai-screenshot/SKILL.md +267 -0
  75. package/data/skills/openai-security-best-practices/SKILL.md +86 -0
  76. package/data/skills/openai-security-ownership-map/SKILL.md +206 -0
  77. package/data/skills/openai-security-threat-model/SKILL.md +81 -0
  78. package/data/skills/openai-sentry/SKILL.md +123 -0
  79. package/data/skills/openai-sora/SKILL.md +178 -0
  80. package/data/skills/openai-speech/SKILL.md +144 -0
  81. package/data/skills/openai-spreadsheet/SKILL.md +145 -0
  82. package/data/skills/openai-transcribe/SKILL.md +81 -0
  83. package/data/skills/openai-vercel-deploy/SKILL.md +77 -0
  84. package/data/skills/openai-yeet/SKILL.md +28 -0
  85. package/data/skills/pennylane/SKILL.md +224 -0
  86. package/data/skills/polars-bio/SKILL.md +374 -0
  87. package/data/skills/primekg/SKILL.md +97 -0
  88. package/data/skills/pymatgen/SKILL.md +689 -0
  89. package/data/skills/qiskit/SKILL.md +273 -0
  90. package/data/skills/qutip/SKILL.md +316 -0
  91. package/data/skills/recursive-decomposition/SKILL.md +185 -0
  92. package/data/skills/rowan/SKILL.md +427 -0
  93. package/data/skills/scholar-evaluation/SKILL.md +298 -0
  94. package/data/skills/sentry-create-alert/SKILL.md +210 -0
  95. package/data/skills/sentry-fix-issues/SKILL.md +126 -0
  96. package/data/skills/sentry-pr-code-review/SKILL.md +105 -0
  97. package/data/skills/sentry-python-sdk/SKILL.md +317 -0
  98. package/data/skills/sentry-setup-ai-monitoring/SKILL.md +217 -0
  99. package/data/skills/stable-baselines3/SKILL.md +297 -0
  100. package/data/skills/sympy/SKILL.md +498 -0
  101. package/data/skills/trailofbits-ask-questions-if-underspecified/SKILL.md +85 -0
  102. package/data/skills/trailofbits-audit-context-building/SKILL.md +302 -0
  103. package/data/skills/trailofbits-differential-review/SKILL.md +220 -0
  104. package/data/skills/trailofbits-insecure-defaults/SKILL.md +117 -0
  105. package/data/skills/trailofbits-modern-python/SKILL.md +333 -0
  106. package/data/skills/trailofbits-property-based-testing/SKILL.md +123 -0
  107. package/data/skills/trailofbits-semgrep-rule-creator/SKILL.md +172 -0
  108. package/data/skills/trailofbits-sharp-edges/SKILL.md +292 -0
  109. package/data/skills/trailofbits-variant-analysis/SKILL.md +142 -0
  110. package/data/skills/transformers.js/SKILL.md +637 -0
  111. package/data/skills/writing/SKILL.md +419 -0
  112. package/dist/bgi.js +2 -2
  113. package/package.json +1 -1
@@ -0,0 +1,131 @@
1
+ ---
2
+ name: generate-synthetic-data
3
+ description: >
4
+ Create diverse synthetic test inputs for LLM pipeline evaluation using
5
+ dimension-based tuple generation. Use when bootstrapping an eval dataset,
6
+ when real user data is sparse, or when stress-testing specific failure
7
+ hypotheses. Do NOT use when you already have 100+ representative real
8
+ traces (use stratified sampling instead), or when the task is collecting
9
+ production logs.
10
+ ---
11
+
12
+ # Generate Synthetic Data
13
+
14
+ Generate diverse, realistic test inputs that cover the failure space of an LLM pipeline.
15
+
16
+ ## Prerequisites
17
+
18
+ Before generating synthetic data, identify where the pipeline is likely to fail. Ask the user about known failure-prone areas, review existing user feedback, or form hypotheses from available traces. Dimensions (Step 1) must target anticipated failures, not arbitrary variation.
19
+
20
+ ## Core Process
21
+
22
+ ### Step 1: Define Dimensions
23
+
24
+ Dimensions are axes of variation specific to your application. Choose dimensions based on where you expect failures.
25
+
26
+ ```
27
+ Dimension 1: [Name] — [What it captures]
28
+ Values: [value_a, value_b, value_c, ...]
29
+
30
+ Dimension 2: [Name] — [What it captures]
31
+ Values: [value_a, value_b, value_c, ...]
32
+
33
+ Dimension 3: [Name] — [What it captures]
34
+ Values: [value_a, value_b, value_c, ...]
35
+ ```
36
+
37
+ Example for a real estate assistant:
38
+
39
+ ```
40
+ Feature: what task the user wants
41
+ Values: [property search, scheduling, email drafting]
42
+
43
+ Client Persona: who the user serves
44
+ Values: [first-time buyer, investor, luxury buyer]
45
+
46
+ Scenario Type: query clarity
47
+ Values: [well-specified, ambiguous, out-of-scope]
48
+ ```
49
+
50
+ Start with 3 dimensions. Add more only if initial traces reveal failure patterns along new axes.
51
+
52
+ ### Step 2: Draft 20 Tuples with the User
53
+
54
+ A tuple is one combination of dimension values defining a specific test case. Present 20 draft tuples to the user and iterate until they confirm the tuples reflect realistic scenarios. The user's domain knowledge is essential here — they know which combinations actually occur and which are unrealistic.
55
+
56
+ ```
57
+ (Feature: Property Search, Persona: Investor, Scenario: Ambiguous)
58
+ (Feature: Scheduling, Persona: First-time Buyer, Scenario: Well-specified)
59
+ (Feature: Email Drafting, Persona: Luxury Buyer, Scenario: Out-of-scope)
60
+ ```
61
+
62
+ ### Step 3: Generate More Tuples with an LLM
63
+
64
+ ```
65
+ Generate 10 random combinations of ({dim1}, {dim2}, {dim3})
66
+ for a {your application description}.
67
+
68
+ The dimensions are:
69
+ {dim1}: {description}. Possible values: {values}
70
+ {dim2}: {description}. Possible values: {values}
71
+ {dim3}: {description}. Possible values: {values}
72
+
73
+ Output each tuple in the format: ({dim1}, {dim2}, {dim3})
74
+ Avoid duplicates. Vary values across dimensions.
75
+ ```
76
+
77
+ ### Step 4: Convert Each Tuple to a Natural Language Query
78
+
79
+ Use a separate prompt for this step. Single-step generation (tuples + queries together) produces repetitive phrasing.
80
+
81
+ ```
82
+ We are generating synthetic user queries for a {your application}.
83
+ {Brief description of what it does.}
84
+
85
+ Given:
86
+ {dim1}: {value}
87
+ {dim2}: {value}
88
+ {dim3}: {value}
89
+
90
+ Write a realistic query that a user might enter. The query should
91
+ reflect the specified persona and scenario characteristics.
92
+
93
+ Example: "{one of your hand-written examples}"
94
+
95
+ Now generate a new query.
96
+ ```
97
+
98
+ ### Step 5: Filter for Quality
99
+
100
+ Review generated queries. Discard and regenerate when:
101
+ - Phrasing is awkward or unrealistic
102
+ - Content doesn't match the tuple's intent
103
+ - Queries are too similar to each other
104
+
105
+ Optional: use an LLM to rate realism on a 1-5 scale, discard below 3.
106
+
107
+ ### Step 6: Run Queries Through the Pipeline
108
+
109
+ Execute all queries through the full LLM pipeline. Capture complete traces: input, all intermediate steps, tool calls, retrieved docs, final output.
110
+
111
+ **Target: ~100 high-quality, diverse traces.** This is a rough heuristic for reaching saturation (where new traces stop revealing new failure categories). The number depends on system complexity.
112
+
113
+ ## Sampling Real User Data
114
+
115
+ When you have real queries available, don't sample randomly. Use stratified sampling:
116
+
117
+ 1. **Identify high-variance dimensions** — read through queries and find ways they differ (length, topic, complexity, presence of constraints).
118
+ 2. **Assign labels** — for small sets, with the user; for large sets, use K-means clustering on query embeddings.
119
+ 3. **Sample from each group** — ensures coverage across query types, not just the most common ones.
120
+
121
+ When both real and synthetic data are available, use synthetic data to fill gaps in underrepresented query types.
122
+
123
+ ## Anti-Patterns
124
+
125
+ - **Unstructured generation.** Prompting "give me test queries" without the dimension/tuple structure produces generic, repetitive, happy-path examples.
126
+ - **Single-step generation.** Generating tuples and queries in one prompt produces less diverse results than the two-step separation.
127
+ - **Arbitrary dimensions.** Dimensions that don't target failure-prone regions waste test budget.
128
+ - **Skipping user review of tuples.** Without the user validating tuples first, you can't judge whether LLM-generated tuples are realistic.
129
+ - **Synthetic data when no one can judge realism.** If no one can judge whether a synthetic trace is realistic, use real data instead.
130
+ - **Synthetic data for complex domain-specific content** (legal filings, medical records) where LLMs miss structural nuance.
131
+ - **Synthetic data for low-resource languages or dialects** where LLM-generated samples are unrealistic.
@@ -0,0 +1,212 @@
1
+ ---
2
+ name: validate-evaluator
3
+ description: >
4
+ Calibrate an LLM judge against human labels using data splits, TPR/TNR, and
5
+ bias correction. Use after writing a judge prompt (write-judge-prompt) when you
6
+ need to verify alignment before trusting its outputs. Do NOT use for code-based
7
+ evaluators (those are deterministic; test with standard unit tests).
8
+ ---
9
+
10
+ # Validate Evaluator
11
+
12
+ Calibrate an LLM judge against human judgment.
13
+
14
+ ## Overview
15
+
16
+ 1. Split human-labeled data into train (10-20%), dev (40-45%), test (40-45%)
17
+ 2. Run judge on dev set and measure TPR/TNR
18
+ 3. Iterate on the judge until TPR and TNR > 90% on dev set
19
+ 4. Run once on held-out test set for final TPR/TNR
20
+ 5. Apply bias correction formula to production data
21
+
22
+ ## Prerequisites
23
+
24
+ - A built LLM judge prompt (from write-judge-prompt)
25
+ - Human-labeled data: ~100 traces with binary Pass/Fail labels per failure mode
26
+ - Aim for ~50 Pass and ~50 Fail (balanced, even if real distribution is skewed)
27
+ - Labels must come from a domain expert, not outsourced annotators
28
+ - Candidate few-shot examples from your labeled data
29
+
30
+ ## Core Instructions
31
+
32
+ ### Step 1: Create Data Splits
33
+
34
+ Split human-labeled data into three disjoint sets:
35
+
36
+ | Split | Size | Purpose | Rules |
37
+ |-------|------|---------|-------|
38
+ | **Training** | 10-20% (~10-20 examples) | Source of few-shot examples for the judge prompt | Only clear-cut Pass and Fail cases. Used directly in the prompt. |
39
+ | **Dev** | 40-45% (~40-45 examples) | Iterative evaluator refinement | Never include in the prompt. Evaluate against repeatedly. |
40
+ | **Test** | 40-45% (~40-45 examples) | Final unbiased accuracy measurement | Do NOT look at during development. Used once at the end. |
41
+
42
+ Target: 30-50 examples of each class (Pass and Fail) across dev and test combined. Use balanced splits even if real-world prevalence is skewed — you need enough Fail examples to measure TNR reliably.
43
+
44
+ ```python
45
+ from sklearn.model_selection import train_test_split
46
+
47
+ # First split: separate test set
48
+ train_dev, test = train_test_split(
49
+ labeled_data, test_size=0.4, stratify=labeled_data['label'], random_state=42
50
+ )
51
+ # Second split: separate training examples from dev set
52
+ train, dev = train_test_split(
53
+ train_dev, test_size=0.75, stratify=train_dev['label'], random_state=42
54
+ )
55
+ # Result: ~15% train, ~45% dev, ~40% test
56
+ ```
57
+
58
+ ### Step 2: Run Evaluator on Dev Set
59
+
60
+ Run the judge on every example in the dev set. Compare predictions to human labels.
61
+
62
+ ### Step 3: Measure TPR and TNR
63
+
64
+ **TPR (True Positive Rate):** When a human says Pass, how often does the judge also say Pass?
65
+
66
+ ```
67
+ TPR = (judge says Pass AND human says Pass) / (human says Pass)
68
+ ```
69
+
70
+ **TNR (True Negative Rate):** When a human says Fail, how often does the judge also say Fail?
71
+
72
+ ```
73
+ TNR = (judge says Fail AND human says Fail) / (human says Fail)
74
+ ```
75
+
76
+ ```python
77
+ from sklearn.metrics import confusion_matrix
78
+
79
+ tn, fp, fn, tp = confusion_matrix(human_labels, evaluator_labels,
80
+ labels=['Fail', 'Pass']).ravel()
81
+ tpr = tp / (tp + fn)
82
+ tnr = tn / (tn + fp)
83
+ ```
84
+
85
+ Use TPR/TNR, not Precision/Recall or raw accuracy. These two metrics directly map to the bias correction formula. Use Cohen's Kappa only for measuring agreement between two human annotators, not for judge-vs-ground-truth.
86
+
87
+ ### Step 4: Inspect Disagreements
88
+
89
+ Examine every case where the judge disagrees with human labels:
90
+
91
+ | Disagreement Type | Judge | Human | Fix |
92
+ |-------------------|-------|-------|-----|
93
+ | **False Pass** | Pass | Fail | Judge is too lenient. Strengthen Fail definitions or add edge-case examples. |
94
+ | **False Fail** | Fail | Pass | Judge is too strict. Clarify Pass definitions or adjust examples. |
95
+
96
+ For each disagreement, determine whether to:
97
+ - Clarify wording in the judge prompt
98
+ - Swap or add few-shot examples from the training set
99
+ - Add explicit rules for the edge case
100
+ - Split the criterion into more specific sub-checks
101
+
102
+ ### Step 5: Iterate
103
+
104
+ Refine the judge prompt and re-run on the dev set. Repeat until TPR and TNR stabilize.
105
+
106
+ **Stopping criteria:**
107
+ - **Target:** TPR > 90% AND TNR > 90%
108
+ - **Minimum acceptable:** TPR > 80% AND TNR > 80%
109
+
110
+ **If alignment stalls:**
111
+
112
+ | Problem | Solution |
113
+ |---------|---------|
114
+ | TPR and TNR both low | Use a more capable LLM for the judge |
115
+ | One metric low, one acceptable | Inspect disagreements for the low metric specifically |
116
+ | Both plateau below target | Decompose the criterion into smaller, more atomic checks |
117
+ | Consistently wrong on certain input types | Add targeted few-shot examples from training set |
118
+ | Labels themselves seem inconsistent | Re-examine human labels; the rubric may need refinement |
119
+
120
+ ### Step 6: Final Measurement on Test Set
121
+
122
+ Run the judge **exactly once** on the held-out test set. Record final TPR and TNR.
123
+
124
+ Do not iterate after seeing test set results. Go back to step 4 with new dev data if needed.
125
+
126
+ ### Step 7 (Optional): Estimate True Success Rate (Rogan-Gladen Correction)
127
+
128
+ Raw judge scores on unlabeled production data are biased. If you need an accurate aggregate pass rate, correct for known judge errors:
129
+
130
+ ```
131
+ theta_hat = (p_obs + TNR - 1) / (TPR + TNR - 1)
132
+ ```
133
+
134
+ Where:
135
+ - `p_obs` = fraction of unlabeled traces the judge scored as Pass
136
+ - `TPR`, `TNR` = from test set measurement
137
+ - `theta_hat` = corrected estimate of true success rate
138
+
139
+ Clip to [0, 1]. Invalid when TPR + TNR - 1 is near 0 (judge is no better than random).
140
+
141
+ **Example:**
142
+ - Judge TPR = 0.92, TNR = 0.88
143
+ - 500 production traces: 400 scored Pass -> p_obs = 0.80
144
+ - theta_hat = (0.80 + 0.88 - 1) / (0.92 + 0.88 - 1) = 0.68 / 0.80 = **0.85**
145
+ - True success rate is ~85%, not the raw 80%
146
+
147
+ ### Step 8: Confidence Interval
148
+
149
+ Compute a bootstrap confidence interval. A point estimate alone is not enough.
150
+
151
+ ```python
152
+ import numpy as np
153
+
154
+ def bootstrap_ci(human_labels, eval_labels, p_obs, n_bootstrap=2000):
155
+ """Bootstrap 95% CI for corrected success rate."""
156
+ n = len(human_labels)
157
+ estimates = []
158
+ for _ in range(n_bootstrap):
159
+ idx = np.random.choice(n, size=n, replace=True)
160
+ h = np.array(human_labels)[idx]
161
+ e = np.array(eval_labels)[idx]
162
+
163
+ tp = ((h == 'Pass') & (e == 'Pass')).sum()
164
+ fn = ((h == 'Pass') & (e == 'Fail')).sum()
165
+ tn = ((h == 'Fail') & (e == 'Fail')).sum()
166
+ fp = ((h == 'Fail') & (e == 'Pass')).sum()
167
+
168
+ tpr_b = tp / (tp + fn) if (tp + fn) > 0 else 0
169
+ tnr_b = tn / (tn + fp) if (tn + fp) > 0 else 0
170
+ denom = tpr_b + tnr_b - 1
171
+
172
+ if abs(denom) < 1e-6:
173
+ continue
174
+ theta = (p_obs + tnr_b - 1) / denom
175
+ estimates.append(np.clip(theta, 0, 1))
176
+
177
+ return np.percentile(estimates, 2.5), np.percentile(estimates, 97.5)
178
+
179
+ lower, upper = bootstrap_ci(test_human, test_eval, p_obs=0.80)
180
+ print(f"95% CI: [{lower:.2f}, {upper:.2f}]")
181
+ ```
182
+
183
+ Or use `judgy` (`pip install judgy`):
184
+
185
+ ```python
186
+ from judgy import estimate_success_rate
187
+
188
+ result = estimate_success_rate(
189
+ human_labels=test_human_labels,
190
+ evaluator_labels=test_eval_labels,
191
+ unlabeled_labels=prod_eval_labels
192
+ )
193
+ print(f"Corrected rate: {result.estimate:.2f}")
194
+ print(f"95% CI: [{result.ci_lower:.2f}, {result.ci_upper:.2f}]")
195
+ ```
196
+
197
+ ## Practical Guidance
198
+
199
+ - **Pin exact model versions** for LLM judges (e.g., `gpt-4o-2024-05-13`, not `gpt-4o`). Providers update models without notice, causing silent drift.
200
+ - **Re-validate** after changing the judge prompt, switching models, or when production confidence intervals widen unexpectedly.
201
+ - Use ~100 labeled examples (50 Pass, 50 Fail). Below 60, confidence intervals become wide.
202
+ - **One trusted domain expert** is the most efficient labeling path. If not feasible, have two annotators label 20-50 traces independently and resolve disagreements before proceeding.
203
+ - **Improving TPR narrows the confidence interval more than improving TNR.** The correction formula divides by TPR, so low TPR amplifies estimation errors into wide CIs.
204
+
205
+ ## Anti-Patterns
206
+
207
+ - **Assuming judges "just work" without validation.** A judge may consistently miss failures or flag passing traces.
208
+ - **Using raw accuracy or percent agreement.** Use TPR and TNR. With class imbalance, raw accuracy is misleading.
209
+ - **Dev/test examples as few-shot examples.** This is data leakage.
210
+ - **Reporting dev set performance as final accuracy.** Dev numbers are optimistic. The test set gives the unbiased estimate.
211
+ - **Raw judge scores without bias correction.** If you report an aggregate pass rate, apply the Rogan-Gladen formula (Step 7).
212
+ - **Point estimates without confidence intervals.** A corrected rate of 85% could easily be 78-92% with small test sets. Report the range so stakeholders know how much to trust the number.
@@ -0,0 +1,144 @@
1
+ ---
2
+ name: write-judge-prompt
3
+ description: >
4
+ Design LLM-as-Judge evaluators for subjective criteria that code-based checks
5
+ cannot handle. Use when a failure mode requires interpretation (tone,
6
+ faithfulness, relevance, completeness). Do NOT use when the failure mode can be
7
+ checked with code (regex, schema validation, execution tests). Do NOT use when
8
+ you need to validate or calibrate the judge — use validate-evaluator instead.
9
+ ---
10
+
11
+ # Write LLM-as-Judge Prompt
12
+
13
+ Design a binary Pass/Fail LLM-as-Judge evaluator for one specific failure mode. Each judge checks exactly one thing.
14
+
15
+ ## Prerequisites
16
+
17
+ - Error analysis is complete. The failure mode is identified.
18
+ - You have human-labeled traces for this failure mode (at least 20 Pass and 20 Fail examples).
19
+ - A code-based evaluator cannot check this failure mode. Exhaust code-based options before reaching for a judge — many failure modes that seem subjective reduce to keyword checks, regex, or API calls when you understand the domain. Example: detecting whether an AI interviewing coach suggests "general" questions (asking about typical behavior instead of a specific past event) seems to require semantic understanding, but in practice a keyword check for words like "usually," "typical," and "normally" could work quite well.
20
+
21
+ ## The Four Components
22
+
23
+ Every judge prompt requires exactly four components:
24
+
25
+ ### 1. Task and Evaluation Criterion
26
+
27
+ State what the judge evaluates. One failure mode per judge.
28
+
29
+ ```
30
+ You are an evaluator assessing whether a real estate assistant's email
31
+ uses the appropriate tone for the client's persona.
32
+ ```
33
+
34
+ Not: "Evaluate whether the email is good" or "Rate the email quality from 1-5."
35
+
36
+ ### 2. Pass/Fail Definitions
37
+
38
+ Outcomes are strictly binary: Pass or Fail. No Likert scales, no letter grades, no partial credit. Define exactly what constitutes Pass and Fail. These definitions come from your error analysis failure mode descriptions.
39
+
40
+ ```
41
+ ## Definitions
42
+
43
+ PASS: The email matches the expected communication style for the client persona:
44
+ - Luxury Buyers: formal language, emphasis on exclusive features, premium
45
+ market positioning, no casual slang
46
+ - First-Time Homebuyers: warm and encouraging tone, educational explanations,
47
+ avoids jargon, patient and supportive
48
+ - Investors: data-driven language, ROI-focused, market analytics, concise
49
+ and professional
50
+
51
+ FAIL: The email uses a tone mismatched to the client persona. Examples:
52
+ - Using casual slang ("hey, check out this pad!") for a luxury buyer
53
+ - Using heavy financial jargon for a first-time homebuyer
54
+ - Using overly emotional language for an investor
55
+ ```
56
+
57
+ ### 3. Few-Shot Examples
58
+
59
+ Include labeled Pass and Fail examples from your human-labeled data.
60
+
61
+ ```
62
+ ## Examples
63
+
64
+ ### Example 1: PASS
65
+ Client Persona: Luxury Buyer
66
+ Email: "Dear Mr. Harrington, I am pleased to present an exclusive listing
67
+ at 1200 Pacific Heights Drive. This distinguished property features..."
68
+ Critique: The email opens with a formal salutation and uses language
69
+ consistent with luxury positioning — "exclusive listing," "distinguished
70
+ property." No casual slang or informal phrasing. The tone matches the
71
+ luxury buyer persona throughout.
72
+ Result: Pass
73
+
74
+ ### Example 2: FAIL
75
+ Client Persona: Luxury Buyer
76
+ Email: "Hey! Just found this awesome place you might like. It's got a
77
+ pool and stuff, super cool neighborhood..."
78
+ Critique: The greeting "Hey!" is informal. Phrases like "awesome place,"
79
+ "got a pool and stuff," and "super cool" are casual slang inappropriate
80
+ for a luxury buyer. The email reads like a text message, not a
81
+ professional communication for a high-end client.
82
+ Result: Fail
83
+
84
+ ### Example 3: PASS (borderline)
85
+ Client Persona: First-Time Homebuyer
86
+ Email: "Hi Sarah, I found a property that might be a great fit for your
87
+ first home. The neighborhood has good schools nearby, and the monthly
88
+ payment would be similar to what you're currently paying in rent..."
89
+ Critique: The greeting is warm but not overly casual. The email explains
90
+ the property in relatable terms — comparing mortgage to rent, mentioning
91
+ schools — which is educational without being condescending. It avoids
92
+ jargon like "amortization" or "LTV ratio." While not deeply technical,
93
+ this matches the supportive tone expected for a first-time buyer.
94
+ Result: Pass
95
+ ```
96
+
97
+ **Rules for selecting examples:**
98
+ - Include at least one clear Pass, one clear Fail, and one borderline case. Borderline examples are the most valuable — they teach nuance.
99
+ - Draw examples from the training split (10-20% of labeled data set aside for this purpose).
100
+ - Any example used in the judge prompt must be excluded from dev and test sets. Using dev/test examples is data leakage.
101
+ - 2-4 examples is typical. Performance plateaus after 4-8.
102
+
103
+ ### 4. Structured Output Format
104
+
105
+ Enforce structured output using your LLM provider's schema enforcement (e.g., `response_format` in OpenAI, tool definitions in Anthropic) or a library like Instructor or Outlines. If the provider doesn't support schema enforcement, specify the JSON schema in the prompt.
106
+
107
+ The output must include a critique before the verdict. Placing the critique first forces the judge to articulate its assessment before committing to a decision.
108
+
109
+ ```json
110
+ {
111
+ "critique": "string — detailed assessment of the output against the criterion",
112
+ "result": "Pass or Fail"
113
+ }
114
+ ```
115
+
116
+ Critiques must be detailed, not terse. A good critique explains what specifically was correct or incorrect and references concrete evidence from the output. The critiques in your few-shot examples set the bar for the level of detail the judge will produce.
117
+
118
+ ## Choosing What to Pass to the Judge
119
+
120
+ Feed only what the judge needs for an accurate decision:
121
+
122
+ | Failure Mode | What the Judge Needs |
123
+ |-------------|---------------------|
124
+ | Tone mismatch | Client persona + generated email |
125
+ | Answer faithfulness | Retrieved context + generated answer |
126
+ | SQL correctness | User query + generated SQL + schema |
127
+ | Instruction following | System prompt rules + generated response |
128
+ | Tool call justification | Conversation history + tool call + tool result |
129
+
130
+ For long documents, feed only the relevant snippet, not the entire document.
131
+
132
+ ## Model Selection
133
+
134
+ Start with the most capable model available. The same model used for the main task works as judge (the judge performs a different, narrower task). Optimize for cost later once alignment is confirmed.
135
+
136
+ ## Anti-Patterns
137
+
138
+ - **Vague criteria like "is this helpful?"** Target a specific, observable failure mode from error analysis.
139
+ - **Holistic judge for the entire trace.** A single judge covering multiple dimensions produces unactionable verdicts.
140
+ - **No few-shot examples.** Without examples, the model won't know what counts as a failure in your application.
141
+ - **Dev/test examples used as few-shot.** This is data leakage. Use only the training split.
142
+ - **Likert scales (1-5, letter grades, etc.).** Binary pass/fail only. Likert scales produce scores that sound precise but can't be calibrated: annotators disagree on the difference between a 3 and a 4, and the judge inherits that noise. Binary forces you to define a clear decision boundary upfront, which makes inter-annotator agreement measurable and the judge's errors actionable. If you need to capture severity, use multiple binary judges (e.g., "factually wrong" and "dangerously wrong") rather than one ordinal scale.
143
+ - **Skipping validation.** Measure alignment with human labels using validate-evaluator before trusting the judge.
144
+ - **Judges for specification failures without fixing the prompt first.** If the prompt never asked for the behavior, add the instruction before building an evaluator. For critical requirements, a judge can still serve as a regression guard.
@@ -0,0 +1,174 @@
1
+ ---
2
+ name: hf-cli
3
+ description: "Hugging Face Hub CLI (`hf`) for downloading, uploading, and managing repositories, models, datasets, and Spaces on the Hugging Face Hub. Replaces now deprecated `huggingface-cli` command."
4
+ ---
5
+
6
+ Install: `curl -LsSf https://hf.co/cli/install.sh | bash -s`.
7
+
8
+ The Hugging Face Hub CLI tool `hf` is available. IMPORTANT: The `hf` command replaces the deprecated `huggingface-cli` command.
9
+
10
+ Use `hf --help` to view available functions. Note that auth commands are now all under `hf auth` e.g. `hf auth whoami`.
11
+
12
+ Generated with `huggingface_hub v1.7.2`. Run `hf skills add --force` to regenerate.
13
+
14
+ ## Commands
15
+
16
+ - `hf download REPO_ID` — Download files from the Hub. `[--type CHOICE --revision TEXT --include TEXT --exclude TEXT --cache-dir TEXT --local-dir TEXT --force-download --dry-run --quiet --max-workers INTEGER]`
17
+ - `hf env` — Print information about the environment.
18
+ - `hf sync` — Sync files between local directory and a bucket. `[--delete --ignore-times --ignore-sizes --plan TEXT --apply TEXT --dry-run --include TEXT --exclude TEXT --filter-from TEXT --existing --ignore-existing --verbose --quiet]`
19
+ - `hf upload REPO_ID` — Upload a file or a folder to the Hub. Recommended for single-commit uploads. `[--type CHOICE --revision TEXT --private --include TEXT --exclude TEXT --delete TEXT --commit-message TEXT --commit-description TEXT --create-pr --every FLOAT --quiet]`
20
+ - `hf upload-large-folder REPO_ID LOCAL_PATH` — Upload a large folder to the Hub. Recommended for resumable uploads. `[--type CHOICE --revision TEXT --private --include TEXT --exclude TEXT --num-workers INTEGER --no-report --no-bars]`
21
+ - `hf version` — Print information about the hf version.
22
+
23
+ ### `hf auth` — Manage authentication (login, logout, etc.).
24
+
25
+ - `hf auth list` — List all stored access tokens.
26
+ - `hf auth login` — Login using a token from huggingface.co/settings/tokens. `[--add-to-git-credential --force]`
27
+ - `hf auth logout` — Logout from a specific token. `[--token-name TEXT]`
28
+ - `hf auth switch` — Switch between access tokens. `[--token-name TEXT --add-to-git-credential]`
29
+ - `hf auth whoami` — Find out which huggingface.co account you are logged in as. `[--format CHOICE]`
30
+
31
+ ### `hf buckets` — Commands to interact with buckets.
32
+
33
+ - `hf buckets cp SRC` — Copy a single file to or from a bucket. `[--quiet]`
34
+ - `hf buckets create BUCKET_ID` — Create a new bucket. `[--private --exist-ok --quiet]`
35
+ - `hf buckets delete BUCKET_ID` — Delete a bucket. `[--yes --missing-ok --quiet]`
36
+ - `hf buckets info BUCKET_ID` — Get info about a bucket. `[--quiet]`
37
+ - `hf buckets list` — List buckets or files in a bucket. `[--human-readable --tree --recursive --format CHOICE --quiet]`
38
+ - `hf buckets move FROM_ID TO_ID` — Move (rename) a bucket to a new name or namespace.
39
+ - `hf buckets remove ARGUMENT` — Remove files from a bucket. `[--recursive --yes --dry-run --include TEXT --exclude TEXT --quiet]`
40
+ - `hf buckets sync` — Sync files between local directory and a bucket. `[--delete --ignore-times --ignore-sizes --plan TEXT --apply TEXT --dry-run --include TEXT --exclude TEXT --filter-from TEXT --existing --ignore-existing --verbose --quiet]`
41
+
42
+ ### `hf cache` — Manage local cache directory.
43
+
44
+ - `hf cache list` — List cached repositories or revisions. `[--cache-dir TEXT --revisions --filter TEXT --format CHOICE --quiet --sort CHOICE --limit INTEGER]`
45
+ - `hf cache prune` — Remove detached revisions from the cache. `[--cache-dir TEXT --yes --dry-run]`
46
+ - `hf cache rm TARGETS` — Remove cached repositories or revisions. `[--cache-dir TEXT --yes --dry-run]`
47
+ - `hf cache verify REPO_ID` — Verify checksums for a single repo revision from cache or a local directory. `[--type CHOICE --revision TEXT --cache-dir TEXT --local-dir TEXT --fail-on-missing-files --fail-on-extra-files]`
48
+
49
+ ### `hf collections` — Interact with collections on the Hub.
50
+
51
+ - `hf collections add-item COLLECTION_SLUG ITEM_ID ITEM_TYPE` — Add an item to a collection. `[--note TEXT --exists-ok]`
52
+ - `hf collections create TITLE` — Create a new collection on the Hub. `[--namespace TEXT --description TEXT --private --exists-ok]`
53
+ - `hf collections delete COLLECTION_SLUG` — Delete a collection from the Hub. `[--missing-ok]`
54
+ - `hf collections delete-item COLLECTION_SLUG ITEM_OBJECT_ID` — Delete an item from a collection. `[--missing-ok]`
55
+ - `hf collections info COLLECTION_SLUG` — Get info about a collection on the Hub. Output is in JSON format.
56
+ - `hf collections list` — List collections on the Hub. `[--owner TEXT --item TEXT --sort CHOICE --limit INTEGER --format CHOICE --quiet]`
57
+ - `hf collections update COLLECTION_SLUG` — Update a collection's metadata on the Hub. `[--title TEXT --description TEXT --position INTEGER --private --theme TEXT]`
58
+ - `hf collections update-item COLLECTION_SLUG ITEM_OBJECT_ID` — Update an item in a collection. `[--note TEXT --position INTEGER]`
59
+
60
+ ### `hf datasets` — Interact with datasets on the Hub.
61
+
62
+ - `hf datasets info DATASET_ID` — Get info about a dataset on the Hub. Output is in JSON format. `[--revision TEXT --expand TEXT]`
63
+ - `hf datasets list` — List datasets on the Hub. `[--search TEXT --author TEXT --filter TEXT --sort CHOICE --limit INTEGER --expand TEXT --format CHOICE --quiet]`
64
+ - `hf datasets parquet DATASET_ID` — List parquet file URLs available for a dataset. `[--subset TEXT --split TEXT --format CHOICE --quiet]`
65
+ - `hf datasets sql SQL` — Execute a raw SQL query with DuckDB against dataset parquet URLs. `[--format CHOICE]`
66
+
67
+ ### `hf discussions` — Manage discussions and pull requests on the Hub.
68
+
69
+ - `hf discussions close REPO_ID NUM` — Close a discussion or pull request. `[--comment TEXT --yes --type CHOICE]`
70
+ - `hf discussions comment REPO_ID NUM` — Comment on a discussion or pull request. `[--body TEXT --body-file PATH --type CHOICE]`
71
+ - `hf discussions create REPO_ID --title TEXT` — Create a new discussion or pull request on a repo. `[--body TEXT --body-file PATH --pull-request --type CHOICE]`
72
+ - `hf discussions diff REPO_ID NUM` — Show the diff of a pull request. `[--type CHOICE]`
73
+ - `hf discussions info REPO_ID NUM` — Get info about a discussion or pull request. `[--comments --diff --no-color --type CHOICE --format CHOICE]`
74
+ - `hf discussions list REPO_ID` — List discussions and pull requests on a repo. `[--status CHOICE --kind CHOICE --author TEXT --limit INTEGER --type CHOICE --format CHOICE --quiet]`
75
+ - `hf discussions merge REPO_ID NUM` — Merge a pull request. `[--comment TEXT --yes --type CHOICE]`
76
+ - `hf discussions rename REPO_ID NUM NEW_TITLE` — Rename a discussion or pull request. `[--type CHOICE]`
77
+ - `hf discussions reopen REPO_ID NUM` — Reopen a closed discussion or pull request. `[--comment TEXT --yes --type CHOICE]`
78
+
79
+ ### `hf endpoints` — Manage Hugging Face Inference Endpoints.
80
+
81
+ - `hf endpoints catalog deploy --repo TEXT` — Deploy an Inference Endpoint from the Model Catalog. `[--name TEXT --accelerator TEXT --namespace TEXT]`
82
+ - `hf endpoints catalog list` — List available Catalog models.
83
+ - `hf endpoints delete NAME` — Delete an Inference Endpoint permanently. `[--namespace TEXT --yes]`
84
+ - `hf endpoints deploy NAME --repo TEXT --framework TEXT --accelerator TEXT --instance-size TEXT --instance-type TEXT --region TEXT --vendor TEXT` — Deploy an Inference Endpoint from a Hub repository. `[--namespace TEXT --task TEXT --min-replica INTEGER --max-replica INTEGER --scale-to-zero-timeout INTEGER --scaling-metric CHOICE --scaling-threshold FLOAT]`
85
+ - `hf endpoints describe NAME` — Get information about an existing endpoint. `[--namespace TEXT]`
86
+ - `hf endpoints list` — Lists all Inference Endpoints for the given namespace. `[--namespace TEXT --format CHOICE --quiet]`
87
+ - `hf endpoints pause NAME` — Pause an Inference Endpoint. `[--namespace TEXT]`
88
+ - `hf endpoints resume NAME` — Resume an Inference Endpoint. `[--namespace TEXT --fail-if-already-running]`
89
+ - `hf endpoints scale-to-zero NAME` — Scale an Inference Endpoint to zero. `[--namespace TEXT]`
90
+ - `hf endpoints update NAME` — Update an existing endpoint. `[--namespace TEXT --repo TEXT --accelerator TEXT --instance-size TEXT --instance-type TEXT --framework TEXT --revision TEXT --task TEXT --min-replica INTEGER --max-replica INTEGER --scale-to-zero-timeout INTEGER --scaling-metric CHOICE --scaling-threshold FLOAT]`
91
+
92
+ ### `hf extensions` — Manage hf CLI extensions.
93
+
94
+ - `hf extensions exec NAME` — Execute an installed extension.
95
+ - `hf extensions install REPO_ID` — Install an extension from a public GitHub repository. `[--force]`
96
+ - `hf extensions list` — List installed extension commands. `[--format CHOICE --quiet]`
97
+ - `hf extensions remove NAME` — Remove an installed extension.
98
+ - `hf extensions search` — Search extensions available on GitHub (tagged with 'hf-extension' topic). `[--format CHOICE --quiet]`
99
+
100
+ ### `hf jobs` — Run and manage Jobs on the Hub.
101
+
102
+ - `hf jobs cancel JOB_ID` — Cancel a Job `[--namespace TEXT]`
103
+ - `hf jobs hardware` — List available hardware options for Jobs
104
+ - `hf jobs inspect JOB_IDS` — Display detailed information on one or more Jobs `[--namespace TEXT]`
105
+ - `hf jobs logs JOB_ID` — Fetch the logs of a Job. `[--follow --tail INTEGER --namespace TEXT]`
106
+ - `hf jobs ps` — List Jobs. `[--all --namespace TEXT --filter TEXT --format TEXT --quiet]`
107
+ - `hf jobs run IMAGE COMMAND` — Run a Job. `[--env TEXT --secrets TEXT --label TEXT --env-file TEXT --secrets-file TEXT --flavor CHOICE --timeout TEXT --detach --namespace TEXT]`
108
+ - `hf jobs scheduled delete SCHEDULED_JOB_ID` — Delete a scheduled Job. `[--namespace TEXT]`
109
+ - `hf jobs scheduled inspect SCHEDULED_JOB_IDS` — Display detailed information on one or more scheduled Jobs `[--namespace TEXT]`
110
+ - `hf jobs scheduled ps` — List scheduled Jobs `[--all --namespace TEXT --filter TEXT --format TEXT --quiet]`
111
+ - `hf jobs scheduled resume SCHEDULED_JOB_ID` — Resume (unpause) a scheduled Job. `[--namespace TEXT]`
112
+ - `hf jobs scheduled run SCHEDULE IMAGE COMMAND` — Schedule a Job. `[--suspend --concurrency --env TEXT --secrets TEXT --label TEXT --env-file TEXT --secrets-file TEXT --flavor CHOICE --timeout TEXT --namespace TEXT]`
113
+ - `hf jobs scheduled suspend SCHEDULED_JOB_ID` — Suspend (pause) a scheduled Job. `[--namespace TEXT]`
114
+ - `hf jobs scheduled uv run SCHEDULE SCRIPT` — Run a UV script (local file or URL) on HF infrastructure `[--suspend --concurrency --image TEXT --flavor CHOICE --env TEXT --secrets TEXT --label TEXT --env-file TEXT --secrets-file TEXT --timeout TEXT --namespace TEXT --with TEXT --python TEXT]`
115
+ - `hf jobs stats` — Fetch the resource usage statistics and metrics of Jobs `[--namespace TEXT]`
116
+ - `hf jobs uv run SCRIPT` — Run a UV script (local file or URL) on HF infrastructure `[--image TEXT --flavor CHOICE --env TEXT --secrets TEXT --label TEXT --env-file TEXT --secrets-file TEXT --timeout TEXT --detach --namespace TEXT --with TEXT --python TEXT]`
117
+
118
+ ### `hf models` — Interact with models on the Hub.
119
+
120
+ - `hf models info MODEL_ID` — Get info about a model on the Hub. Output is in JSON format. `[--revision TEXT --expand TEXT]`
121
+ - `hf models list` — List models on the Hub. `[--search TEXT --author TEXT --filter TEXT --num-parameters TEXT --sort CHOICE --limit INTEGER --expand TEXT --format CHOICE --quiet]`
122
+
123
+ ### `hf papers` — Interact with papers on the Hub.
124
+
125
+ - `hf papers list` — List daily papers on the Hub. `[--date TEXT --sort CHOICE --limit INTEGER --format CHOICE --quiet]`
126
+
127
+ ### `hf repos` — Manage repos on the Hub.
128
+
129
+ - `hf repos branch create REPO_ID BRANCH` — Create a new branch for a repo on the Hub. `[--revision TEXT --type CHOICE --exist-ok]`
130
+ - `hf repos branch delete REPO_ID BRANCH` — Delete a branch from a repo on the Hub. `[--type CHOICE]`
131
+ - `hf repos create REPO_ID` — Create a new repo on the Hub. `[--type CHOICE --space-sdk TEXT --private --exist-ok --resource-group-id TEXT]`
132
+ - `hf repos delete REPO_ID` — Delete a repo from the Hub. This is an irreversible operation. `[--type CHOICE --missing-ok]`
133
+ - `hf repos delete-files REPO_ID PATTERNS` — Delete files from a repo on the Hub. `[--type CHOICE --revision TEXT --commit-message TEXT --commit-description TEXT --create-pr]`
134
+ - `hf repos duplicate FROM_ID` — Duplicate a repo on the Hub (model, dataset, or Space). `[--type CHOICE --private --exist-ok]`
135
+ - `hf repos move FROM_ID TO_ID` — Move a repository from a namespace to another namespace. `[--type CHOICE]`
136
+ - `hf repos settings REPO_ID` — Update the settings of a repository. `[--gated CHOICE --private --type CHOICE]`
137
+ - `hf repos tag create REPO_ID TAG` — Create a tag for a repo. `[--message TEXT --revision TEXT --type CHOICE]`
138
+ - `hf repos tag delete REPO_ID TAG` — Delete a tag for a repo. `[--yes --type CHOICE]`
139
+ - `hf repos tag list REPO_ID` — List tags for a repo. `[--type CHOICE]`
140
+
141
+ ### `hf skills` — Manage skills for AI assistants.
142
+
143
+ - `hf skills add` — Download a skill and install it for an AI assistant. `[--claude --codex --cursor --opencode --global --dest PATH --force]`
144
+ - `hf skills preview` — Print the generated SKILL.md to stdout.
145
+
146
+ ### `hf spaces` — Interact with spaces on the Hub.
147
+
148
+ - `hf spaces dev-mode SPACE_ID` — Enable or disable dev mode on a Space. `[--stop]`
149
+ - `hf spaces hot-reload SPACE_ID` — Hot-reload any Python file of a Space without a full rebuild + restart. `[--local-file TEXT --skip-checks --skip-summary]`
150
+ - `hf spaces info SPACE_ID` — Get info about a space on the Hub. Output is in JSON format. `[--revision TEXT --expand TEXT]`
151
+ - `hf spaces list` — List spaces on the Hub. `[--search TEXT --author TEXT --filter TEXT --sort CHOICE --limit INTEGER --expand TEXT --format CHOICE --quiet]`
152
+
153
+ ### `hf webhooks` — Manage webhooks on the Hub.
154
+
155
+ - `hf webhooks create --watch TEXT` — Create a new webhook. `[--url TEXT --job-id TEXT --domain CHOICE --secret TEXT]`
156
+ - `hf webhooks delete WEBHOOK_ID` — Delete a webhook permanently. `[--yes]`
157
+ - `hf webhooks disable WEBHOOK_ID` — Disable an active webhook.
158
+ - `hf webhooks enable WEBHOOK_ID` — Enable a disabled webhook.
159
+ - `hf webhooks info WEBHOOK_ID` — Show full details for a single webhook as JSON.
160
+ - `hf webhooks list` — List all webhooks for the current user. `[--format CHOICE --quiet]`
161
+ - `hf webhooks update WEBHOOK_ID` — Update an existing webhook. Only provided options are changed. `[--url TEXT --watch TEXT --domain CHOICE --secret TEXT]`
162
+
163
+ ## Common options
164
+
165
+ - `--format` — Output format: `--format json` (or `--json`) or `--format table` (default).
166
+ - `-q / --quiet` — Minimal output.
167
+ - `--revision` — Git revision id which can be a branch name, a tag, or a commit hash.
168
+ - `--token` — Use a User Access Token. Prefer setting `HF_TOKEN` env var instead of passing `--token`.
169
+ - `--type` — The type of repository (model, dataset, or space).
170
+
171
+ ## Tips
172
+
173
+ - Use `hf <command> --help` for full options, descriptions, usage, and real-world examples
174
+ - Authenticate with `HF_TOKEN` env var (recommended) or with `--token`