Hugging Face 代理技能
HuggingFace Agent Skills

原始链接: https://github.com/huggingface/skills

## Hugging Face Skills:AI 代理工具总结 Hugging Face Skills 是预封装的指令、脚本和资源,旨在增强 AI/ML 编码代理,如 OpenAI Codex、Anthropic 的 Claude、Google 的 Gemini 和 Cursor。它们简化了数据集创建、模型训练、评估和论文发表等任务。 Skills 遵循标准化的格式(Agent Skill 格式),使用诸如 `SKILL.md`(用于 Claude)或 `AGENTS.md`/`gemini-extension.json`(用于其他代理)的文件来定义指令。安装很简单,通过插件命令即可实现——例如 `/plugin install hugging-face-cli@huggingface/skills`。 该仓库提供了一些入门 skills(例如 `hugging-face-cli`、`hugging-face-datasets`),并鼓励贡献。用户只需在向代理的指令中提及 skill 即可激活它(“使用 HF 模型评估 skill…”)。 贡献包括复制现有的 skill,更新其 `SKILL.md` 文件,并重新生成元数据。该项目维护着技术描述(用于代理激活)和人类可读的描述,用于插件市场。

## Hugging Face Agent 技能讨论 最近的 Hacker News 讨论集中在名为“SKILL.md”的新标准上,该标准用于定义 AI Agent(如 Claude、Codex 和 Gemini)中的工具使用。该标准使用类似 README 的格式来描述技能的功能。 用户强调了两个关键的改进领域:**技能组合/依赖关系**和**版本控制**。目前,技能通常会重复检查并安装所需的库。技能定义中的 `requires:` 块可以解决这个问题。此外,没有内置方法可以固定特定版本的技能,更新可能会破坏工作流程。 讨论的解决方案包括利用 YAML 结构来管理依赖关系,创建“skills.lock”文件,以及使用完全自包含的环境,如 `uvx`。Anthropic 已经在 [agentskills.io](https://agentskills.io/) 上正式发布了该标准,但一些用户指出对于 `AGENTS.md` 格式的反馈接受度有限。
相关文章

原文

Hugging Face Skills are definitions for AI/ML tasks like dataset creation, model training, and evaluation. They are interoperable with all major coding agent tools like OpenAI Codex, Anthropic's Claude Code, Google DeepMind's Gemini CLI, and Cursor.

The Skills in this repository follow the standardized format Agent Skill format.

In practice, skills are self-contained folders that package instructions, scripts, and resources together for an AI agent to use on a specific use case. Each folder includes a SKILL.md file with YAML frontmatter (name and description) followed by the guidance your coding agent follows while the skill is active.

Note

'Skills' is actually an Anthropic term used within Claude AI and Claude Code and not adopted by other agent tools, but we love it! OpenAI Codex uses an AGENTS.md file to define the instructions for your coding agent. Google Gemini uses 'extensions' to define the instructions for your coding agent in a gemini-extension.json file. This repo is compatible with all of them, and more!

Tip

If your agent doesn't support skills, you can use agents/AGENTS.md directly as a fallback.

Hugging Face skills are compatible with Claude Code, Codex, Gemini CLI, and Cursor.

  1. Register the repository as a plugin marketplace:
/plugin marketplace add huggingface/skills
  1. To install a skill, run:
/plugin install <skill-name>@huggingface/skills

For example:

/plugin install hugging-face-cli@huggingface/skills
  1. Codex will identify the skills via the AGENTS.md file. You can verify the instructions are loaded with:
codex --ask-for-approval never "Summarize the current instructions."
  1. For more details, see the Codex AGENTS guide.
  1. This repo includes gemini-extension.json to integrate with the Gemini CLI.

  2. Install locally:

gemini extensions install . --consent

or use the GitHub URL:

gemini extensions install https://github.com/huggingface/skills.git --consent
  1. See Gemini CLI extensions docs for more help.

This repository includes Cursor plugin manifests:

  • .cursor-plugin/plugin.json
  • .mcp.json (configured with the Hugging Face MCP server URL)

Install from repository URL (or local checkout) via the Cursor plugin flow.

For contributors, regenerate manifests with:

This repository contains a few skills to get you started. You can also contribute your own skills to the repository.

Name Description Documentation
hugging-face-cli Execute Hugging Face Hub operations using the hf CLI. Download models/datasets, upload files, manage repos, and run cloud compute jobs. SKILL.md
hugging-face-datasets Create and manage datasets on Hugging Face Hub. Supports initializing repos, defining configs/system prompts, streaming row updates, and SQL-based dataset querying/transformation. SKILL.md
hugging-face-evaluation Add and manage evaluation results in Hugging Face model cards. Supports extracting eval tables from README content, importing scores from Artificial Analysis API, and running custom evaluations with vLLM/lighteval. SKILL.md
hugging-face-jobs Run compute jobs on Hugging Face infrastructure. Execute Python scripts, manage scheduled jobs, and monitor job status. SKILL.md
hugging-face-model-trainer Train or fine-tune language models using TRL on Hugging Face Jobs infrastructure. Covers SFT, DPO, GRPO and reward modeling training methods, plus GGUF conversion for local deployment. Includes hardware selection, cost estimation, Trackio monitoring, and Hub persistence. SKILL.md
hugging-face-paper-publisher Publish and manage research papers on Hugging Face Hub. Supports creating paper pages, linking papers to models/datasets, claiming authorship, and generating professional markdown-based research articles. SKILL.md
hugging-face-tool-builder Build reusable scripts for Hugging Face API operations. Useful for chaining API calls or automating repeated tasks. SKILL.md
hugging-face-trackio Track and visualize ML training experiments with Trackio. Log metrics via Python API and retrieve them via CLI. Supports real-time dashboards synced to HF Spaces. SKILL.md

Using skills in your coding agent

Once a skill is installed, mention it directly while giving your coding agent instructions:

  • "Use the HF LLM trainer skill to estimate the GPU memory needed for a 70B model run."
  • "Use the HF model evaluation skill to launch run_eval_job.py on the latest checkpoint."
  • "Use the HF dataset creator skill to draft new few-shot classification templates."
  • "Use the HF paper publisher skill to index my arXiv paper and link it to my model."

Your coding agent automatically loads the corresponding SKILL.md instructions and helper scripts while it completes the task.

Contribute or customize a skill

  1. Copy one of the existing skill folders (for example, hf-datasets/) and rename it.
  2. Update the new folder's SKILL.md frontmatter:
    ---
    name: my-skill-name
    description: Describe what the skill does and when to use it
    ---
    
    # Skill Title
    Guidance + examples + guardrails
  3. Add or edit supporting scripts, templates, and documents referenced by your instructions.
  4. Add an entry to .claude-plugin/marketplace.json with a concise, human-readable description.
  5. Run: to regenerate and validate all generated metadata.
  6. Reinstall or reload the skill bundle in your coding agent so the updated folder is available.

The .claude-plugin/marketplace.json file lists skills with human-readable descriptions for the plugin marketplace. The CI validates that skill names and paths match between SKILL.md files and marketplace.json, but descriptions are maintained separately: SKILL.md descriptions guide when Claude activates the skill, while marketplace descriptions are written for humans browsing available skills.

  • Browse the latest instructions, scripts, and templates directly at huggingface/skills.
  • Review Hugging Face documentation for the specific libraries or workflows you reference inside each skill.
联系我们 contact @ memedata.com