@bgicli/bgicli 2.2.7 → 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 (117) 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/data/workflows/survival-analysis-clinical/SKILL.md +348 -0
  113. package/data/workflows/survival-analysis-clinical/scripts/full_workflow.R +95 -0
  114. package/data/workflows/survival-analysis-clinical/scripts/load_example_data.R +65 -0
  115. package/data/workflows/survival-analysis-clinical/scripts/plot_forest.R +46 -0
  116. package/dist/bgi.js +1608 -233
  117. package/package.json +45 -45
@@ -0,0 +1,110 @@
1
+ ---
2
+ name: hugging-face-tool-builder
3
+ description: Use this skill when the user wants to build tool/scripts or achieve a task where using data from the Hugging Face API would help. This is especially useful when chaining or combining API calls or the task will be repeated/automated. This Skill creates a reusable script to fetch, enrich or process data.
4
+ ---
5
+
6
+ # Hugging Face API Tool Builder
7
+
8
+ Your purpose is now is to create reusable command line scripts and utilities for using the Hugging Face API, allowing chaining, piping and intermediate processing where helpful. You can access the API directly, as well as use the `hf` command line tool. Model and Dataset cards can be accessed from repositories directly.
9
+
10
+ ## Script Rules
11
+
12
+ Make sure to follow these rules:
13
+ - Scripts must take a `--help` command line argument to describe their inputs and outputs
14
+ - Non-destructive scripts should be tested before handing over to the User
15
+ - Shell scripts are preferred, but use Python or TSX if complexity or user need requires it.
16
+ - IMPORTANT: Use the `HF_TOKEN` environment variable as an Authorization header. For example: `curl -H "Authorization: Bearer ${HF_TOKEN}" https://huggingface.co/api/`. This provides higher rate limits and appropriate authorization for data access.
17
+ - Investigate the shape of the API results before commiting to a final design; make use of piping and chaining where composability would be an advantage - prefer simple solutions where possible.
18
+ - Share usage examples once complete.
19
+
20
+ Be sure to confirm User preferences where there are questions or clarifications needed.
21
+
22
+ ## Sample Scripts
23
+
24
+ Paths below are relative to this skill directory.
25
+
26
+ Reference examples:
27
+ - `references/hf_model_papers_auth.sh` — uses `HF_TOKEN` automatically and chains trending → model metadata → model card parsing with fallbacks; it demonstrates multi-step API usage plus auth hygiene for gated/private content.
28
+ - `references/find_models_by_paper.sh` — optional `HF_TOKEN` usage via `--token`, consistent authenticated search, and a retry path when arXiv-prefixed searches are too narrow; it shows resilient query strategy and clear user-facing help.
29
+ - `references/hf_model_card_frontmatter.sh` — uses the `hf` CLI to download model cards, extracts YAML frontmatter, and emits NDJSON summaries (license, pipeline tag, tags, gated prompt flag) for easy filtering.
30
+
31
+ Baseline examples (ultra-simple, minimal logic, raw JSON output with `HF_TOKEN` header):
32
+ - `references/baseline_hf_api.sh` — bash
33
+ - `references/baseline_hf_api.py` — python
34
+ - `references/baseline_hf_api.tsx` — typescript executable
35
+
36
+ Composable utility (stdin → NDJSON):
37
+ - `references/hf_enrich_models.sh` — reads model IDs from stdin, fetches metadata per ID, emits one JSON object per line for streaming pipelines.
38
+
39
+ Composability through piping (shell-friendly JSON output):
40
+ - `references/baseline_hf_api.sh 25 | jq -r '.[].id' | references/hf_enrich_models.sh | jq -s 'sort_by(.downloads) | reverse | .[:10]'`
41
+ - `references/baseline_hf_api.sh 50 | jq '[.[] | {id, downloads}] | sort_by(.downloads) | reverse | .[:10]'`
42
+ - `printf '%s\n' openai/gpt-oss-120b meta-llama/Meta-Llama-3.1-8B | references/hf_model_card_frontmatter.sh | jq -s 'map({id, license, has_extra_gated_prompt})'`
43
+
44
+ ## High Level Endpoints
45
+
46
+ The following are the main API endpoints available at `https://huggingface.co`
47
+
48
+ ```
49
+ /api/datasets
50
+ /api/models
51
+ /api/spaces
52
+ /api/collections
53
+ /api/daily_papers
54
+ /api/notifications
55
+ /api/settings
56
+ /api/whoami-v2
57
+ /api/trending
58
+ /oauth/userinfo
59
+ ```
60
+
61
+ ## Accessing the API
62
+
63
+ The API is documented with the OpenAPI standard at `https://huggingface.co/.well-known/openapi.json`.
64
+
65
+ **IMPORTANT:** DO NOT ATTEMPT to read `https://huggingface.co/.well-known/openapi.json` directly as it is too large to process.
66
+
67
+ **IMPORTANT** Use `jq` to query and extract relevant parts. For example,
68
+
69
+ Command to Get All 160 Endpoints
70
+
71
+ ```bash
72
+ curl -s "https://huggingface.co/.well-known/openapi.json" | jq '.paths | keys | sort'
73
+ ```
74
+
75
+ Model Search Endpoint Details
76
+
77
+ ```bash
78
+ curl -s "https://huggingface.co/.well-known/openapi.json" | jq '.paths["/api/models"]'
79
+ ```
80
+
81
+ You can also query endpoints to see the shape of the data. When doing so constrain results to low numbers to make them easy to process, yet representative.
82
+
83
+ ## Using the HF command line tool
84
+
85
+ The `hf` command line tool gives you further access to Hugging Face repository content and infrastructure.
86
+
87
+ ```bash
88
+ ❯ hf --help
89
+ Usage: hf [OPTIONS] COMMAND [ARGS]...
90
+
91
+ Hugging Face Hub CLI
92
+
93
+ Options:
94
+ --help Show this message and exit.
95
+
96
+ Commands:
97
+ auth Manage authentication (login, logout, etc.).
98
+ cache Manage local cache directory.
99
+ download Download files from the Hub.
100
+ endpoints Manage Hugging Face Inference Endpoints.
101
+ env Print information about the environment.
102
+ jobs Run and manage Jobs on the Hub.
103
+ repo Manage repos on the Hub.
104
+ repo-files Manage files in a repo on the Hub.
105
+ upload Upload a file or a folder to the Hub.
106
+ upload-large-folder Upload a large folder to the Hub.
107
+ version Print information about the hf version.
108
+ ```
109
+
110
+ The `hf` CLI command has replaced the now deprecated `huggingface_hub` CLI command.
@@ -0,0 +1,115 @@
1
+ ---
2
+ name: hugging-face-trackio
3
+ description: Track and visualize ML training experiments with Trackio. Use when logging metrics during training (Python API), firing alerts for training diagnostics, or retrieving/analyzing logged metrics (CLI). Supports real-time dashboard visualization, alerts with webhooks, HF Space syncing, and JSON output for automation.
4
+ ---
5
+
6
+ # Trackio - Experiment Tracking for ML Training
7
+
8
+ Trackio is an experiment tracking library for logging and visualizing ML training metrics. It syncs to Hugging Face Spaces for real-time monitoring dashboards.
9
+
10
+ ## Three Interfaces
11
+
12
+ | Task | Interface | Reference |
13
+ |------|-----------|-----------|
14
+ | **Logging metrics** during training | Python API | [references/logging_metrics.md](references/logging_metrics.md) |
15
+ | **Firing alerts** for training diagnostics | Python API | [references/alerts.md](references/alerts.md) |
16
+ | **Retrieving metrics & alerts** after/during training | CLI | [references/retrieving_metrics.md](references/retrieving_metrics.md) |
17
+
18
+ ## When to Use Each
19
+
20
+ ### Python API → Logging
21
+
22
+ Use `import trackio` in your training scripts to log metrics:
23
+
24
+ - Initialize tracking with `trackio.init()`
25
+ - Log metrics with `trackio.log()` or use TRL's `report_to="trackio"`
26
+ - Finalize with `trackio.finish()`
27
+
28
+ **Key concept**: For remote/cloud training, pass `space_id` — metrics sync to a Space dashboard so they persist after the instance terminates.
29
+
30
+ → See [references/logging_metrics.md](references/logging_metrics.md) for setup, TRL integration, and configuration options.
31
+
32
+ ### Python API → Alerts
33
+
34
+ Insert `trackio.alert()` calls in training code to flag important events — like inserting print statements for debugging, but structured and queryable:
35
+
36
+ - `trackio.alert(title="...", level=trackio.AlertLevel.WARN)` — fire an alert
37
+ - Three severity levels: `INFO`, `WARN`, `ERROR`
38
+ - Alerts are printed to terminal, stored in the database, shown in the dashboard, and optionally sent to webhooks (Slack/Discord)
39
+
40
+ **Key concept for LLM agents**: Alerts are the primary mechanism for autonomous experiment iteration. An agent should insert alerts into training code for diagnostic conditions (loss spikes, NaN gradients, low accuracy, training stalls). Since alerts are printed to the terminal, an agent that is watching the training script's output will see them automatically. For background or detached runs, the agent can poll via CLI instead.
41
+
42
+ → See [references/alerts.md](references/alerts.md) for the full alerts API, webhook setup, and autonomous agent workflows.
43
+
44
+ ### CLI → Retrieving
45
+
46
+ Use the `trackio` command to query logged metrics and alerts:
47
+
48
+ - `trackio list projects/runs/metrics` — discover what's available
49
+ - `trackio get project/run/metric` — retrieve summaries and values
50
+ - `trackio list alerts --project <name> --json` — retrieve alerts
51
+ - `trackio show` — launch the dashboard
52
+ - `trackio sync` — sync to HF Space
53
+
54
+ **Key concept**: Add `--json` for programmatic output suitable for automation and LLM agents.
55
+
56
+ → See [references/retrieving_metrics.md](references/retrieving_metrics.md) for all commands, workflows, and JSON output formats.
57
+
58
+ ## Minimal Logging Setup
59
+
60
+ ```python
61
+ import trackio
62
+
63
+ trackio.init(project="my-project", space_id="username/trackio")
64
+ trackio.log({"loss": 0.1, "accuracy": 0.9})
65
+ trackio.log({"loss": 0.09, "accuracy": 0.91})
66
+ trackio.finish()
67
+ ```
68
+
69
+ ### Minimal Retrieval
70
+
71
+ ```bash
72
+ trackio list projects --json
73
+ trackio get metric --project my-project --run my-run --metric loss --json
74
+ ```
75
+
76
+ ## Autonomous ML Experiment Workflow
77
+
78
+ When running experiments autonomously as an LLM agent, the recommended workflow is:
79
+
80
+ 1. **Set up training with alerts** — insert `trackio.alert()` calls for diagnostic conditions
81
+ 2. **Launch training** — run the script in the background
82
+ 3. **Poll for alerts** — use `trackio list alerts --project <name> --json --since <timestamp>` to check for new alerts
83
+ 4. **Read metrics** — use `trackio get metric ...` to inspect specific values
84
+ 5. **Iterate** — based on alerts and metrics, stop the run, adjust hyperparameters, and launch a new run
85
+
86
+ ```python
87
+ import trackio
88
+
89
+ trackio.init(project="my-project", config={"lr": 1e-4})
90
+
91
+ for step in range(num_steps):
92
+ loss = train_step()
93
+ trackio.log({"loss": loss, "step": step})
94
+
95
+ if step > 100 and loss > 5.0:
96
+ trackio.alert(
97
+ title="Loss divergence",
98
+ text=f"Loss {loss:.4f} still high after {step} steps",
99
+ level=trackio.AlertLevel.ERROR,
100
+ )
101
+ if step > 0 and abs(loss) < 1e-8:
102
+ trackio.alert(
103
+ title="Vanishing loss",
104
+ text="Loss near zero — possible gradient collapse",
105
+ level=trackio.AlertLevel.WARN,
106
+ )
107
+
108
+ trackio.finish()
109
+ ```
110
+
111
+ Then poll from a separate terminal/process:
112
+
113
+ ```bash
114
+ trackio list alerts --project my-project --json --since "2025-01-01T00:00:00"
115
+ ```