github-script

github-script is a skill for Claude Code, Codex from github/gh-aw. It costs 15 tokens per session (422 once invoked), scanned A, original, MIT.

Guidance for writing JavaScript inside GitHub Actions steps that use the github-script action. GitHub Actions is GitHub's system for running automated workflows such as tests and deployments.

In plain words
What is it for?
Use it when creating or reviewing github-script steps, including API calls, logging, outputs, failures, and step summaries.
Why use it?
It helps scripts report errors, set outputs and environment variables, and write workflow summaries using the action's provided interfaces.

Skill for Claude CodeCodex ✓ vendor

Written for no agent in particular: nothing here depends on one.

Good fit Use it when creating or reviewing github-script steps, including API calls, logging, outputs, failures, and step summaries.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/github/gh-aw/github-script
About the project

GitHub Agentic Workflows is a GitHub CLI extension that lets developers define AI-assisted repository automation in Markdown and run it through GitHub Actions. It is intended for tasks requiring interpretation or reasoning, such as issue triage, pull-request review, CI investigation, documentation maintenance, and dependency analysis. The catalogue entries provide skills and agents for working with these workflows.

github/gh-aw · 5,406 stars · on GitHub · gh.io

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add github/gh-aw --skill github-script
Clone the repo
git clone --depth 1 https://github.com/github/gh-aw

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for github-script

README.md
[![agentmods](https://agentmods.dev/badge/skills/github/gh-aw/github-script/github.svg)](https://agentmods.dev/skills/github/gh-aw/github-script)
Your own site
<a href="https://agentmods.dev/skills/github/gh-aw/github-script"><img src="https://agentmods.dev/badge/skills/github/gh-aw/github-script/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for github-script

Your own site · 80×15
<a href="https://agentmods.dev/skills/github/gh-aw/github-script"><img src="https://agentmods.dev/badge/skills/github/gh-aw/github-script.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 15 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 422 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00015 $0.00422
Opus 5.5 $0.00006 $0.00169
Sonnet 5.5 $0.00003 $0.00084
Haiku 4.5 $0.00002 $0.00042

Measured 1mo ago against content hash 4976d84ad71f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

github-script scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/skills/github-script/SKILL.md · 54 lines

What it actually says

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.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 54 lines · 15 tokens per session scan A 4976d84ad71f

Subscribe to this mod's changes

github-script is a skill published in the GitHub repository github/gh-aw (5,406 stars, last pushed today), licensed MIT. It adds 15 tokens to every session and 422 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.