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

custom-engine-implementation

Add an agent execution engine to gh-aw using a shared Markdown definition where possible. The skill guides installation, authentication, configuration, and testing, with Go infrastructure changes reserved for capabilities that existing settings cannot express.

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

원문원문 설명 보기

Add and test declarative behavior-defined agentic engines in gh-aw, extending Go infrastructure only when necessary.

설치 방법 보기

이럴 때 유용합니다

  • Adding an agent execution engine to gh-aw
  • Defining CLI installation, authentication, and MCP settings
  • Extending shared behavior settings when existing options fall short
  • Testing engine definitions and generated execution steps

포함된 파일(1)

  • SKILL.md7.4 KB

SKILL.md(원문)

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

Custom Engine Implementation

Use this skill when adding a new agentic engine definition or extending the behavior-defined engine infrastructure.

Choose the smallest implementation

Prefer a shared Markdown engine definition. Installation, execution, MCP configuration, provider routing, caching, manifests, plugins, network defaults, harness scripts, and log parsing can already be declared through engine.behaviors.

Only change Go code when the engine needs a reusable behavior that the declarative model cannot express. Add a dedicated Go engine only when the shared behavior-defined runtime cannot run the engine at all.

NeedImplementation
Existing behaviors are sufficientAdd an imported shared engine definition
A reusable declarative behavior is missingExtend the definition model and behavior-defined runtime
The shared runtime is fundamentally unsuitableAdd a dedicated Go engine and register it

The relevant implementation is in:

  • pkg/workflow/engine_definition.go for the definition model and catalog
  • pkg/workflow/behavior_defined_engine.go for the shared runtime
  • pkg/workflow/engine_definition_loader.go for embedded built-in definitions
  • pkg/workflow/agentic_engine.go for dedicated Go engine registration
  • pkg/parser/schemas/main_workflow_schema.json for the workflow schema

Study representative engines

Read the closest examples before making changes:

  • .github/workflows/shared/opencode.md: npm installation, merged configuration, MCP, provider routing, and log parsing
  • .github/workflows/shared/aider.md: Python installation and a custom harness without native MCP
  • .github/workflows/shared/crush.md: native MCP configuration adapter and harness
  • .github/workflows/shared/cursor.md: plugin support
  • .github/workflows/shared/deepseek-harness.md: provider endpoint discovery and a headless profile

Use the examples to identify a pattern, not as a reason to copy optional behaviors.

Add a shared engine definition

  1. Create .github/workflows/shared/<engine>.md.
  2. Declare engine.id, display-name, description, experimental, provider metadata, authentication, and only the required behaviors.
  3. Pin a default CLI version. Make installation deterministic and provide a verification command.
  4. Document setup, authentication, model syntax, MCP support, and limitations in the Markdown body. Keep in-repository integrations clearly identified as unsupported samples.
  5. Add the engine ID and shared definition path to .github/aw/engines.json. Imported behavior-defined engines are registered dynamically; do not add them to NewEngineRegistry().
  6. Add .github/workflows/smoke-<engine>.md, following the closest existing smoke workflow. Import the shared definition and exercise the capabilities the engine claims to support.
  7. Update the unsupported sample table in docs/src/content/docs/reference/engines.md.
  8. Add a changeset when the engine is a user-visible repository sample. New experimental engines have precedent as a minor change.
  9. Run make recompile and include the generated smoke workflow .lock.yml.

TestKnownEngineImportsFile_MatchesSharedEngineFiles in pkg/workflow/engine_definition_test.go enforces catalog coverage for shared external engines.

Design the definition

Keep the definition declarative and minimal:

  • Select the correct package manager, package name, binary name, version, and verification command under behaviors.installation.
  • Put invocation arguments and non-secret environment variables under behaviors.execution.
  • Use an existing secret strategy and provider environment mode where possible.
  • Declare native MCP support only when the CLI can consume the generated configuration. Otherwise use a harness or the gh-aw CLI proxy pattern.
  • Add only required default domains and map provider-specific domains under behaviors.network.provider-domains.
  • Declare manifest files, cache paths, and plugin support only when the CLI consumes them.
  • Add a log parser only when its emitted event format can be tested.

Treat inline JavaScript in harnesses, configuration adapters, and log parsers as production code. Avoid shell interpolation, validate paths and child-process arguments, preserve nonzero exit codes, and never print secret values. Enabling package lifecycle scripts requires a pinned version and an explicit reason.

For log and error regular expressions, also load .github/skills/error-pattern-safety/SKILL.md.

Extend declarative infrastructure

When an engine exposes a generally useful capability that existing behaviors cannot express:

  1. Add the smallest field to the types in pkg/workflow/engine_definition.go.
  2. Validate and render it in the focused behavior-defined engine files.
  3. Update pkg/parser/schemas/main_workflow_schema.json.
  4. Add focused tests for parsing, validation, and rendered execution behavior.
  5. Run make generate-schema-docs when generated schema documentation changes.

Do not add a schema field for a behavior that can be represented by existing installation, execution, environment, harness, or adapter fields.

For a dedicated Go runtime, implement the engine interfaces by composing the existing helpers, keep engine-specific code in its own files, and register the engine in pkg/workflow/agentic_engine.go. Cover configuration, commands, environment, authentication, tools, logs, and failure handling with focused tests.

Test the right layers

Use tests that match the changed behavior:

AreaTests and examples
Harness, configuration, MCP, and environmentbehavior_defined_engine_harness_test.go
Log parsingbehavior_defined_engine_log_parser_test.go
Cache behaviorbehavior_defined_engine_cache_test.go
Definitions, catalog, and known importsengine_definition_test.go, engine_catalog_test.go
Embedded definitionsengine_definition_loader_test.go
Real shared workflow harnessaider_workflow_test.go
Sandboxed CLI visibilitycloud_hypervisor_test.go
Generated smoke workflowscompiled_lock_files_test.go

Test both definition parsing and the generated installation/execution steps. Include negative cases for unsafe paths, invalid configuration, missing credentials, or malformed logs when relevant.

Validate

After Go changes:

make build
make fmt

After workflow Markdown changes:

make recompile

Run focused go test commands for the changed behavior while iterating. Before an intermediate progress report, run:

make agent-report-progress-no-test

Before the final progress report, run:

make agent-report-progress

Use make agent-finish for the final repository validation when time allows. Do not trigger a smoke workflow from a Copilot cloud agent run.

Completion checklist

  • The declarative path was preferred unless its limitations are documented.
  • The engine definition uses a pinned, verified installation.
  • Authentication, provider/model handling, MCP, and network access are covered.
  • Harnesses and adapters do not expose secrets or interpolate untrusted input.
  • .github/aw/engines.json, smoke workflow, generated lock file, documentation, and changeset are updated when applicable.
  • Focused tests cover parsing and rendered runtime behavior.
  • Repository validation passes.

리뷰

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

댓글

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

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

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

0 / 1,000자

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

같은 저장소의 스킬

Coordinate work across AI agents with shared rules for locating team files, recording decisions and their reasons, and requesting help. It also defines who owns revisions after a reviewer rejects an artifact.

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

  • Locate team files across separate working directories
  • Record decisions that affect other agents
  • Request input from another specialist
github/gh-aw5.4천2026년 10월 20일 업데이트

Set shared development rules for an agent team: keep specific agent names out of product code, tests, and CI configuration, verify affected tests before finishing, and record lessons learned from mistakes.

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

  • Share development rules across multiple agents
  • Keep team-specific agent names out of code and tests
  • Check affected tests before declaring work complete
github/gh-aw5.4천2026년 10월 20일 업데이트

Routes requests to design, create, update, debug, or upgrade GitHub Agentic Workflows to the appropriate instructions. It helps the agent select a workflow-specific procedure and apply any additional rules defined for the repository.

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

  • Designing a new workflow through questions
  • Investigating failed runs and recurring errors
  • Upgrading workflows and addressing deprecations
github/gh-aw5.4천2026년 10월 20일 업데이트

Prepare architecture proposals before implementation so the team can agree on a direction. Organize evidence, technical choices, effects on existing work, risks, and the first release’s scope into a document with clear recommendations and decision owners.

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

  • Proposing a major architecture change
  • Replanning milestones after a foundation change
  • Comparing technical options before seeking approval
github/gh-aw5.4천2026년 10월 20일 업데이트

Update the gh-aw-firewall version used by gh-aw, rebuild generated files, and review release notes and configuration schemas, which define valid settings. It guides related code and test updates while identifying follow-up work that remains.

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

  • Updating the firewall version used by gh-aw
  • Reviewing release notes for integration changes
  • Checking configuration schema differences
github/gh-aw5.4천2026년 10월 20일 업데이트

Review git and gh operations in gh-aw workflows to check credential availability for each repository. Identify missing token handoffs, risky expansions of limited checkouts, and error handling needed where credentials are intentionally unavailable.

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

  • Reviewing git operations after repository checkout
  • Checking tokens for private cross-repository access
  • Reviewing sparse and shallow checkout changes
github/gh-aw5.4천2026년 10월 20일 업데이트

github의 스킬 모두 보기

이 스킬의 문제 신고