Skip to main content

create-playbook-component

Use when: adding a new playbook automation component, implementing a PlaybookComponent interface, or registering a new playbook step

소스 정보

저장소
OpenCTI-Platform/opencti
최근 소스 활동
2026년 5월 12일 12:56
감지된 SKILL.md 언어
영어
스타
10,200
포크
1,489

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
create-playbook-component
description
Use when: adding a new playbook automation component, implementing a PlaybookComponent interface, or registering a new playbook step
# Create Playbook Component ## Prerequisites - **Component ID**: Unique uppercase ID (e.g., `PLAYBOOK_MY_COMPONENT`). - **Configuration**: List of fields required from the user. ## Procedure ### Step 1 — Create Component File Location: `opencti-platform/opencti-graphql/src/modules/playbook/components/<name>-component.ts`. ### Step 2 — Define Configuration Schema Define a TypeScript interface for the config and a JSONSchema for validation. ```typescript export interface MyComponentConfig { key: string; } const SCHEMA: JSONSchemaType<MyComponentConfig> = { type: 'object', properties: { key: { type: 'string' }, }, required: ['key'], }; ``` ### Step 3 — Implement Component Interface Implement `PlaybookComponent<MyComponentConfig>`. ```typescript export const PLAYBOOK_MY_COMPONENT: PlaybookComponent<MyComponentConfig> = { id: 'PLAYBOOK_MY_COMPONENT', name: 'My Component', description: 'Does something useful', icon: 'icon-name', is_entry_point: false, is_internal: true, ports: [{ id: 'out', type: 'out' }], configuration_schema: SCHEMA, schema: async () => SCHEMA, executor: async ({ bundle, playbookNode }) => { // Business logic here const config = playbookNode.configuration; return { output_port: 'out', bundle }; }, }; ``` ### Step 4 — Register Component Import and add to `PLAYBOOK_COMPONENTS` in `src/modules/playbook/playbook-components.ts`.
GitHub에서 보기