What problem does it solve?
This Skill guides developers in refactoring JavaScript code into modular .cjs files within the gh-aw repository, ensuring clean, maintainable, and testable code for GitHub Actions workflows. It helps improve code quality and collaboration for AI-driven automation.
Core Features & Use Cases
- Modular Code Structure: Learn to create new
.cjs files for shared functionality, following clear naming conventions and JSDoc documentation.
- Robust Testing: Implement Vitest for unit testing, including mocking GitHub Actions globals and ensuring test isolation.
- Go Embedding & Bundling: Understand how JavaScript modules are embedded in the Go binary and bundled for execution in GitHub Actions.
- Local
require() Usage: Use CommonJS require() for seamless dependency management within JavaScript files.
- Use Case: A developer has a large JavaScript file with shared utility functions. This skill guides them to extract these functions into a new
my_module.cjs file, create corresponding tests, and integrate it into the Go build system.
Quick Start
Consult the javascript-refactoring skill to create a new format_timestamp.cjs utility module and integrate it into the gh-aw build system.