custom-engine-implementation
Skill5.3k starsChanged 6 months agoMITView on GitHub
Add and test declarative behavior-defined agentic engines in gh-aw, extending Go infrastructure only when necessary.
Trending
Quiet since March.thin dataabout the whole repository
Who's talking about github/gh-aw
- A Hacker News story“GitHub Agentic Workflows”Hacker News · Feb 11, 2026 · 2 points
- @kcieslak.io“We see that a lot in our OSSed AW repository which uses fully agentic development - github.com/github/gh-aw …”Bluesky · Mar 24, 2026 · 1 likes
- @github-trending.bsky.social“🚀 Skyrocketing! 🚀 (200+ new stars) 📦 github / gh-aw ⭐ 2,482 (+213) 🗒 Go GitHub Agentic Workflows”Bluesky · Feb 15, 2026
The biggest 3 of 3 mentions linking to the repository that our crawl found. Each line is their own headline.
In this repository108 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/src/content/docs/engines/claude.mdCLAUDE.md
- pkg/workflow/data/engines/claude.mdCLAUDE.md
- .squad/templates/copilot-instructions.mdCopilot instructions
- playwright-cliSkill
- agentic-workflowsSkill
- awf-release-integratorSkill
- checkout-credential-reviewSkill
- console-renderingSkill
- copilot-reviewSkill
- create-canvasSkill
- custom-agentsSkill
- debugging-workflowsSkill
- developer-code-organizationSkill
- developer-internalsSkill
- developer-releaseSkill
- developer-securitySkill
- developerSkill
- documentationSkill
- error-messagesSkill
- error-pattern-safetySkill
- error-recovery-patternsSkill
- gh-agent-sessionSkill
- gh-agent-taskSkill
- github-copilot-agent-tips-and-tricksSkill
- github-discussion-querySkill
- github-issue-querySkill
- github-labels-querySkill
- github-mcp-serverSkill
- github-pr-querySkill
- github-scriptSkill
- github-workflows-querySkill
- go-codemodSkill
- go-lintersSkill
- http-mcp-headersSkill
- javascript-refactoringSkill
- jqschemaSkill
- messagesSkill
- npmSkill
- open-pull-requestSkill
- operational-value-designerSkill
- optimize-agentic-workflowSkill
- otel-queriesSkill
- pr-finisherSkill
- prompt-token-efficiencySkill
- pr-to-go-linterSkill
- reportingSkill
- resolve-merge-conflictsSkill
- restricted-tool-triageSkill
- review-agentic-workflowsSkill
- security-advisory-compat-enforcerSkill
- sergo-examplesSkill
- skillz-integrationSkill
- ssl-skill-normalizerSkill
- temporary-id-safe-outputSkill
- workflow-step-summariesSkill
- GitHub Agentic WorkflowsSkill
- {skill-name}Skill
- agent-collaborationSkill
- agent-conductSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
29 rules. About 0 are common, 17 are distinctive, and 12 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈17
Distinctive · estimate
This author's own choices. Worth a look.
12
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this skill when adding a new agentic engine definition or extending the behavior-defined engine infrastructure.
- Very specific: line 13
Prefer a shared Markdown engine definition.
- Distinctive: line 18
Only change Go code when the engine needs a reusable behavior that the declarative model cannot express.
- Distinctive: line 38
Read the closest examples before making changes:
- Distinctive: line 50
Use the examples to identify a pattern, not as a reason to copy optional behaviors.
- Distinctive: line 60
Document setup, authentication, model syntax, MCP support, and limitations in the Markdown body.
- Very specific: line 63
Add the engine ID and shared definition path to .github/aw/engines.json.
- Very specific: line 66
Add .github/workflows/smoke-<engine>.md, following the closest existing smoke workflow.
- Very specific: line 69
Update the unsupported sample table in docs/src/content/docs/reference/engines.md.
- Very specific: line 71
Add a changeset when the engine is a user-visible repository sample.
- Very specific: line 73
Run make recompile and include the generated smoke workflow .lock.yml.
- Distinctive: line 82
Keep the definition declarative and minimal:
- Very specific: line 86
Put invocation arguments and non-secret environment variables under behaviors.execution.
- Distinctive: line 88
Use an existing secret strategy and provider environment mode where possible.
- Very specific: line 92
Add only required default domains and map provider-specific domains under behaviors.network.provider-domains.
- Distinctive: line 96
Add a log parser only when its emitted event format can be tested.
- Distinctive: line 98
Treat inline JavaScript in harnesses, configuration adapters, and log parsers as production code.
- Distinctive: line 108
When an engine exposes a generally useful capability that existing behaviors cannot express:
- Very specific: line 111
Add the smallest field to the types in pkg/workflow/engine_definition.go.
- Distinctive: line 115
Add focused tests for parsing, validation, and rendered execution behavior.
- Very specific: line 116
Run make generate-schema-docs when generated schema documentation changes.
- Distinctive: line 118
Do not add a schema field for a behavior that can be represented by existing installation, execution, environment, harness, or adapter …
- Distinctive: line 129
Use tests that match the changed behavior:
- Distinctive: line 142
Test both definition parsing and the generated installation/execution steps.
- Distinctive: line 155
After workflow Markdown changes:
- Very specific: line 161
Run focused go test commands for the changed behavior while iterating.
- Distinctive: line 168
Before the final progress report, run:
- Very specific: line 174
Use make agent-finish for the final repository validation when time allows.
- Distinctive: line 175
Do not trigger a smoke workflow from a Copilot cloud agent run.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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.
| Need | Implementation |
| Existing behaviors are sufficient | Add an imported shared engine definition |
| A reusable declarative behavior is missing | Extend the definition model and behavior-defined runtime |
| The shared runtime is fundamentally unsuitable | Add a dedicated Go engine and register it |
The relevant implementation is in:
pkg/workflow/engine_definition.gofor the definition model and catalogpkg/workflow/behavior_defined_engine.gofor the shared runtimepkg/workflow/engine_definition_loader.gofor embedded built-in definitionspkg/workflow/agentic_engine.gofor dedicated Go engine registrationpkg/parser/schemas/main_workflow_schema.jsonfor 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
- Create
.github/workflows/shared/<engine>.md. - Declare
engine.id,display-name,description,experimental, provider metadata, authentication, and only the requiredbehaviors. - Pin a default CLI version. Make installation deterministic and provide a verification command.
- Document setup, authentication, model syntax, MCP support, and limitations in the Markdown body. Keep in-repository integrations clearly identified as unsupported samples.
- Add the engine ID and shared definition path to
.github/aw/engines.json. Imported behavior-defined engines are registered dynamically; do not add them toNewEngineRegistry(). - 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. - Update the unsupported sample table in
docs/src/content/docs/reference/engines.md. - Add a changeset when the engine is a user-visible repository sample. New
experimental engines have precedent as a
minorchange. - Run
make recompileand 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:
- Add the smallest field to the types in
pkg/workflow/engine_definition.go. - Validate and render it in the focused behavior-defined engine files.
- Update
pkg/parser/schemas/main_workflow_schema.json. - Add focused tests for parsing, validation, and rendered execution behavior.
- Run
make generate-schema-docswhen 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:
| Area | Tests and examples |
| Harness, configuration, MCP, and environment | behavior_defined_engine_harness_test.go |
| Log parsing | behavior_defined_engine_log_parser_test.go |
| Cache behavior | behavior_defined_engine_cache_test.go |
| Definitions, catalog, and known imports | engine_definition_test.go, engine_catalog_test.go |
| Embedded definitions | engine_definition_loader_test.go |
| Real shared workflow harness | aider_workflow_test.go |
| Sandboxed CLI visibility | cloud_hypervisor_test.go |
| Generated smoke workflows | compiled_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 fmtAfter workflow Markdown changes:
make recompileRun focused go test commands for the changed behavior while iterating. Before
an intermediate progress report, run:
make agent-report-progress-no-testBefore the final progress report, run:
make agent-report-progressUse 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.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

