본문으로 건너뛰기
cccskills
무료GitHub에 공개한국어 소개

builtin-tool

LobeHub의 내장 에이전트 도구를 새로 만들거나 확장할 때 참고하는 가이드입니다. 매니페스트와 타입, 런타임 처리, 프런트엔드 실행기, 채팅 화면, 등록 설정을 다루며 각 부분을 일관되게 연결하는 규칙을 설명합니다.

원문원문 설명 보기

Use for LobeHub builtin agent tools: manifests, executors, runtimes, inspectors, renders, streaming and intervention.

lobehub/lobehub스타 83,500(GitHub 83,500 + cccskills 0)

실행 점수 미검증

설치 방법 보기

이럴 때 유용합니다

  • 새 내장 도구 패키지 만들기
  • 기존 도구에 API 추가하기
  • 실행 상태와 결과 화면 설계하기
  • 도구 등록이나 표시 오류 조사하기

한국어 소개

할 수 있는 일

LobeHub의 내장 에이전트 도구를 만들거나 확장하는 방법을 안내합니다. 매니페스트와 타입 정의, 런타임 처리, 프런트엔드 실행기, 채팅 화면, 중앙 레지스트리 등록을 다룹니다. Inspector는 각 API를 표시하는 데 사용하며, 결과 카드와 실행 중 표시, 승인 화면은 필요한 경우에 추가합니다. 식별자와 결과 필드, 번역 키, API 정의와 화면의 대응 관계처럼 구현에서 일관되게 맞춰야 할 항목도 확인할 수 있습니다.

이럴 때 유용합니다

새 내장 도구 패키지를 만들거나 기존 도구에 API를 추가할 때 참고할 수 있습니다. Inspector, Render 등의 도구 화면을 만들 때와 도구를 찾을 수 없거나 결과가 표시되지 않는 등록·표시 문제를 조사할 때도 유용합니다.

사용 예시

  • “내장 파일 작업 도구의 구성 방식을 알려 주세요.”
  • “이 도구에 새 API 메서드를 추가할 작업 항목을 정리해 주세요.”
  • “도구 결과 화면이 표시되지 않는 원인을 찾아 주세요.”

주의 사항

자료에는 @lobehub/ui, createStaticStyles 등의 지정 라이브러리와 스타일 규칙이 나옵니다. 자세한 설계 자료는 스킬의 references/ 디렉터리에 있습니다.

이 소개문은 공개된 SKILL.md를 바탕으로 AI(OpenAI Codex)가 작성했습니다. 정확한 사양은 아래 원문을 확인하세요.

문서 점검

AI가 SKILL.md의 내용에서 주의가 필요한 작업과 도입 전제를 확인했습니다. 점수는 실제로 실행한 결과(실행 검증)만으로 매깁니다.

안전성전송·삭제·명령 실행 등을 명시하고 있는가
A양호주로 구현 지침을 다루며 외부 전송이나 삭제 작업은 지정하지 않습니다.
도입의 용이성필요한 도구나 API 키가 적고 적혀 있는가
B일부 부족사용 라이브러리와 bun 명령은 나오지만 설치 절차는 제시되지 않습니다.

점수에는 넣지 않았습니다. 2026년 10월 26일 기준으로 AI(OpenAI Codex)가 판정했습니다. 참고용이므로 설치 전에 원문도 확인해 주세요.

평가가 다르다고 생각되면 재검토를 요청하기

어느 항목이 왜 다르다고 생각하는지 적어 주세요. 로그인은 필요 없습니다. SKILL.md와 대조해 평가를 다시 만들고 이곳에 반영합니다.

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

포함된 파일(14)

  • SKILL.md9.4 KB
  • references/architecture.md17.7 KB
  • references/tool-design.md20.6 KB
  • references/ui/composition.md1.9 KB
  • references/ui/diagnostics.md2.4 KB
  • references/ui/inspector.md5.5 KB
  • references/ui/intervention.md3.9 KB
  • references/ui/placeholder.md3.1 KB
  • references/ui/portal.md2.5 KB
  • references/ui/principles.md4.6 KB
  • references/ui/README.md3.2 KB
  • references/ui/render.md4.1 KB
  • references/ui/shared-rules.md5.4 KB
  • references/ui/streaming.md2.7 KB

SKILL.md(원문)

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

Builtin Tool Authoring Guide

A builtin tool is a package the agent runtime can call. It ships five faces:

FaceLives inAudience
Manifest + typessrc/{manifest,types,systemRole}.tsThe LLM (tool spec + system prompt)
ExecutionRuntimesrc/ExecutionRuntime/Server / desktop / any runtime caller
Executorsrc/client/executor/Frontend (wraps stores/services)
Client UIsrc/client/{Inspector,Render,…}/Chat UI
Registry wiringpackages/builtin-tools/src/*.ts + src/store/tool/slices/builtin/executors/index.tsFramework

Read These First

QuestionDoc
Where do files live? What does each face do? Wiring?architecture.md
How do I name the tool, design APIs, write the manifest, executor, ExecutionRuntime?tool-design.md
How do I build Inspector / Render / Placeholder / Streaming / Intervention / Portal?ui/

When to Use This Skill

  • Creating a new packages/builtin-tool-<name>/ package
  • Adding a new API method to an existing builtin tool
  • Building or restyling any of the 6 client surfaces for a tool
  • Wiring a tool into the central registries
  • Debugging "tool not found / API not found / render not showing / placeholder stuck" errors

Top-Level Design Principles

  1. lobe-<domain> identifier is permanent. It's stored in message history. Renames need legacy aliases kept alongside the new name (see the // Legacy aliases entries in packages/builtin-tool-local-system/src/client/Inspector/index.ts, kept after listLocalFiles/searchLocalFiles were renamed to listFiles/searchFiles). Get it right the first time.
  2. ApiName is an as const object, not a TS enum. It doubles as the runtime list BaseExecutor iterates over.
  3. Three result fields, three audiences:
    • content: string → the LLM reads it
    • state: Record<…> → the UI's pluginState; result-domain only, never echo all params back
    • error: { type, message, body? } → both LLM and UI; type is a stable code
  4. Split execution from frontend wiring.
    • src/ExecutionRuntime/ — pure runtime, no React, no Zustand, accepts services via constructor. The default place for new logic.
    • src/client/executor/ — BaseExecutor subclass that calls ExecutionRuntime (or stores/services directly when frontend-only).
  5. UI defaults to "do nothing". Inspector is required (the header strip). Render/Placeholder/Streaming/Intervention/Portal are added only when there's something specific to show — empty registries are fine.
  6. Style with createStaticStyles + cssVar.* (zero-runtime). Fall back to createStyles + token only when you genuinely need runtime values. Use @lobehub/ui components, not raw antd.
  7. i18n keys live in packages/locales/src/default/plugin.ts. Inspector titles must come from t('builtins.<identifier>.apiName.<api>') so something renders while args stream.
  8. A failed long-running call should be continuable, not just inspectable. Example: when callSubAgent stops halfway, the user says "keep going". So the fix was an optional subAgentId on callSubAgent that appends a new instruction to the same sub-agent thread — not a new "look up that run" API the model has to remember to call before retrying from scratch. Add a new API only when a user would ask for it on its own.

Package Layout (preferred, post-2026 convention)

packages/builtin-tool-<name>/
├── package.json
└── src/
    ├── index.ts              # exports manifest + types + systemRole + Identifier (no React, no stores)
    ├── manifest.ts           # BuiltinToolManifest with JSON Schema for every API
    ├── types.ts              # ApiName const + Params/State interfaces per API
    ├── systemRole.ts         # System prompt teaching the model when/how to use the APIs
    ├── ExecutionRuntime/     # ✅ Default home for runtime logic (server- or anywhere-callable)
    │   └── index.ts
    └── client/
        ├── index.ts          # Re-exports for the registries
        ├── executor/         # ✅ Frontend executor — extends BaseExecutor, often delegates to ExecutionRuntime
        │   └── index.ts
        ├── Inspector/        # required — header chip per API
        ├── Render/           # optional — rich result card
        ├── Placeholder/      # optional — skeleton during streaming/execution
        ├── Streaming/        # optional — live output renderer (e.g. RunCommand, WriteFile)
        ├── Intervention/     # optional — approval / edit-before-run UI
        ├── Portal/           # optional — full-screen detail view
        └── components/       # shared subcomponents used by the surfaces above

Older packages (builtin-tool-calculator, etc.) still have src/executor/ as a sibling of src/client/. That's grandfathered; don't relocate without a deliberate refactor. New packages and new APIs added to existing packages should follow the layout above.

package.json exports map:

"exports": {
  ".":                  "./src/index.ts",
  "./client":           "./src/client/index.ts",
  "./executor":         "./src/client/executor/index.ts",
  "./executionRuntime": "./src/ExecutionRuntime/index.ts"
}

Authoring Checklist

Before opening the PR:

  • Identifier follows lobe-<domain> and is stable (lives in message history).
  • Every <Name>ApiName value has: a manifest api[] entry, an executor method, an Inspector, an i18n apiName.* key.
  • Params interfaces match the JSON Schema; State interfaces match what the executor returns and what the UI surfaces read.
  • System prompt disambiguates confusable APIs and points to batch variants.
  • Runtime logic lives in ExecutionRuntime/; the client/executor/ only wires stores/services and delegates.
  • Executor returns { success, content, state, error? } via a single toResult() funnel — content always non-empty (default to error.message).
  • Inspector handles isArgumentsStreaming, isLoading, partialArgs, missing pluginState.
  • Render returns null until it has data; only created for APIs with rich results.
  • Placeholder added if the API has a perceivable execution lag (search, list, crawl).
  • Streaming added for APIs that emit incremental output (run command, write file, code execution).
  • Intervention added if humanIntervention is set in the manifest.
  • All registry files updated (see architecture.md → Registry wiring).
  • i18n keys in packages/locales/src/default/plugin.ts plus dev seeds in en-US/zh-CN.
  • bunx vitest run --silent='passed-only' 'packages/builtin-tool-<name>' passes.
  • bun run type-check passes.

Reference Tools

Pick the closest neighbor and copy:

If your tool is…Read first
Pure-compute, no UI statepackages/builtin-tool-calculator/ — ExecutionRuntime reuses executor (mathjs/nerdamer work everywhere)
CRUD over a domain entitypackages/builtin-tool-task/ — full Inspector + Render set, batch variants
Heavy UI (Inspector/Render/Placeholder/Portal)packages/builtin-tool-web-browsing/ — search-style result UI, Portal for detail view
Desktop / filesystem with all surfaces (incl. Streaming + Intervention)packages/builtin-tool-local-system/ — ExecutionRuntime injects an ILocalSystemService, executor calls it
Server-side pure (no client executor)packages/builtin-tool-web-browsing/ — only ExecutionRuntime is exported; the chat client doesn't run it
Needs human approval before runningpackages/builtin-tool-local-system/src/client/Intervention/ — per-API approval components

리뷰

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

댓글

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

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

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

0 / 1,000자

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

같은 저장소의 스킬

acceptance

무료요약 있음

실제 제품을 적절한 조작 환경에서 실행해 변경 사항을 검증하고, 사용자가 확인할 수 있는 증거를 모아 인수 보고서로 게시합니다. 기존 검증 계획을 확인하거나 점검 항목을 만들고, `lh` CLI로 결과를 게시할 수 있습니다.

  • 변경된 제품 동작을 실제로 확인하기
  • 스크린샷 등 검증 증거 수집하기
  • 검증 계획과 보고서 작성하기
lobehub/lobehub8.4만2026년 10월 26일 업데이트

add-model-provider

무료요약 있음

LobeHub에 AI 모델 제공자를 추가하는 과정을 안내합니다. 런타임 연동, 모델 정보와 설정, 브랜드 표시, 문서화 및 인수 확인을 다루며, 기존 제공자에 모델만 추가하는 경우와 새 연동이 필요한 경우를 구분합니다.

  • LobeHub에 새 AI 모델 제공자 추가하기
  • 제공자의 설정 안내나 설명 갱신하기
  • 모델 추가에 새 제공자 연동이 필요한지 판단하기
lobehub/lobehub8.4만2026년 10월 26일 업데이트

add-setting-env

무료요약 있음

서버 환경 변수로 사용자 설정의 기본값을 지정하도록 구현하는 절차를 안내합니다. 변수 검증, 서버 설정 구성, 사용자 저장소 반영부터 예시 환경 파일과 셀프 호스팅 문서 갱신까지 다룹니다.

  • 환경 변수로 사용자 설정 기본값 지정
  • 설정을 서버 구성과 사용자 저장소에 연결
  • 환경 변수 예시와 문서 갱신
lobehub/lobehub8.4만2026년 10월 26일 업데이트

agent-runtime-hooks

무료요약 있음

에이전트 실행 단계, 도구 호출, 사람의 승인, 컨텍스트 압축, 하위 에이전트 호출에 훅을 등록하는 방법을 안내합니다. 이벤트를 관찰하고 로컬 도구 결과를 모의하거나 설정에 따라 웹훅으로 도구 호출을 허용 또는 거부할 수 있습니다.

  • 에이전트 단계와 오류 기록
  • 테스트 중 도구 결과 모의
  • 웹훅으로 도구 호출 허용 또는 거부
lobehub/lobehub8.4만2026년 10월 26일 업데이트

agent-signal

무료요약 있음

에이전트의 이벤트 기반 백그라운드 작업을 설계하고 구현하도록 돕습니다. 소스, 시그널, 액션, 정책의 역할을 나누고 비동기 처리, 중복 실행 방지, 완료 기록과 관측 기능을 다룹니다.

  • 이벤트로 시작되는 백그라운드 작업 추가
  • 대화 요청과 작업을 분리
  • 액션의 중복 실행 방지
lobehub/lobehub8.4만2026년 10월 26일 업데이트

agent-testing-bot

무료요약 있음

실제 데스크톱 채팅 앱에서 봇 채널의 인수 테스트를 진행합니다. Discord, Slack, Telegram, WeChat, Lark, QQ에서 메시지를 보내고 응답을 기다린 뒤 결과 화면을 캡처합니다. iMessage는 BlueBubbles 브리지를 사용합니다.

  • 실제 Discord 채널에서 봇 응답 확인하기
  • Slack이나 Telegram 대화 경로 테스트하기
  • macOS 앱의 작업 결과 화면으로 기록하기
lobehub/lobehub8.4만2026년 10월 26일 업데이트

lobehub의 스킬 모두 보기

이 스킬의 문제 신고