javascript-refactoring
Installation
SKILL.md
JavaScript Code Refactoring Guide
Use this guide to refactor JavaScript into separate .cjs files in gh-aw.
Overview
gh-aw uses CommonJS modules (.cjs) for JavaScript in GitHub Actions workflows. These files are:
- Embedded in the Go binary using
//go:embeddirectives - Bundled using a custom JavaScript bundler that inlines local
require()calls - Executed in GitHub Actions using
actions/github-script@v8
Top-Level Script Pattern
Top-level .cjs scripts executed directly in workflows follow this pattern: