CLI技能同步验证工具

Skrills 是一个基于 Rust 的 CLI 工具,用于在 Claude Code、Codex CLI、GitHub Copilot CLI 和 Cursor 等 AI 编程 CLI 之间验证并同步技能、命令、代理、MCP 服务器和钩子,实现一次编写、处处使用。

  • by athola
  • Rust
  • 本地部署
  • 69 星标
  • 更新于
在 GitHub 查看 athola/skrills

使用说明

Skrills

Write a skill once, use it everywhere. Skrills validates and syncs skills, commands, agents, MCP servers, and hooks across Claude Code, Codex CLI, GitHub Copilot CLI, and Cursor, all from a single Rust binary.

Install · User Guide · CLI Reference · FAQ · Changelog

Install

macOS / Linux:

curl -LsSf https://raw.githubusercontent.com/athola/skrills/HEAD/scripts/install.sh | sh

Windows PowerShell:

powershell -ExecutionPolicy Bypass -NoLogo -NoProfile -Command ^
"Remove-Item alias:curl -ErrorAction SilentlyContinue; iwr https://raw.githubusercontent.com/athola/skrills/HEAD/scripts/install.ps1 -UseBasicParsing | iex"

Or cargo install skrills. See the installation guide for HTTP transport and service setup.

Everyday use

Skrills handles the loop of writing skills and keeping every CLI current. The common jobs:

Make your Claude skills work everywhere. Codex and Copilot are strict about frontmatter, and Cursor uses its own rule format. Detect and fix the incompatibilities, then push to the other CLIs:

skrills validate --target both --autofix   # fix missing/invalid frontmatter and body
skrills sync-all                            # mirror everything to all four CLIs

Keep two environments in sync. Edit in one, mirror to another. File hashing preserves manual edits on both sides:

skrills sync-all --from cursor --to claude

Trim context-window cost. Surface your token-heaviest skills with reduction suggestions:

skrills analyze --min-tokens 1000 --suggestions

Watch what's loaded, live. cold-window continuously re-reads your plugins, skills, commands, and subagents, applying per-source token attribution and tiered alerts. Render it as a terminal TUI or a browser dashboard (or both):

skrills cold-window --tui                    # live TUI in this terminal (q / Ctrl-C to quit)
skrills cold-window --browser --port 8888    # same engine, browser dashboard at /dashboard
skrills cold-window --tui --demo             # invented data that walks every alert tier, as in the GIF

To keep the TUI always-on in a Zellij pane, see Cold-Window: always-on in Zellij.

Let other tools call Skrills. The MCP server exposes its tools (validation, sync, intelligence, research, subagents) over stdio or HTTP:

skrills serve --http 127.0.0.1:3000 --open

See the quickstart tutorial for a full walkthrough and the CLI reference for every command, including skill lifecycle tools (skill-deprecate, skill-rollback, skill-import, skill-score, skill-catalog).

Supported environments

Skrills syncs eight asset types across four CLIs. Each cell reflects what the adapter reads or writes today:

Asset Claude Code Codex CLI Copilot CLI Cursor
Skills Y Y Y Y
Commands Y Y -- Y
Agents Y -- Y Y
MCP Servers Y Y Y Y
Hooks Y -- -- Y
Instructions / Rules Y -- Y Y
Preferences Y Y Y --
Plugin Assets Y -- -- Y

A dash means that asset doesn't sync to that CLI, either because the CLI has no equivalent (Copilot CLI has no slash commands) or because the mapping isn't built yet (Cursor preferences). Plugin assets flow one way, from Claude Code to Cursor: the whole plugin tree is mirrored into Cursor's plugins/local/, carrying skill bodies and runtime scripts, and stale entries are pruned automatically. A sync in the other direction reports plugin assets as skipped. See the sync guide for details.

CI integration

Validate skills on every pull request with the reusable GitHub Action:

- uses: athola/skrills/.github/actions/validate-skills@v0.8.2
  with:
    targets: all
    strict: true
    path: skills/

Configuration

Persistent settings are in ~/.skrills/config.toml (precedence: CLI flags > environment variables > config file):

[serve]
auth_token = "your-secret-token"
tls_auto = true
cors_origins = "https://app.example.com"
allowed_hosts = "skrills.internal:8080"  # needed when binding a non-loopback address
project_roots = ["~/src"]                # project_dir a client may have analyzed

See security docs for TLS setup and the FAQ for environment variables.

Documentation

Resource Description
User Guide Primary documentation (mdBook)
CLI Reference All commands with examples
Sync Guide Cross-CLI sync workflows
MCP Tutorial Server setup and tool reference
Architecture Crate graph and runtime flow
Security Auth, TLS, threat model
Changelog Release history

Limitations

  • Skrills validates and syncs files. It does not inject skills into prompts at runtime.
  • Session-history mining works best with recent Claude Code / Codex CLI versions.
  • LLM-based skill generation (create-skill) runs the claude or codex CLI found on PATH (override with SKRILLS_CLI_BINARY) and uses that CLI's own login. skrills reads no model API key for it. The API-backed subagent backends are separate and read SKRILLS_CLAUDE_API_KEY or SKRILLS_CODEX_API_KEY.

Contributing

make lint test --quiet

Builds on stable Rust. See the development guide and process guidelines. Update docs and tests with code. Report bugs with your OS, skrills --version, and logs (--trace-wire for MCP). For security, see the security policy.

License

MIT