K-Skill:韩国 AI Agent 技能库 2026 版
K-Skill 是面向韩国市场的 AI Agent 技能库。支持技能扩展、工具调用、跨语言。K-Hub 生态。
- ⭐ 800
- Python
- TypeScript
- MIT
- 更新于 2026-05-18
什么是 K-Skill? #
K-Skill 是面向韩国 AI Agent 生态的技能库。提供「技能即代码」的框架,让开发者像写函数一样编写 AI 能力。
核心特性 #
技能即代码 #
from k_skill import Skill
class WeatherSkill(Skill):
name = "天气查询"
description = "查询指定城市的天气情况"
async def run(self, city: str) -> dict:
return await weather_api.get(city)
标准化接口 #
from k_skill.skill import BaseSkill
class Skill(BaseSkill):
def __init__(self, config: dict):
super().__init__(config)
self.config = config
async def execute(self, params: dict) -> dict:
# 实现技能逻辑
return {"result": data}
安装 #
Python 安装 #
pip install k-skill
开发模式 #
git clone https://github.com/k-skill/k-skill.git
cd k-skill
pip install -e ".[dev]"
创建技能 #
目录结构 #
my_skill/
├── SKILL.md # 技能文档
├── skill.py # 技能实现
├── tests/ # 单元测试
└── examples/ # 使用示例
SKILL.md 模板 #
---
name: 天气查询
description: 查询全球城市天气
tags: ["weather", "api", "daily"]
date: 2026-05-18
---
集成 K-Hub #
注册技能 #
k-skill register --name weather-query --version 1.0.0
查看技能列表 #
k-skill list --category api
使用示例 #
天气查询技能 #
from k_skill import SkillRegistry
registry = SkillRegistry()
weather_skill = registry.get("weather-query")
result = weather_skill.run(city="首尔")
# {"temp": 22, "condition": "晴天", "humidity": 65}
批量查询 #
from concurrent.futures import ThreadPoolExecutor
cities = ["首尔", "釜山", "大田"]
with ThreadPoolExecutor() as executor:
results = list(executor.map(
lambda city: weather_skill.run(city),
cities
))
工具集成 #
API 工具 #
from k_skill.tools import HTTPClient
client = HTTPClient(base_url="https://api.weather.com")
response = client.get("/v1/current", params={"city": "Seoul"})
数据库工具 #
from k_skill.tools import Database
db = Database("postgresql://localhost/weather")
data = db.query("SELECT * FROM weather WHERE date = TODAY")
生态系统 #
官方技能库 #
| 类别 | 技能数 | 说明 |
|---|---|---|
| 天气 | 5 | 全球城市 |
| 新闻 | 12 | 多语言 |
| 股票 | 8 | 实时行情 |
| 翻译 | 15 | 100+ 语言 |
| 数学 | 3 | 计算器 |
第三方集成 #
- HuggingFace:模型推理
- Pinecone:向量检索
- Weaviate:知识图谱
- Chroma:记忆存储
部署 #
Docker 镜像 #
FROM python:3.10-slim
RUN pip install k-skill
COPY skills/ /app/skills/
CMD ["k-skill", "run", "weather-query"]
Kubernetes #
apiVersion: apps/v1
kind: Deployment
metadata:
name: k-skill-weather
spec:
replicas: 3
template:
spec:
containers:
- name: skill
image: kskill/weather-query:latest
env:
- name: K_SKILL_CONFIG
value: '{"api_key": "xxx"}'
性能优化 #
连接池 #
from k_skill.tools import HttpClientPool
pool = HttpClientPool(max_connections=20)
client = pool.get_client()
缓存 #
from k_skill.cache import RedisCache
cache = RedisCache(ttl=3600)
result = cache.get("weather:seoul") or weather_skill.run("seoul")
常见问题 #
Q: K-Skill 支持批量部署吗?
答:支持。K8s 原生部署,水平扩缩容。
Q: 技能更新后会影响已有用户吗?
答:支持版本号。蓝绿发布,平滑升级。
总结 #
K-Skill 让 AI Agent 能力模块化。从写代码到部署,全流程开源化。
参考:K-Hub 文档、Korea AI 발전원 更新:2026-05-18
💬 留言讨论