GI

github-script

Covers efficient patterns and standards for utilizing the github-script library within workflow definitions.

Install

mkdir -p .claude/skills/github-script && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/7050" && unzip -o skill.zip -d .claude/skills/github-script && rm skill.zip

Installs to .claude/skills/github-script

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Write robust JavaScript for GitHub Actions github-script steps.
63 charsno explicit “when” trigger
Intermediate

Key capabilities

  • Log information using core.info and core.error
  • Set action outputs and environment variables
  • Write Markdown content to step summaries
  • Handle errors with core.setFailed
  • Format and lint JavaScript code

How it works

It provides best practices for using the GitHub Actions toolkit to log, output data, and generate summaries within JavaScript scripts.

Inputs & outputs

You give it
GitHub Action script logic
You get back
Action execution result

When to use github-script

  • Write GitHub Actions scripts
  • Automate repo maintenance
  • Use github-script safely

About this skill

GitHub Action Script Best Practices

Use these guidelines for JavaScript executed by actions/github-script@v8.

Important Notes

Best Practices

  • Use core.info, core.warning, core.error for logging, not console.log or console.error
  • Use core.setOutput to set action outputs
  • Use core.exportVariable to set environment variables for subsequent steps
  • Use core.getInput to get action inputs, with required: true for mandatory inputs
  • Use core.setFailed to mark the action as failed with an error message

Step Summary

Use core.summary.* function to write output the step summary file.

  • Use core.summary.addRaw() to add raw Markdown content (GitHub Flavored Markdown supported)
  • Make sure to call core.summary.write() to flush pending writes
  • Summary function calls can be chained, e.g. core.summary.addRaw(...).addRaw(...).write()

Common Errors

  • Avoid any type as much as possible, use specific types or unknown instead
  • Catch handler: check if error is an instance of Error before accessing message property
catch (error) {
  core.setFailed(error instanceof Error ? error : String(error));
}
  • core.setFailed also calls core.error, so do not call both

Typechecking

Run make js to run the typescript compiler.

Run make lint-cjs to lint the files.

Run make fmt-cjs after editing to format the file.

When not to use it

  • When using console.log for logging

Limitations

  • Requires adherence to specific toolkit API usage
  • Limited to scripts executed by actions/github-script

How it compares

It emphasizes using the official toolkit methods over standard console methods for better integration with GitHub Actions.

Compared to similar skills

github-script side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
github-script (this skill)13moNo flagsIntermediate
turborepo612moReviewIntermediate
upgrading-expo34moReviewIntermediate
pnpm-upgrade23moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

turborepo

vercel

Turborepo monorepo build system guidance. Triggers on: turbo.json, task pipelines, dependsOn, caching, remote cache, the "turbo" CLI, --filter, --affected, CI optimization, environment variables, internal packages, monorepo structure/best practices, and boundaries. Use when user: configures tasks/workflows/pipelines, creates packages, sets up monorepo, shares code between apps, runs changed/affected packages, debugs cache, or has apps/packages directories.

61191

upgrading-expo

sickn33

Upgrade Expo SDK versions

331

pnpm-upgrade

openai

Keep pnpm current: run pnpm self-update/corepack prepare, align packageManager in package.json, and bump pnpm/action-setup + pinned pnpm versions in .github/workflows to the latest release. Use this when refreshing the pnpm toolchain manually or in automation.

211

pnpm

antfu

Node.js package manager with strict dependency resolution. Use when running pnpm specific commands, configuring workspaces, or managing dependencies with catalogs, patches, or overrides.

421

javascript-pro

sickn33

Master modern JavaScript with ES6+, async patterns, and Node.js APIs. Handles promises, event loops, and browser/Node compatibility. Use PROACTIVELY for JavaScript optimization, async debugging, or complex JS patterns.

86

windsurf-linting-config

jeremylongshore

Configure and enforce code quality with AI-assisted linting. Activate when users mention "configure linting", "eslint setup", "code quality rules", "linting configuration", or "code standards". Handles linting tool configuration. Use when configuring systems or services. Trigger with phrases like "windsurf linting config", "windsurf config", "windsurf".

12

Search skills

Search the agent skills registry