# huggingface/skills architecture

> Architecture diagram of the GitHub repository huggingface/skills, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/huggingface/skills
- Repository: https://github.com/huggingface/skills

## Overview

Hugging Face Skills is a collection of installable, self-contained AI/ML workflow instructions and scripts for agents. The main user-to-result path is an agent selecting a task skill, following its instructions, and running its scripts or connecting to the relevant Hugging Face or cloud service. The sampled runtime includes SageMaker deployment modes, model-training and evaluation examples, paper management, and two dataset-backed leaderboard apps. Many README-listed skills have no implementation excerpts here, so their internal flows are not expanded.

Main entry points: [`skills/hf-cloud-sagemaker-production-defaults/scripts/deploy_async.py`](https://github.com/huggingface/skills/blob/main/skills/hf-cloud-sagemaker-production-defaults/scripts/deploy_async.py) (Async endpoint), [`skills/hf-cloud-sagemaker-production-defaults/scripts/deploy_ic.py`](https://github.com/huggingface/skills/blob/main/skills/hf-cloud-sagemaker-production-defaults/scripts/deploy_ic.py) (Scale-to-zero endpoint), [`skills/hf-cloud-sagemaker-production-defaults/scripts/deploy.py`](https://github.com/huggingface/skills/blob/main/skills/hf-cloud-sagemaker-production-defaults/scripts/deploy.py) (Real-time endpoint), [`skills/hf-cloud-sagemaker-production-defaults/scripts/_common.py`](https://github.com/huggingface/skills/blob/main/skills/hf-cloud-sagemaker-production-defaults/scripts/_common.py) (Shared deployment helpers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cloud["Cloud deployment"]
  node_asyncdeploy["Async endpoint<br/>[deploy_async.py]"]
  node_icdeploy["Scale-to-zero endpoint<br/>[deploy_ic.py]"]
  node_realtimedeploy["Real-time endpoint<br/>[deploy.py]"]
  node_deploycommon["Shared deployment helpers<br/>[_common.py]"]
  node_envsetup["Python environment setup<br/>[setup_env.py]"]
  node_iam["IAM role preflight<br/>[create_role.py]"]
end

subgraph group_ml["Model workflows"]
  node_llmtrain["LLM training examples"]
  node_visiontrain["Vision training"]
  node_sentenceembeddings["Sentence-transformer training"]
  node_evaltools["Community evaluation<br/>[inspect_eval_uv.py]"]
end

subgraph group_hub["Hub utilities"]
  node_paper["Paper management<br/>[paper_manager.py]"]
  node_toolapi["Hub API examples<br/>[baseline_hf_api.py]"]
end

subgraph group_boards["Leaderboards"]
  node_evalcollector["Evaluation collector<br/>[collect_evals.py]"]
  node_evalapp["Evaluation leaderboard<br/>[app.py]"]
  node_hackcollector["Engagement collector<br/>[collect_points.py]"]
  node_hackapp["Hackers leaderboard<br/>[app.py]"]
end

node_agent(("AI agent / user"))
node_aws[("AWS services")]
node_hf[("Hugging Face Hub")]
node_evaldata[("Evaluation dataset")]
node_hackdata[("Engagement dataset")]

node_agent -->|"runs"| node_asyncdeploy
node_agent -->|"runs"| node_icdeploy
node_agent -->|"runs"| node_realtimedeploy
node_asyncdeploy -->|"uses helpers"| node_deploycommon
node_icdeploy -->|"uses helpers"| node_deploycommon
node_realtimedeploy -->|"uses helpers"| node_deploycommon
node_asyncdeploy -->|"creates resources"| node_aws
node_icdeploy -->|"creates resources"| node_aws
node_realtimedeploy -->|"creates resources"| node_aws
node_agent -->|"runs"| node_envsetup
node_agent -->|"runs"| node_iam
node_agent -->|"runs"| node_llmtrain
node_agent -->|"runs"| node_visiontrain
node_agent -->|"runs"| node_sentenceembeddings
node_agent -->|"runs"| node_evaltools
node_agent -->|"runs"| node_paper
node_paper -->|"manages papers"| node_hf
node_agent -->|"runs"| node_toolapi
node_toolapi -->|"queries models"| node_hf
node_evalcollector -->|"writes scores"| node_evaldata
node_evalapp -->|"reads rows"| node_evaldata
node_hackcollector -->|"writes points"| node_hackdata
node_hackapp -->|"reads rows"| node_hackdata

click node_asyncdeploy "https://github.com/huggingface/skills/blob/main/skills/hf-cloud-sagemaker-production-defaults/scripts/deploy_async.py"
click node_icdeploy "https://github.com/huggingface/skills/blob/main/skills/hf-cloud-sagemaker-production-defaults/scripts/deploy_ic.py"
click node_realtimedeploy "https://github.com/huggingface/skills/blob/main/skills/hf-cloud-sagemaker-production-defaults/scripts/deploy.py"
click node_deploycommon "https://github.com/huggingface/skills/blob/main/skills/hf-cloud-sagemaker-production-defaults/scripts/_common.py"
click node_envsetup "https://github.com/huggingface/skills/blob/main/skills/hf-cloud-python-env-setup/scripts/setup_env.py"
click node_iam "https://github.com/huggingface/skills/blob/main/skills/hf-cloud-sagemaker-iam-preflight/scripts/create_role.py"
click node_llmtrain "https://github.com/huggingface/skills/blob/main/skills/huggingface-llm-trainer/scripts/unsloth_sft_example.py"
click node_visiontrain "https://github.com/huggingface/skills/blob/main/skills/huggingface-vision-trainer/scripts/image_classification_training.py"
click node_sentenceembeddings "https://github.com/huggingface/skills/blob/main/skills/train-sentence-transformers/scripts/train_cross_encoder_listwise_example.py"
click node_evaltools "https://github.com/huggingface/skills/blob/main/skills/huggingface-community-evals/scripts/inspect_eval_uv.py"
click node_paper "https://github.com/huggingface/skills/blob/main/skills/huggingface-paper-publisher/scripts/paper_manager.py"
click node_toolapi "https://github.com/huggingface/skills/blob/main/skills/huggingface-tool-builder/references/baseline_hf_api.py"
click node_evalcollector "https://github.com/huggingface/skills/blob/main/apps/evals-leaderboard/collect_evals.py"
click node_evalapp "https://github.com/huggingface/skills/blob/main/apps/evals-leaderboard/app.py"
click node_hackcollector "https://github.com/huggingface/skills/blob/main/apps/hackers-leaderboard/collect_points.py"
click node_hackapp "https://github.com/huggingface/skills/blob/main/apps/hackers-leaderboard/app.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_asyncdeploy,node_icdeploy,node_realtimedeploy,node_deploycommon,node_envsetup,node_iam,node_agent toneBlue
class node_llmtrain,node_visiontrain,node_sentenceembeddings,node_evaltools,node_aws,node_hf,node_evaldata,node_hackdata toneAmber
class node_paper,node_toolapi toneMint
class node_evalcollector,node_evalapp,node_hackcollector,node_hackapp toneRose
```

## Components

### Cloud deployment

- [Async endpoint](https://github.com/huggingface/skills/blob/main/skills/hf-cloud-sagemaker-production-defaults/scripts/deploy_async.py): `skills/hf-cloud-sagemaker-production-defaults/scripts/deploy_async.py`
- [Scale-to-zero endpoint](https://github.com/huggingface/skills/blob/main/skills/hf-cloud-sagemaker-production-defaults/scripts/deploy_ic.py): `skills/hf-cloud-sagemaker-production-defaults/scripts/deploy_ic.py`
- [Real-time endpoint](https://github.com/huggingface/skills/blob/main/skills/hf-cloud-sagemaker-production-defaults/scripts/deploy.py): `skills/hf-cloud-sagemaker-production-defaults/scripts/deploy.py`
- [Shared deployment helpers](https://github.com/huggingface/skills/blob/main/skills/hf-cloud-sagemaker-production-defaults/scripts/_common.py): `skills/hf-cloud-sagemaker-production-defaults/scripts/_common.py`
- [Python environment setup](https://github.com/huggingface/skills/blob/main/skills/hf-cloud-python-env-setup/scripts/setup_env.py): `skills/hf-cloud-python-env-setup/scripts/setup_env.py`
- [IAM role preflight](https://github.com/huggingface/skills/blob/main/skills/hf-cloud-sagemaker-iam-preflight/scripts/create_role.py): `skills/hf-cloud-sagemaker-iam-preflight/scripts/create_role.py`

### Model workflows

- [LLM training examples](https://github.com/huggingface/skills/blob/main/skills/huggingface-llm-trainer/scripts/unsloth_sft_example.py): `skills/huggingface-llm-trainer/scripts/unsloth_sft_example.py`
- [Vision training](https://github.com/huggingface/skills/blob/main/skills/huggingface-vision-trainer/scripts/image_classification_training.py): `skills/huggingface-vision-trainer/scripts/image_classification_training.py`
- [Sentence-transformer training](https://github.com/huggingface/skills/blob/main/skills/train-sentence-transformers/scripts/train_cross_encoder_listwise_example.py): `skills/train-sentence-transformers/scripts/train_cross_encoder_listwise_example.py`
- [Community evaluation](https://github.com/huggingface/skills/blob/main/skills/huggingface-community-evals/scripts/inspect_eval_uv.py): `skills/huggingface-community-evals/scripts/inspect_eval_uv.py`

### Hub utilities

- [Paper management](https://github.com/huggingface/skills/blob/main/skills/huggingface-paper-publisher/scripts/paper_manager.py): `skills/huggingface-paper-publisher/scripts/paper_manager.py`
- [Hub API examples](https://github.com/huggingface/skills/blob/main/skills/huggingface-tool-builder/references/baseline_hf_api.py): `skills/huggingface-tool-builder/references/baseline_hf_api.py`

### Leaderboards

- [Evaluation collector](https://github.com/huggingface/skills/blob/main/apps/evals-leaderboard/collect_evals.py): `apps/evals-leaderboard/collect_evals.py`
- [Evaluation leaderboard](https://github.com/huggingface/skills/blob/main/apps/evals-leaderboard/app.py): `apps/evals-leaderboard/app.py`
- [Engagement collector](https://github.com/huggingface/skills/blob/main/apps/hackers-leaderboard/collect_points.py): `apps/hackers-leaderboard/collect_points.py`
- [Hackers leaderboard](https://github.com/huggingface/skills/blob/main/apps/hackers-leaderboard/app.py): `apps/hackers-leaderboard/app.py`

### Other components

- **AI agent / user**
- **AWS services**
- **Hugging Face Hub**
- **Evaluation dataset**
- **Engagement dataset**

## Connections

- AI agent / user → Async endpoint: runs (evidence: `skills/hf-cloud-sagemaker-production-defaults/scripts/deploy_async.py`)
- AI agent / user → Scale-to-zero endpoint: runs (evidence: `skills/hf-cloud-sagemaker-production-defaults/scripts/deploy_ic.py`)
- AI agent / user → Real-time endpoint: runs (evidence: `skills/hf-cloud-sagemaker-production-defaults/scripts/deploy.py`)
- Async endpoint → Shared deployment helpers: uses helpers (evidence: `skills/hf-cloud-sagemaker-production-defaults/scripts/deploy_async.py`)
- Scale-to-zero endpoint → Shared deployment helpers: uses helpers (evidence: `skills/hf-cloud-sagemaker-production-defaults/scripts/deploy_ic.py`)
- Real-time endpoint → Shared deployment helpers: uses helpers (evidence: `skills/hf-cloud-sagemaker-production-defaults/scripts/deploy.py`)
- Async endpoint → AWS services: creates resources (evidence: `skills/hf-cloud-sagemaker-production-defaults/scripts/deploy_async.py`)
- Scale-to-zero endpoint → AWS services: creates resources (evidence: `skills/hf-cloud-sagemaker-production-defaults/scripts/deploy_ic.py`)
- Real-time endpoint → AWS services: creates resources (evidence: `skills/hf-cloud-sagemaker-production-defaults/scripts/deploy.py`)
- AI agent / user → Python environment setup: runs (evidence: `skills/hf-cloud-python-env-setup/scripts/setup_env.py`)
- AI agent / user → IAM role preflight: runs (evidence: `skills/hf-cloud-sagemaker-iam-preflight/scripts/create_role.py`)
- AI agent / user → LLM training examples: runs (evidence: `skills/huggingface-llm-trainer/scripts/unsloth_sft_example.py`)
- AI agent / user → Vision training: runs (evidence: `skills/huggingface-vision-trainer/scripts/image_classification_training.py`)
- AI agent / user → Sentence-transformer training: runs (evidence: `skills/train-sentence-transformers/scripts/train_cross_encoder_listwise_example.py`)
- AI agent / user → Community evaluation: runs (evidence: `skills/huggingface-community-evals/scripts/inspect_eval_uv.py`)
- AI agent / user → Paper management: runs (evidence: `skills/huggingface-paper-publisher/scripts/paper_manager.py`)
- Paper management → Hugging Face Hub: manages papers (evidence: `skills/huggingface-paper-publisher/scripts/paper_manager.py`)
- AI agent / user → Hub API examples: runs (evidence: `skills/huggingface-tool-builder/references/baseline_hf_api.py`)
- Hub API examples → Hugging Face Hub: queries models (evidence: `skills/huggingface-tool-builder/references/baseline_hf_api.py`)
- Evaluation collector → Evaluation dataset: writes scores (evidence: `apps/evals-leaderboard/collect_evals.py`)
- Evaluation leaderboard → Evaluation dataset: reads rows (evidence: `apps/evals-leaderboard/app.py`)
- Engagement collector → Engagement dataset: writes points (evidence: `apps/hackers-leaderboard/collect_points.py`)
- Hackers leaderboard → Engagement dataset: reads rows (evidence: `apps/hackers-leaderboard/app.py`)
