Setting the skill. One moment.
Skills
Skill 17 of 54
Write robust JavaScript for GitHub Actions github-script steps.
1 minute · 181 words · 6 sections
Install
npx skills add github/gh-aw --skill github-scriptnpx skills add github/gh-awThe first command installs just this skill, by the name in its SKILL.md; the second installs the whole repository.
Use these guidelines for JavaScript executed by actions/github-script@v8.
@actions/core and @actions/github packages globally@actions/corecore.info, core.warning, core.error for logging, not console.log or console.errorcore.setOutput to set action outputscore.exportVariable to set environment variables for subsequent stepscore.getInput to get action inputs, with required: true for mandatory inputscore.setFailed to mark the action as failed with an error messageUse core.summary.* function to write output the step summary file.
core.summary.addRaw() to add raw Markdown content (GitHub Flavored Markdown supported)core.summary.write() to flush pending writescore.summary.addRaw(...).addRaw(...).write()any type as much as possible, use specific types or unknown insteadcatch (error) {
core.setFailed(error instanceof Error ? error : String(error));
}core.setFailed also calls core.error, so do not call bothRun 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.
main, last pushed 24 September 2026.SKILL.md, not by matching a directory convention. 4 distinct layouts observed: .claude/skills/*/SKILL.md, .github/skills/*/SKILL.md, .squad/*/skill.md, SKILL.md (repo root).h1 and no skipped levels:/github/gh-aw.md, and each skill at its own .md URL.