Skip to main content
rule CX Codex

github-action — Claude Code rule: what it does, how to install

Guides Claude Code in generating GitHub Actions workflows with scoped secrets, composite steps, and upstream version checks.

AGPL-3.0 ★ 267 updated 2026-02-20

Install into Cursor · Manually: put the files in place All methods and platforms ↓
.cursor/rules/github-action.mdc
Open on GitHub

What github-action does

The rule shapes how Claude Code writes CI/CD pipelines. It directs the assistant to scan the project root first, inspecting scripts in package.json, Node versions in .nvmrc, and variable definitions in .env.example. Branch naming is confirmed directly via git branch -a | cat.

Workflows must keep environment variables and tokens bound to jobs rather than declared across the entire workflow. Node modules rely on npm ci. Repeated logic moves into dedicated composite actions in separate files.

At the end of workflow editing, the agent queries GitHub endpoints via curl to grab the latest major releases, verify the source repo is not archived, and inspect action.yml when parameters trigger linter errors. Without network reachability and curl in the terminal, these upstream checks cannot finish.

What it helps with

  • scaffold a GitHub Actions workflow matching local package scripts
  • audit third-party actions against GitHub API for archived status
  • extract duplicate pipeline steps into standalone composite actions
  • scope secrets and environment variables to individual jobs

Example prompts for the agent

  • Create a continuous integration workflow for this project following the github-action rule
  • Review .github/workflows/test.yml and check if any actions are archived or outdated
  • Extract repetitive setup steps from our workflows into a composite action

How to install github-action

Manually: put the files in place

.cursor/rules/github-action.mdc

Frontmatter: description, globs, alwaysApply

Step by step, with commands for each platform: Cursor rules: .mdc files, four modes and what replaced .cursorrules

Questions about github-action

How to install github-action in Claude Code?

Place the rule contents into .claude/rules/github-action.md inside your project directory.

What does the github-action rule enforce?

It enforces job-scoped variables, npm ci for dependency installation, extraction of composite actions, and automated verification of action tags and repository status.

Why does this rule run terminal curl commands?

It queries GitHub APIs to discover the latest major release tag, confirm the repository is not archived, and read raw action.yml files when handling linter issues.

Similar IDE rules

All IDE rules for DevOps and infrastructure →
create-github-action-workflow-specification official github The create-github-action-workflow-specification skill turns an existing GitHub Actions workflow into a formal specification for AI-assisted maintenance and review. CX Codex +1 10,745installs local-action-verification official google-labs-code local-action-verification configures a repository to test GitHub Actions locally using act. It lets agents verify CI checks before opening a pull request or pushing code. CX Codex +1 702installs github-actions callstackincubator Reusable GitHub Actions patterns to build React Native apps for iOS simulators and Android emulators in the cloud and download artifacts. Simplifies CI pipeline setup and scripted retrieval via gh CLI or REST API. CX Codex +1 12,400installs github-actions-hardening official github github-actions-hardening reviews .github/workflows/*.yml against the Actions threat model linters miss: attacker-controlled text pasted into run:, privileged triggers running fork code, unpinned actions. CX Codex +1 2,200installs github-workflow-automation sickn33 github-workflow-automation — a skill that hands the agent patterns for GitHub work: AI-assisted PR review, issue triage, Actions workflows, CI/CD hooks, rebases and cherry-picks. CX Codex +1 1,500installs crontap-replace-github-actions-cron Crontap crontap-replace-github-actions-cron replaces GitHub Actions cron triggers with Crontap HTTP dispatches with IANA timezone support. Eliminates schedule drift while keeping workflows and logs on GitHub. CX Codex +1 1,300installs

From the same set24

The whole set →
shadcn-status-checkpoint shadcn-status-checkpoint — a command that documents implementation progress for UI components in a structured markdown file. Keeps your work history clear when developing complex views across multiple AI conversations. CX Codex +1 ★ 267repo stars astro Guidelines for Claude Code to generate server-side pages and endpoints in Astro. Ensures type safety, middleware handling, and request validation. CX Codex +1 ★ 267repo stars playwright-e2e-testing Enforces Playwright E2E testing standards: Page Object Model, locators, browser context isolation, and parallel runs. CX Codex +1 ★ 267repo stars react-development react-development sets coding standards for React components inside an Astro app: hooks over classes, memoization, Tailwind-driven responsiveness. CX Codex +1 ★ 267repo stars shadcn-resume-implementation shadcn-resume-implementation is a Claude Code command that resumes frontend work from a saved status. It uses the implementation plan, frontend rules, and type definitions. CX Codex +1 ★ 267repo stars shadcn-plan-summary shadcn-plan-summary — a command that captures decisions from UI architecture sessions. Extracts choices about layout, flows, API integration, and state management, then compiles them into a structured report for the next development phase. CX Codex +1 ★ 267repo stars test-plan test-plan is a Claude Code rule that builds a project-specific test plan from the codebase and tech stack. It writes the result in Polish as Markdown. CX Codex +1 ★ 267repo stars supabase-migrations This rule guides Claude Code when creating Supabase SQL migrations, from timestamped filenames to RLS policies. It applies to files under supabase/migrations/. CX Codex +1 ★ 267repo stars

Project sponsors

Companies that keep this analytics open