javascript-refactoring

Official

Modularize JavaScript for cleaner AI workflows.

Authorgithubnext
Version1.0.0
Installs0

System Documentation

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.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: javascript-refactoring
Download link: https://github.com/githubnext/gh-aw/archive/main.zip#javascript-refactoring

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository