本文へ移動
cccskills
無料GitHub で公開

skills-x

Guide for contributing new skills to the skills-x collection. This skill should be used when users want to add new open-source skills from external sources (like agentskills.io or anthropics/skills) to the skills-x repository. It covers the complete workflow from discovery to publishing.

インストール方法を見る

含まれるファイル(3)

  • SKILL.md19.7 KB
  • LICENSE.txt1.0 KB
  • README.md769 B

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Skills-X Contribution Guide

This skill provides a standardized workflow for contributing new skills to the skills-x collection.

When to Use This Skill

  • Adding new community skills from external sources (agentskills.io, anthropics/skills, etc.)
  • Creating x original self-developed skills (自研)
  • Updating existing skills with new versions
  • Validating skill format compliance before submission
  • After creating a new skill, ask whether to generate a README (background summary)

⚡ Core Principle: No Binary Rebuild Needed for Skills

Adding or updating skills NEVER requires rebuilding or republishing the skills-x binary.

The skills-x tool uses a registry-first architecture:

  • The binary only contains the registry index (skill metadata)
  • Actual skill content is fetched from GitHub at install time
  • The registry is cached locally at ~/.config/skills-x/registry.yaml

This means:

  • ✅ Add a self-developed skill → push to git → done
  • ✅ Add a third-party skill → push to git → done
  • ✅ Users get new skills by running skills-x registry update
  • ❌ No version bump, no binary build, no npm publish needed

The only time a full release is needed is when Go source code or CLI behavior changes.


Project Structure Overview

skills-x/
├── pkg/registry/        # Skill registry definition
│   └── registry.yaml    # Central index of ALL skills (self-developed + third-party)
├── skills/              # Self-developed skills (自研) source code
│   └── skills-x/        # This contribution skill
├── cmd/skills-x/        # Go source code
│   ├── command/         # CLI commands (list, init, registry)
│   └── i18n/
│       └── locales/     # Language files (zh.yaml, en.yaml)
├── npm/                 # npm package
│   └── package.json     # Version number here
└── Makefile             # Build commands

Architecture summary:

  • pkg/registry/registry.yaml — single source of truth for all skills
  • skills/<name>/ — self-developed skill content (committed to this repo)
  • Third-party skills — content lives in external repos, only metadata in registry.yaml

⚠️ Internationalization (i18n) Rules - CRITICAL

skills-x supports bilingual (Chinese/English) output. Follow these rules strictly:

Rule 1: NO Mixing Languages in a Single String

❌ FORBIDDEN - Never mix Chinese and English in the same string:

// BAD: Mixed languages
desc = "🔄 套娃! Contribution guide (not for regular use)"
tag = "⭐ 作者自研 Original"

✅ CORRECT - Use separate i18n keys:

// GOOD: Use i18n.T() to get localized string
desc = i18n.T("list_skillsx_desc")
tag = i18n.T("list_castlex_tag")

Rule 2: All User-Facing Strings Must Use i18n

Any text displayed to users MUST go through the i18n system:

  1. Add keys to both language files:

cmd/skills-x/i18n/locales/zh.yaml:

my_message: "这是中文消息"

cmd/skills-x/i18n/locales/en.yaml:

my_message: "This is English message"
  1. Use in Go code:
import "github.com/castle-x/skills-x/cmd/skills-x/i18n"

// Simple string
msg := i18n.T("my_message")

// With format arguments
msg := i18n.Tf("my_format_msg", arg1, arg2)

Rule 3: i18n Key Naming Convention

TypeKey PrefixExample
Category namescat_cat_creative, cat_document
Skill descriptionsskill_skill_pdf, skill_docx
Command descriptionscmd_cmd_list_short
List outputlist_list_header, list_total
Init outputinit_init_success
Error messageserr_err_skill_not_found

Rule 4: Adding New Skill Descriptions

For installable skills, descriptions should be defined in pkg/registry/registry.yaml:

- name: new-skill
  path: skills/new-skill
  description: "Brief English description"
  description_zh: "简短的中文描述"

Only add i18n keys when introducing new CLI/TUI message keys.

Rule 5: Testing Bilingual Output

Always test BOTH languages after any UI changes:

# Test Chinese
SKILLS_LANG=zh ./bin/skills-x list

# Test English  
SKILLS_LANG=en ./bin/skills-x list

Rule 6: Environment Variable Priority

Language is detected in this order:

  1. SKILLS_LANG (highest priority, skills-x specific)
  2. LANG (system locale)
  3. LC_ALL (system locale)
  4. Default: zh (Chinese)

Skill Directory Structure Requirements

All skills MUST follow the Agent Skills specification:

skill-name/
├── SKILL.md          # Required: Instructions + metadata
├── LICENSE.txt       # Required: License file
├── scripts/          # Optional: Executable code
├── references/       # Optional: Documentation
└── assets/           # Optional: Templates, resources

SKILL.md Format Requirements

The SKILL.md file MUST contain YAML frontmatter with required fields:

---
name: skill-name        # Required: lowercase, hyphens only, max 64 chars
description: ...        # Required: max 1024 chars, describe what and when
license: MIT            # Optional: license identifier
metadata:               # Optional: additional metadata
  author: example
  version: "1.0"
---

Name Field Rules

  • Length: 1-64 characters
  • Characters: lowercase letters, numbers, hyphens only
  • Must NOT start or end with hyphen
  • Must NOT contain consecutive hyphens (--)
  • Must match parent directory name

Valid: pdf-processing, data-analysis, code-review Invalid: PDF-Processing, -pdf, pdf--processing

Description Field Rules

  • Length: 1-1024 characters
  • Should clearly describe what the skill does AND when to use it
  • Include keywords that help AI agents identify relevant tasks

User Guide: Keeping Skills Up-to-Date

The registry update Command

skills-x registry update

This command downloads the latest registry.yaml from GitHub and caches it locally at ~/.config/skills-x/registry.yaml.

When to run it:

  • After any skill has been added/updated and pushed to GitHub
  • To see newly contributed skills before upgrading the binary
  • Anytime skills-x list doesn't show a skill you expect

How the cache works:

StateWhat list / init sees
No cacheRegistry embedded in the binary (older)
Cache presentCached registry from GitHub (newer)
After registry updateLatest registry from GitHub

⚠️ Important for local development: After pushing new skills to GitHub, you MUST run skills-x registry update before skills-x list will show the new skill. The locally built binary still has the old registry embedded until the cache is refreshed.


Contributing Self-Developed Skills (自研)

No binary release needed. Just create the skill, update the registry, push to git.

Step 1: Create Skill Directory

mkdir -p skills/<skill-name>

Step 2: Create Required Files

  1. Create SKILL.md with proper frontmatter:
---
name: <skill-name>
description: <what this skill does and when to use it>
license: MIT
metadata:
  author: x
  version: "1.0"
---

# <Skill Name>

<Detailed instructions for the AI agent>
  1. Add LICENSE.txt (copy from project root or create)

  2. Ask the user whether to add a README.md (background, problem it solves, author goals — no secrets).

Step 3: Update Registry

Add the skill to pkg/registry/registry.yaml under the castle-x-skills-x source:

castle-x-skills-x:
  repo: github.com/castle-x/skills-x
  license: MIT
  skills:
    # ... existing skills ...
    - name: <skill-name>
      path: skills/<skill-name>
      tags: [<relevant-tags>]
      description: "Brief English description"
      description_zh: "简短的中文描述"

Step 4: Add i18n Translations

Add to both cmd/skills-x/i18n/locales/en.yaml and zh.yaml:

skill_<skill-name>: "Brief description"

Step 5: Commit and Push

git add skills/<skill-name>/ pkg/registry/registry.yaml cmd/skills-x/i18n/locales/
git commit -m "feat: add <skill-name> skill"
git push origin main

That’s it — no binary build or npm publish needed!

Step 6: Test Locally (After Pushing)

After pushing, verify the new skill is visible:

# Pull the latest registry from GitHub (REQUIRED to see new skills)
skills-x registry update

# Now the new skill should appear
skills-x list | grep "<skill-name>"

# Try installing it
skills-x init <skill-name> --target /tmp/test-skills
ls /tmp/test-skills/<skill-name>/

⚠️ Without skills-x registry update, your local binary still shows the old embedded registry and the new skill will NOT appear.


Contributing Community Skills (Open Source Skills)

No binary release needed. Just validate, update registry, push to git.

Step 1: Find and Validate the Source Skill

Search for skills at:

Before adding to registry, verify:

  1. Repository has a valid SKILL.md in the skill directory
  2. SKILL.md has proper YAML frontmatter (name + description)
  3. Skill name matches directory name (lowercase, hyphens only)
  4. License is identifiable

Step 2: Add to Registry

Edit pkg/registry/registry.yaml:

new-source-name:
  repo: github.com/owner/repo-name
  license: MIT
  skills:
    - name: skill-name
      path: path/to/skill/in/repo
      tags: [<relevant-tags>]
      description: "Brief English description"
      description_zh: "简短的中文描述"

Step 3: Commit and Push

git add pkg/registry/registry.yaml
git commit -m "feat: add <skill-name> skill from <source>"
git push origin main

Step 4: Test Locally (After Pushing)

# Pull the latest registry from GitHub (REQUIRED)
skills-x registry update

# Verify the skill appears
skills-x list | grep "<skill-name>"

# Test installing it
skills-x init <skill-name> --target /tmp/test-install
ls /tmp/test-install/<skill-name>/

Build and Test

# Build the binary
make build

# Test Chinese output
SKILLS_LANG=zh ./bin/skills-x list | grep "<skill-name>"

# Test English output
SKILLS_LANG=en ./bin/skills-x list | grep "<skill-name>"

# Test downloading the skill
./bin/skills-x init <skill-name> --target /tmp/test-skills
ls /tmp/test-skills/<skill-name>/

Release Workflow

Skills are fetched from GitHub at install time. The binary only contains the registry index, not skill content. This means:

  • Skills-only changes (add/update skills in registry.yaml) → just commit & push, no release needed
  • Tool changes (Go code, CLI behavior, registry format) → full release required

Path A: Skills-only Release (FAST - no version bump needed)

When ONLY pkg/registry/registry.yaml or skill content changes:

# Build and verify
make build
./bin/skills-x init --all --target "$(mktemp -d)"

# Commit and push — done!
git add pkg/registry/registry.yaml
git commit -m "feat: add <skill-name> skill

- Add <skill-name> to registry
- Users can update registry: skills-x registry update"
git push origin main

That's it! Users get the skill immediately by running:

skills-x registry update
skills-x list  # See new skill
skills-x init <skill-name>  # Install it

Path B: Tool Release (FULL - version bump required)

When Go source code, CLI behavior, or registry format changes:

Step 1: Update Version

Increment version in npm/package.json:

"version": "0.1.X"  // increment patch version

Step 2: Build for npm

make build-npm

Step 3: Pre-Release Testing (CRITICAL)

⚠️ IMPORTANT: Always run this test before releasing to catch broken or missing skills!

# Use a clean temporary directory
TEST_DIR=$(mktemp -d)
echo "Testing in: $TEST_DIR"

# Test installing all skills
./bin/skills-x init --all --target "$TEST_DIR"

# Check for failures
if [ $? -ne 0 ]; then
  echo "❌ Some skills failed to install!"
  echo "Review the output above for skills that are:"
  echo "  - Not found in repository"
  echo "  - Have incorrect paths"
  echo "  - Repository no longer exists"
  exit 1
fi

# Clean up
rm -rf "$TEST_DIR"
echo "✅ All skills tested successfully"

If any skills fail:

  1. Skill not found in repo (⚠ 在仓库中未找到 skill 路径):

    • The skill path in registry.yaml is incorrect
    • The skill was removed/renamed in the source repository
    • Action: Remove from pkg/registry/registry.yaml or fix the path
  2. Repository not accessible:

    • The repository was deleted or made private
    • Action: Remove the entire source from pkg/registry/registry.yaml
  3. Clone failed:

    • Network issue (retry)
    • Repository URL changed
    • Action: Update repo URL or remove from registry

After fixing registry.yaml:

# Rebuild and test again
make build-npm
./bin/skills-x init --all --target "$(mktemp -d)"

Step 4: Commit Changes

git add .
git commit -m "feat: add <skill-name> skill

- Add <skill-name> to skills collection
- Add i18n translations (en/zh)
- Update README"

Step 5: Tag and Push

git tag -a v0.1.X -m "Add <skill-name> skill"
git push origin main
git push --tags

Step 6: Create GitHub Release

⚠️ CRITICAL: You MUST upload binary assets to the release!

GitHub Release without binary assets is useless - users cannot download the tool.

# Build all platform binaries first
make build-npm

# Create release WITH binary assets (REQUIRED!)
gh release create v0.1.X \
  --title "v0.1.X - Add <skill-name>" \
  --notes "## Added
- New skill: <skill-name>
- Description: <brief description>" \
  npm/bin/skills-x-linux-amd64 \
  npm/bin/skills-x-linux-arm64 \
  npm/bin/skills-x-darwin-amd64 \
  npm/bin/skills-x-darwin-arm64 \
  npm/bin/skills-x-windows-amd64.exe

❌ WRONG - Release without assets:

# This creates an EMPTY release - USELESS!
gh release create v0.1.X --title "v0.1.X" --notes "..."

✅ CORRECT - Release with all binary assets:

gh release create v0.1.X --title "v0.1.X" --notes "..." \
  npm/bin/skills-x-linux-amd64 \
  npm/bin/skills-x-linux-arm64 \
  npm/bin/skills-x-darwin-amd64 \
  npm/bin/skills-x-darwin-arm64 \
  npm/bin/skills-x-windows-amd64.exe

If you forgot to upload assets, use gh release upload:

gh release upload v0.1.X \
  npm/bin/skills-x-* \
  --clobber

Step 7: Publish to npm

cd npm && npm publish --access public

Quick Reference

# ─── After adding a skill and pushing ───────────────────────────────────────
# Pull latest registry from GitHub (REQUIRED before testing new skills)
skills-x registry update

# List all skills (now shows newly added skills)
skills-x list
skills-x list | grep "<skill-name>"

# Install a skill
skills-x init <skill-name> --target /tmp/test-skills

# ─── Local dev build & verify ────────────────────────────────────────────────
make build
SKILLS_LANG=zh ./bin/skills-x list
SKILLS_LANG=en ./bin/skills-x list

# ─── Self-developed skill (自研) — no binary release needed ──────────────────
# 1. Create skills/<skill-name>/SKILL.md + LICENSE.txt
# 2. Add entry to pkg/registry/registry.yaml (under castle-x-skills-x)
# 3. Add i18n keys to en.yaml + zh.yaml
git add skills/<skill-name>/ pkg/registry/registry.yaml cmd/skills-x/i18n/locales/
git commit -m "feat: add <skill-name> skill"
git push origin main
# Users get it with: skills-x registry update

# ─── Third-party skill — no binary release needed ────────────────────────────
# 1. Validate SKILL.md in source repo
# 2. Add entry to pkg/registry/registry.yaml
git add pkg/registry/registry.yaml
git commit -m "feat: add <skill-name> skill from <source>"
git push origin main
# Users get it with: skills-x registry update

# ─── Full tool release (Go code changes only) ────────────────────────────────
make build-npm
./bin/skills-x init --all --target "$(mktemp -d)"  # Test all skills
git add . && git commit -m "feat: ..."
git tag -a v0.1.X -m "..."
git push origin main --tags
gh release create v0.1.X --title "v0.1.X" --notes "..." \
  npm/bin/skills-x-linux-amd64 \
  npm/bin/skills-x-linux-arm64 \
  npm/bin/skills-x-darwin-amd64 \
  npm/bin/skills-x-darwin-arm64 \
  npm/bin/skills-x-windows-amd64.exe
cd npm && npm publish --access public

Troubleshooting

IssueSolution
Open source skill not in listCheck registry.yaml entry (repo, path, name fields)
Self-developed skill not in listCheck pkg/registry/registry.yaml source entry, skill path, and source repository accessibility
Mixed language outputEnsure ALL strings use i18n.T(), no hardcoded text
Missing translationAdd keys to BOTH en.yaml and zh.yaml
init failsVerify SKILL.md exists and has valid frontmatter
Windows failsEnsure registry path uses / separators and target directories are writable
Version mismatchCheck npm/package.json version matches build
Release has no assetsMUST include binary files when running gh release create
Skill not in READMEMUST update BOTH README.md and README_ZH.md with new skill

Summary: Skill Contribution Workflows

Skill TypeStorageDescription SourceRelease needed?How users get it
Self-Developed (自研)skills/<name>/ in this reporegistry.yaml fields❌ Noskills-x registry update
Third-Party (open source)External repo onlyregistry.yaml fields❌ Noskills-x registry update
Tool change (Go code)n/an/a✅ Yes (full release)Install new binary version

Checklists for New Skills

For Self-Developed Skills (自研)

  • Skill directory created at skills/<name>/
  • SKILL.md with valid YAML frontmatter (name, description, license)
  • LICENSE.txt present
  • Entry added to pkg/registry/registry.yaml under castle-x-skills-x source
  • description (English) and description_zh (Chinese) filled in registry.yaml
  • skill_<name> key added to en.yaml and zh.yaml
  • Committed and pushed to origin/main
  • skills-x registry update run locally
  • skills-x list | grep "<name>" shows the skill
  • skills-x init <name> --target /tmp/test installs successfully

For Third-Party / Open Source Skills

  • Source repo has valid SKILL.md with frontmatter
  • Skill name matches directory name in source repo
  • Entry added to pkg/registry/registry.yaml with correct repo, path, license
  • description (English) and description_zh (Chinese) filled in registry.yaml
  • Committed and pushed to origin/main
  • skills-x registry update run locally
  • skills-x list | grep "<name>" shows the skill
  • skills-x init <name> --target /tmp/test installs successfully

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

百度语音识别 - 将语音消息转换为文本。支持中文普通话、英语、粤语、四川话。专为国内服务器环境优化,自动绕过代理访问百度 API。

日本語の概要は準備中です。原文の説明を表示しています。

castle-x/skills-x182026年4月16日 更新

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

日本語の概要は準備中です。原文の説明を表示しています。

castle-x/skills-x182026年4月16日 更新

Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies

日本語の概要は準備中です。原文の説明を表示しています。

castle-x/skills-x182026年4月16日 更新

Use when you have a written implementation plan to execute in a separate session with review checkpoints

日本語の概要は準備中です。原文の説明を表示しています。

castle-x/skills-x182026年4月16日 更新

帮助用户将飞书群机器人 Webhook 通知接入 Claude Code,使得每次任务完成后自动发送飞书消息卡片通知。 触发场景(当用户提到以下任意内容时激活此 skill): - "飞书通知"、"接入飞书"、"飞书提醒" - "task 完成通知"、"任务完成提醒" - "claude 完成提醒"、"claude 通知" - "Stop hook 通知"、"hook 通知" - "发飞书消息"、"飞书机器人" - "任务结束通知"、"配置通知"

日本語の概要は準備中です。原文の説明を表示しています。

castle-x/skills-x182026年4月16日 更新

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

日本語の概要は準備中です。原文の説明を表示しています。

castle-x/skills-x182026年4月16日 更新

castle-x のスキルをすべて見る

このスキルの問題を報告する