hf-sync

hf-sync is a skill for Claude Code from shimo4228/claude-harness. It costs 125 tokens per session (1,249 once invoked), scanned A, original, MIT.

A synchronisation tool for copying a research repository's graph.jsonld knowledge graph to a Hugging Face dataset mirror. It converts the graph to graph.jsonl as part of the upload.

In plain words
What is it for?
Use it after releasing a repository, after changing its knowledge graph, or after rotating the Hugging Face access token.
Why use it?
It keeps the online dataset copy aligned with the graph in the local repository without requiring a new software release.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md.

Good fit Use it after releasing a repository, after changing its knowledge graph, or…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/shimo4228/claude-harness/hf-sync
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add shimo4228/claude-harness --skill hf-sync
Clone the repo
git clone --depth 1 https://github.com/shimo4228/claude-harness

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for hf-sync

README.md
[![agentmods](https://agentmods.dev/badge/skills/shimo4228/claude-harness/hf-sync.svg)](https://agentmods.dev/skills/shimo4228/claude-harness/hf-sync)
Your own site
<a href="https://agentmods.dev/skills/shimo4228/claude-harness/hf-sync"><img src="https://agentmods.dev/badge/skills/shimo4228/claude-harness/hf-sync.svg" alt="Measured on agentmods" height="20"></a>
Per session 125 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,249 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00125 $0.01249
Opus 5 $0.00063 $0.00624
Sonnet 5 $0.00025 $0.00250
Haiku 4.5 $0.00013 $0.00125

Measured today against content hash 106d2b2ccbb5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

hf-sync scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

The scan reads SKILL.md. This mod also ships 1 executable file (sync.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/hf-sync/SKILL.md · 75 lines

How it starts

The opening of the file, as written. The whole thing — 75 lines — stays where its author put it; the contents beside it link to each section on GitHub.

hf-sync — Local HF Dataset Mirror Sync

graph.jsonld を持つ research repo の HF dataset mirror を、手元から 1 コマンドで同期する skill。jsonld-knowledge-graph で encode した graph を HF Datasets 上の mirror に反映する operational layer。

When to use

  • release-doi の Phase 4 末尾、gh release create 後の HF mirror 反映
  • Graph に手を加えた直後の ad-hoc resync(release を切らずに HF だけ更新したい)
  • HF token を rotate した後の動作確認

When NOT to use

  • graph.jsonld を持たない repo(HF mirror が存在しない)
  • HF dataset 自体がまだ作成されていない project(先に hf repo create <Owner/dataset> --repo-type dataset で repo を作る)
  • HF clone dir ($HF_CLONE_BASE/<dataset>/) が存在しない(先に mkdir -p ~/MyAI_Lab/hf-datasets/<dataset> で staging dir を作る。HF 側の README.md と過去 snapshot がここに置かれる)
  • hf auth login していない / token が write scope を持たない(先に hf auth login で token を入れ直す)

Execution

bash ~/.claude/skills/hf-sync/sync.sh $ARGUMENTS

$ARGUMENTS は HF dataset の repo ID(例: Shimo4228/agent-knowledge-cycle)。

cwd 制約: graph.jsonld が存在する project root で実行する。

What it does

  1. cwd の graph.jsonld の structural sanity check(@graph が array で non-empty)
  2. Source の graph.jsonld を HF clone dir ($HF_CLONE_BASE/<dataset>/, default ~/MyAI_Lab/hf-datasets/<dataset>/) にコピー
  3. HF clone 側で jq -c '.["@graph"][]' graph.jsonld > graph.jsonl を生成(HF Dataset Viewer 用 1 node 1 行 flatten)
  4. hf upload <Owner/dataset> <hf-clone>/graph.jsonld graph.jsonld --repo-type dataset
  5. hf upload <Owner/dataset> <hf-clone>/graph.jsonl graph.jsonl --repo-type dataset
  6. Success log + HF URL を表示

Source repo は汚さない: graph.jsonl は HF clone 側でだけ生成・存在し、source の git tree には残らない。

Auth は ~/.cache/huggingface/tokenhf auth login で保存されたもの)を hf CLI が自動で読む。

Repo mapping

各 project の GitHub repo と HF dataset の対応は project ごとに違う。Skill 本体には embed しない(portability 保持)。Mapping は project の CLAUDE.md または同等の場所に記録しておき、起動時にコピペで引数に渡す。

shimo4228 系の現行 mapping は ~/MyAI_Lab/shimo4228/CLAUDE.md の "HF Datasets mirror" section を参照。

新規 project で記録を起こすときの format:

| GitHub repo | HF dataset |
|---|---|
| `owner/project-a` | `Owner/project-a` |
| `owner/hub` | `Owner/research-program-hub` |

Read the full file on GitHub · 75 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today Changed 106d2b2ccbb5
  2. yesterday Changed 1eb022971f05
  3. 6d ago First seen · 75 lines · 125 tokens per session scan A 9b6c6d794f57

Subscribe to this mod's changes

hf-sync is a skill published in the GitHub repository shimo4228/claude-harness (2 stars, last pushed yesterday), licensed MIT. It adds 125 tokens to every session and 1,249 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

agent-adoption-triage

Five-question triage for routing AI work to the right architecture — script, algorithmic search, LLM workflow, or autonomous agentic loop — before any agent is built. Use when someone says "let's build an agent for X", when deciding whether a use case actually needs an autonomous agent, when reviewing an agent…

shimo4228/agent-adoption-triage · 143 tokens

job-description-skill

A job-description analysis skill that turns a vacancy listing and a candidate’s background into an HTML report about fit, gaps, interview topics, and application strategy.

yanliudesign/offer-toolkit-skill · 150 tokens

offer-compare-skill

A decision assistant for comparing two or more job offers across pay, growth, company strength, team risk, promotion, AI exposure, and lifestyle. Total compensation means the combined value of salary, bonuses, shares, and sign-on payments.

yanliudesign/offer-toolkit-skill · 231 tokens

offer-toolkit-skill

A set of job-search tools covering the path from finding a vacancy to accepting an offer. It includes separate tools for job searches, job-description analysis, tailored resumes, behavioral interviews, offer comparisons, and salary negotiation.

yanliudesign/offer-toolkit-skill · 168 tokens

linkedin-job-search-skill

A job-search assistant that uses a sample job description and your resume to find and rank similar public LinkedIn Jobs listings. LinkedIn Jobs is LinkedIn’s section for advertised employment positions.

yanliudesign/offer-toolkit-skill · 136 tokens

bq-skill

A coaching workflow for building a reusable library of truthful stories for behavioral job interviews. It uses structures such as STAR—Situation, Task, Action, Result—and can connect stories to a job description and résumé.

yanliudesign/offer-toolkit-skill · 166 tokens