github-script

Author and review secure inline JavaScript steps for GitHub Actions via github-script@v8.

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/kjanat/skills --skill github-script-kjanat
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-script
Source: https://github.com/kjanat/skills/tree/main/skills/github-script
Command: npx skills add https://github.com/kjanat/skills --skill github-script-kjanat

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill streamlines the creation and review of secure, inline JavaScript steps within GitHub Actions workflows, ensuring efficient and safe interaction with the GitHub API.

Core Features & Use Cases

  • Secure Script Authoring: Write or review actions/github-script@v8 steps with best practices for security and maintainability.
  • ESM Integration: Encourages the use of modern ECMAScript Modules for better code organization and reuse.
  • Use Case: Automatically add a 'Triage' label to newly opened issues by writing a concise github-script step that leverages context.payload and github.rest.issues.addLabels.

Quick Start

Use the github-script skill to create a GitHub Actions step that logs the current issue number.

Frequently Asked Questions about github-script

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

FAQPage Schema
How do I write secure inline JavaScript for GitHub Actions workflows?

Writing secure inline JavaScript for GitHub Actions involves using `actions/github-script@v8` with safe interpolation, ESM module integration, and efficient API interaction patterns. This approach prevents injection risks while automating dynamic CI/CD pipeline logic.

What is the best way to automate GitHub API calls within a CI/CD pipeline?

Automating GitHub API calls within a CI/CD pipeline is best handled by authoring inline scripts with `actions/github-script@v8`. This method leverages `context.payload` and `github.rest` endpoints for secure, efficient API automation without external dependencies.

Can I use ECMAScript Modules in github-script actions for better code organization?

Yes, you can use ECMAScript Modules in `github-script` actions. ESM integration encourages modern code organization and reuse, allowing you to structure dynamic workflow logic and conditional step execution more efficiently within your GitHub Actions.

How do I automatically add a label to newly opened issues using GitHub Actions?

To automatically add a label to newly opened issues using GitHub Actions, write an inline script step using `actions/github-script@v8`. Access `context.payload` to detect the issue and call `github.rest.issues.addLabels` to apply the 'Triage' label.

Does actions/github-script@v8 support conditional step execution in CI/CD pipelines?

Yes, `actions/github-script@v8` supports conditional step execution in CI/CD pipelines. It enables secure authoring of dynamic workflow logic, allowing scripts to evaluate conditions and interact with the GitHub API to control subsequent pipeline actions.