본문으로 건너뛰기
cccskills
무료GitHub에 공개

tool

Guide for creating tools using CallableTool2 and Params pattern, plus YAML agent registration

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(2)

  • SKILL.md2.7 KB
  • references/guide.md10.9 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Tool Development Guide

Create custom tools with the CallableTool2 + Params pattern, then register them in a YAML agent file.

Quick Template

"""Brief description of what this tool does."""
from kimi_agent_sdk import CallableTool2, ToolError, ToolOk, ToolReturnValue

class Params(BaseModel):
    """Define tool parameters here."""
    required_param: str = Field(
        description="Description of this parameter for the LLM."
    )
    optional_param: str | None = Field(
        default=None,
        description="Optional parameter with default value."
    )

class MyTool(CallableTool2):
    name: str = "MyTool" # Tool identifier
    description: str = "What this tool does."  # For LLM to understand usage
    params: type[Params] = Params # Link to Params class

    async def __call__(self, params: Params) -> ToolReturnValue:
        """Execute the tool logic."""
        try:
            # Your tool logic here
            result = f"Processed: {params.required_param}"
            return ToolOk(output=result)
        except Exception as e:
            return ToolError(
                message=str(e),
                output="Partial output if available",
                brief="Short error summary"
            )

Key Patterns

  • Return values: ToolOk(output=...) on success; ToolError(message=..., output=..., brief=...) on failure.
  • Validators: ge/le/gt/lt (numeric), min_length/max_length/pattern (strings/collections), default_factory for mutable defaults.
  • Best practices: type hints everywhere; clear Field(description=...); always async __call__; handle exceptions → ToolError; one tool = one job.

Registration

Every new tool must be registered in a YAML agent file as "module.path:ClassName" under tools:. KimiToolset.load_tools() splits on the last :, imports the module, gets the class, instantiates, and adds it. Agent files: agent_worker.json (default), agent_boss.json, agent_subagent.json; base agents in kimi-cli/src/kimi_cli/agents/default/ (agent.yaml, coder.yaml, explore.yaml, plan.yaml). Child YAML tools: replaces the parent's list; use allowed_tools:/exclude_tools: to restrict. Use kimi_cli.tools.* prefix for new tools under kimi-cli/src/kimi_cli/tools/; the relocated shell / process / background-job infra (bash, pwsh, Run, FindStr, job_output, common, security, prompt_common) lives under kimi-cli/src/kimi_cli/tools/ and must be imported as kimi_cli.tools.*.

Full complete example, Params reference, background-task tools, interactive-session reuse, and YAML details: read references/guide.md.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

app

무료

Guide for the Kimix web frontend (src/app/) — vanilla TypeScript + Vite, SSE-based chat UI mirroring sse_cli.py. Use when modifying the frontend, adding new UI features, changing the API client, or understanding the message rendering pipeline.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Sikao-Engine/KimiX1142026년 10월 20일 업데이트

doc

무료

Guide for navigating and maintaining Kimix project documentation. Use when: (1) user asks about the docs structure, (2) user wants to add, update, or append content to project documents.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Sikao-Engine/KimiX1142026년 10월 20일 업데이트

kimix_api

무료

Guide for using KimiX API utilities covering kimix, kimix.utils, kimix.base, kimix.dag, kimix.network, kimix.server, kimix.parser, kimix.cot, kimix.retrieval, kimix.summarize, and kimi_agent_sdk.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Sikao-Engine/KimiX1142026년 10월 20일 업데이트

Guide for Kimix opencode-style HTTP server (FastAPI + SSE), including route definitions, builtin endpoints, and app.post usage.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Sikao-Engine/KimiX1142026년 10월 20일 업데이트

serve

무료

Guide for the Kimix HTTP serve system — FastAPI backend + TypeScript/Vite frontend. Use when adding new backend endpoints, modifying the session manager, changing the frontend API client, or understanding how data flows from backend to UI. Covers dummy_app.py, dummy_session_manager.py, sse_cli.py, and src/app/.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Sikao-Engine/KimiX1142026년 10월 20일 업데이트

Guide for creating effective skills. Use when users want to create or update a skill that extends agent's capabilities.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Sikao-Engine/KimiX1142026년 10월 20일 업데이트

Sikao-Engine의 스킬 모두 보기

이 스킬의 문제 신고