Skip to content
Back to skills

Creating Gha

ASecurity

Creates GitHub Actions for the Marketplace. Use when scaffolding a new action, implementing composite steps, writing BATS tests, or preparing a Marketplace release.

  • 3 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 5, 2026
ai-agentspythongoshellbashtestinggitapisecurity

Works with

  • claude code
  • api

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned November 23, 2026

npx -y skills add qte77/claude-code-plugins --skill creating-gha --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Creating Gha?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Creating Gha
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/qte77-creating-gha/badge)](https://www.skillsdirectory.com/skills/qte77-creating-gha)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: creating-gha
description: Creates GitHub Actions for the Marketplace. Use when scaffolding a new action, implementing composite steps, writing BATS tests, or preparing a Marketplace release.
compatibility: Designed for Claude Code
argument-hint: "[action-name]"
metadata:
  intended-tools: Read, Grep, Glob, Edit, Write, Bash, WebSearch, WebFetch
  stability: stable
  content-hash: sha256:4e77989b5611850e34fead6ec84ebf03caa757a08a63795e59c88fc2b7ad348e
---

# Creating GitHub Actions

**Target**: $ARGUMENTS

Creates a **Marketplace-ready** composite GitHub Action with TDD, signed commits,
and proper release flow.

## References

- `references/marketplace-checklist.md` — action.yaml fields, signed commits, release flow, gotchas
- `references/python-gha-patterns.md` — full Python composite action walkthrough (uv, pyproject.toml, CI)
- `references/companion-plugins.md` — companion plugins by workflow phase (tdd-core, sh-dev, python-dev, security-audit, commit-helper, makefile-core; built-in `/simplify`)

## Marketplace Requirements

See `references/marketplace-checklist.md` for full reference.

**Required `action.yaml` fields:**

- `name` — unique on Marketplace (check before using)
- `description` — shown in search results
- `branding` — `icon` (Feather icon name) + `color` (white/yellow/blue/green/orange/red/purple/gray-dark)

## Scaffold

Pick the layout that matches the action's language:

**Shell-based** (composite with inline `run:` or `scripts/*.sh`):

```text
action.yaml           # composite action definition + branding
scripts/              # extracted shell logic (when inline run: grows too large)
tests/unit/           # BATS test files
.github/workflows/    # ci.yaml (bats + actionlint + shellcheck), release.yaml
README.md             # usage example with @vN, inputs table, version badge
```

**Python-based** (composite calling `uv run`):

```text
action.yaml           # composite action definition + branding
src/                  # Python source (app.py entry point)
tests/                # pytest tests
.github/workflows/    # ci.yaml (pytest + ruff), release.yaml
pyproject.toml        # deps, ruff, bumpversion
uv.lock               # committed, CI uses --frozen
README.md             # usage example with @vN, inputs table, version badge
```

See `references/python-gha-patterns.md` for the full Python walkthrough.

## TDD Workflow

**RED — infra tests first:**

```bash
# tests/unit/test_action.bats
@test "action.yaml exists" { [ -f action.yaml ]; }
@test "action.yaml has name field" { grep -q "^name:" action.yaml; }
@test "action.yaml has description field" { grep -q "^description:" action.yaml; }
@test "action.yaml has branding" { grep -q "^branding:" action.yaml; }
@test "action.yaml has runs.using composite" { grep -q "using: composite" action.yaml; }
```

Run: `bats tests/unit/` — all must fail first.

These are the action-specific checks. For general BATS patterns (`setup`/`teardown`, `run` +
`$status`/`$output`, stubbing `gh`/`curl` on `PATH`) and script conventions, use the companion
**sh-dev** plugin (`testing-shell`, `implementing-shell`) instead of re-deriving them here.

**GREEN — implement to pass:**

Write `action.yaml` with required fields. Add `scripts/` and steps. Run `bats tests/unit/` — all pass.

**VALIDATE:**

```bash
actionlint
shellcheck scripts/*.sh
```

## Commit Flow (protected main — no direct push)

Use signed commit via GitHub API (blob→tree→commit→branch→PR→squash).
See `references/marketplace-checklist.md` for the full bash pattern.

Never `git push` directly to main.

## Release Flow

1. Merge PR to main
2. Trigger `release.yaml` workflow (uses `bump-my-version` with `commit=false tag=false`)
3. Workflow creates `v0.1.0` tag + GitHub Release + floating `v0` tag
4. On GitHub Release page: check "Publish this Action to the GitHub Marketplace"

## Quality Checks

```bash
actionlint
shellcheck scripts/*.sh
bats tests/unit/
```

All must pass before PR creation.

## Repository Security Settings

- **Actions permissions**: allow owner + selected non-owner actions only
- **Commit SHA pinning**: require for all third-party actions
- **Workflow permissions**: read-only default (workflows declare writes explicitly)
- **Artifact/log retention**: 30 days (not default 90)
- **Cache retention**: 7 days, 1 GB limit
- **Fork PR approval**: require for all external contributors
- **Allow Actions to create PRs**: enabled (for bump + data workflows)

## Python GHA Pattern (uv)

```yaml
- uses: astral-sh/setup-uv@v6
  with:
    enable-cache: true
- run: |
    uv sync --frozen --no-dev --project "${{ github.action_path }}"
    uv run --project "${{ github.action_path }}" python "${{ github.action_path }}/src/app.py"
```

Files in this skill

  • SKILL.md4.3 KB
  • references/companion-plugins.md2.4 KB
  • references/marketplace-checklist.md4.6 KB
  • references/python-gha-patterns.md4.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.