Metadata-Version: 2.4
Name: ChatSkill
Version: 0.1.1
Summary: ChatSkill: standalone ChatArch skills CLI extracted from ChatTool
Author-email: ChatArch <1073853456@qq.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/ChatArch/ChatSkill
Project-URL: Repository, https://github.com/ChatArch/ChatSkill
Project-URL: Documentation, https://arch.gh.wzhecnu.cn/ChatSkill/
Keywords: chatskill,chatarch,cli
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click<9.0,>=8.0
Requires-Dist: chatstyle<0.3.0,>=0.2.0
Requires-Dist: chatenv<0.3.0,>=0.2.10
Provides-Extra: dev
Requires-Dist: build; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: twine; extra == "dev"
Provides-Extra: docs
Requires-Dist: mkdocs<2.0,>=1.6; extra == "docs"
Requires-Dist: mkdocs-material<9.7,>=9.5; extra == "docs"
Requires-Dist: mkdocs-static-i18n<2.0,>=1.2; extra == "docs"
Requires-Dist: mike<3.0,>=2.0; extra == "docs"
Dynamic: license-file

<div align="center">
    <a href="https://pypi.python.org/pypi/ChatSkill">
        <img src="https://img.shields.io/pypi/v/ChatSkill.svg" alt="PyPI version" />
    </a>
    <a href="https://github.com/ChatArch/ChatSkill/actions/workflows/ci.yml">
        <img src="https://github.com/ChatArch/ChatSkill/actions/workflows/ci.yml/badge.svg" alt="Tests" />
    </a>
    <a href="https://arch.gh.wzhecnu.cn/ChatSkill/">
        <img src="https://img.shields.io/badge/docs-mkdocs-blue.svg" alt="Documentation" />
    </a>
</div>

<div align="center">

[English](README.en.md) | [简体中文](README.md)
</div>

# ChatSkill

ChatSkill 是从 ChatTool 的 `chattool skill` / `chatskill` 能力拆出的独立 ChatArch CLI，用于从外部 skills source 安装 Agent skills 到 Codex、Claude 或 OpenCode 等目标平台。

ChatSkill 不自带技能内容；技能事实源应来自 workspace / ChatMemory / 其他外部目录，并通过 `--source` 或 `CHATSKILL_SKILLS_DIR` / ChatEnv 指定。

## 快速开始

```bash
pip install ChatSkill
chatskill --help
chatskill --version
chatskill --tree
chatskill --tree-brief
```

## 使用示例

```bash
# 列出外部 source 中的 skills
chatskill list --source ~/Playground/skills/chatarch

# 安装单个 skill 到 Codex skills 目录
chatskill install chatarch-package-dev --source ~/Playground/skills/chatarch --platform codex

# 安装所有 skills 到显式目标目录
chatskill install --all --source ~/Playground/skills/chatarch --dest ~/.codex/skills --force
```

也可以通过环境变量或 ChatEnv 配置默认 source：

```bash
export CHATSKILL_SKILLS_DIR=~/Playground/skills/chatarch
chatskill list
```

## CLI 树

```text
chatskill
├── --help  # Show this message and exit.
├── --version  # Show the version and exit.
├── --tree  # Print the registered CLI tree and exit.
├── --tree-brief  # Print the registered CLI tree without parameter signatures and exit.
├── install [NAME] [--all] [--platform PLATFORM-NAME] [--source SOURCE-DIR] [--dest DEST-DIR] [--prefix] [--force]  # Validate and copy skills to a target directory; writes or overwrites files.
└── list [--source SOURCE-DIR]  # List available skills from an external source directory; read-only.
```

`chatskill --tree-brief` 显示相同的真实命令节点和用途，但省略参数与选项签名。

## CLI

- `chatskill list [--source DIR]`
- `chatskill install [NAME] [--all] [--source DIR] [--dest DIR] [--platform codex|claude|opencode] [--prefix] [--force]`

安装前会校验每个 skill 的 `SKILL.md`：必须有 YAML frontmatter，且至少包含 `name` 和 `description`。

## 开发

```bash
pip install -e ".[dev,docs]"
python -m pytest -q
mkdocs build --strict
python -m build
python -m twine check dist/*
```
