github-script

Define best-practice guidelines for JavaScript in GitHub Actions using github-script.

Updated Feb 26, 2026
One-click install
npx skills add https://github.com/kaushal-waygood/agentic-self-healing-ci --skill github-script-kaushal-waygood
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-script
Source: https://github.com/kaushal-waygood/agentic-self-healing-ci/tree/main/skills/github-script
Command: npx skills add https://github.com/kaushal-waygood/agentic-self-healing-ci --skill github-script-kaushal-waygood

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developers writing JavaScript for GitHub Actions using github-script often face inconsistent patterns and potential pitfalls. This Skill provides structured guidelines to ensure reliable, maintainable, and secure scripts.

Core Features & Use Cases

  • Recommends using @actions/core and @actions/github for common tasks such as logging, outputs, and inputs.
  • Outlines safe patterns for logging, outputting results, and propagating data through workflows.
  • Includes guidance on error handling, typechecking, and tooling considerations for TypeScript projects.

Quick Start

Follow these guidelines to structure a simple github-script based action and validate outputs in the GitHub Actions log.

Frequently Asked Questions about github-script

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write robust JavaScript for GitHub Actions using github-script?

Best practices for github-script actions dictate using @actions/core for logging, inputs, and outputs, while avoiding console logs to ensure deterministic workflow execution and maintainable code.

What is the best way to handle logging and outputs in a github-script action?

The best way to handle logging and outputs in github-script actions is to prescribe core.info for logging, core.setOutput for outputs, and core.getInput for inputs, avoiding console logs entirely.

How do I get inputs and set outputs in GitHub Actions JavaScript?

To get inputs and set outputs in GitHub Actions JavaScript, use core.getInput to read workflow inputs and core.setOutput to export results, ensuring proper data propagation through deterministic workflows.

Does github-script work with TypeScript and linting tools?

Yes, github-script supports TypeScript projects and linting. The guidelines include tooling considerations, typechecking, and error handling patterns to ensure safe and maintainable TypeScript workflows.

Why should I avoid console logs in GitHub Actions JavaScript?

You should avoid console logs in GitHub Actions JavaScript because they bypass the Actions toolkit. Using core.info ensures proper integration with GitHub Actions infrastructure and consistent error handling.

What are the limitations of using github-script for workflow interactions?

A limitation of github-script is that it requires strict adherence to @actions/core and @actions/github patterns. Improper error handling or using console logs can break deterministic workflow execution and data propagation.