skill-hub CLAUDE.md

Setup instructions for Skill Hub, a service that manages coding-agent skills, using Node.js and Cloudflare. They cover installing dependencies, authentication, database setup, deployment, sample data, and health checks.

In plain words
What is it for?
Use them to deploy Skill Hub, create or update its D1 database, apply migrations, create an administrator token, load sample skills, verify the service, and access its admin area.
Why use it?
They provide the exact setup sequence and explain which steps require the user's Cloudflare login or administrator details.

Instructions file

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.

agentmods
npx agentmods add instructions/elefant-coder/skill-hub/claude-md
Clone the repo
git clone --depth 1 https://github.com/elefant-coder/skill-hub
Per session 1,156 This file is loaded in full into every session.
When invoked 1,156 The same file — it is already loaded in full.
Security scan A 1 finding. Scan, not verified.
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 $0.01156 $0.01156
Opus 5 $0.00578 $0.00578
Sonnet 5 $0.00231 $0.00231
Haiku 4.5 $0.00116 $0.00116

Measured 2d ago against content hash db3b437904f5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

skill-hub CLAUDE.md scanned grade A with 1 finding 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 2d ago.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s https://<deployされたURL>/api/health
CLAUDE.md · 74 lines

How it starts

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

CLAUDE.md — Skill Hub セットアップ手順(Claude Code向け)

このリポジトリを渡されたら、以下の手順で自走してセットアップしてください。各ステップは冪等なので、途中で失敗しても最初からやり直して問題ありません。

前提確認

  • Node.js 20以上が入っているか確認する(node --version)。無ければ利用者に案内する。
  • このリポジトリの直下で作業する。

手順

  1. 依存関係をインストールする。

    npm ci
    
  2. Cloudflareへのログインを確認する。これは唯一の手作業(ブラウザでの認証)なので、必ず利用者に実行してもらう。

    npx wrangler whoami
    

    失敗したら、利用者に次を実行してもらってから再開する:

    npx wrangler login
    

    利用者が複数のCloudflareアカウントを持っている場合は、対象アカウントIDを聞いて CLOUDFLARE_ACCOUNT_ID 環境変数に設定してから進める。

  3. 利用者に管理者の表示名(例: 「田中(情シス)」)を確認してから、セットアップスクリプトを実行する。

    node scripts/setup.mjs --seed --admin-name "<確認した表示名>"
    

    これが以下を自動で行う(すべて冪等・状態確認型):

    • D1データベース skill-hub-db の作成/確認、wrangler.jsoncdatabase_id 書き換え
    • マイグレーション適用(未適用分のみ)
    • wrangler deploy によるデプロイ
    • 有効なadminトークンが0件の場合のみ、初期adminトークンを発行して1回だけ表示
    • skills-samples/ の3本のサンプルスキルを投入

    --admin-name を省略すると対話環境では質問され、非対話環境では「管理者」になる。

  4. 出力されたURLと初期adminトークンを利用者にそのまま伝える。adminトークンは二度と表示されないので、チャット上に貼るだけでなく「必ずご自身でも控えてください」と一言添える。

  5. 動作確認として、次を実行して200が返ることを確認する。

    curl -s https://<deployされたURL>/api/health
    
  6. 利用者に次のアクションを提示する:

    • 管理画面(https://<URL>/app)にadminトークンでログインし、自社のスキルを登録する
    • メンバーを招待リンク(管理画面 > トークン・招待)で招待する
    • 招待されたメンバーは /join?code=... を開き「トークンを発行する」ボタンを押して、表示された claude mcp add ... コマンドを自分のClaude Codeに貼る

トラブルシュート

  • wrangler d1 list --json が空を返す/権限エラー: Cloudflareアカウントの権限(D1編集権限)を確認する。
  • deployが失敗する: npx wrangler deploy を単体実行してエラーメッセージをそのまま利用者に見せる。Workers Paidプランへの加入が必要なケースがある。
  • 初期adminトークンを紛失した: wrangler d1 execute skill-hub-db --remote --command "SELECT id,name,revoked_at,expires_at FROM tokens WHERE role='admin'" で既存adminの状態を確認する。全て失効/期限切れなら scripts/setup.mjs を再実行すると新しいadminが自動発行される(bootstrapは「有効なadminが0件の時だけ」動く設計)。

開発者向け(コード変更時)

  • 型チェック: npm run typechecktsc --noEmit。0エラーが必須)
  • ローカルsmoke(出荷ゲート): npm run smokescripts/smoke.mjs。wrangler devを自前起動し12項目すべてPASSでexit 0)
  • ローカル動作確認: npm run devwrangler dev
  • サンプル投入(ローカル): node scripts/seed.mjs --local --base-url http://localhost:8787 --token <editor以上のトークン>

Read the full file on GitHub · 74 lines

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. 2d ago First seen · 74 lines · 1,156 tokens per session scan A db3b437904f5

Subscribe to this mod's changes

skill-hub CLAUDE.md is an instructions file published in the GitHub repository elefant-coder/skill-hub (0 stars, last pushed 14d ago), licensed MIT. It adds 1,156 tokens to every session, about $0.0058 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.