← Back to list

github-script
by githubnext
GitHub Agentic Workflows
⭐ 309🍴 36📅 Jan 23, 2026
SKILL.md
name: github-script description: Best practices for writing JavaScript code for GitHub Actions using github-script
GitHub Action Script Best Practices
This skill provides guidelines for writing JavaScript files that run using the GitHub Action actions/github-script@v8.
Important Notes
- This action provides
@actions/coreand@actions/githubpackages globally - Do not add import or require for
@actions/core - Reference documentation:
Best Practices
- Use
core.info,core.warning,core.errorfor logging, notconsole.logorconsole.error - Use
core.setOutputto set action outputs - Use
core.exportVariableto set environment variables for subsequent steps - Use
core.getInputto get action inputs, withrequired: truefor mandatory inputs - Use
core.setFailedto 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
anytype as much as possible, use specific types orunknowninstead - 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.setFailedalso callscore.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.
Score
Total Score
70/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
✓人気
GitHub Stars 100以上
+5
✓最近の活動
1ヶ月以内に更新
+10
✓フォーク
10回以上フォークされている
+5
○Issue管理
オープンIssueが50未満
0/5
✓言語
プログラミング言語が設定されている
+5
✓タグ
1つ以上のタグが設定されている
+5
Reviews
💬
Reviews coming soon
