github-copilot-instructions github-actions-ci-cd-best-practices.instructions.md

A guide to building GitHub Actions workflows, which are automated jobs that test, build, and deploy software. It covers workflow structure, triggers, permissions, secrets, caching, and parallel job setups.

In plain words
What is it for?
Use it when adding or improving continuous integration and delivery workflows in .github/workflows, including testing, releases, and deployments.
Why use it?
It helps create automated pipelines that are easier to understand, more secure, and less wasteful.

Instructions file for GitHub Copilot

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.

agentmods
npx agentmods add instructions/antiotaku/github-copilot-instructions/github-actions-ci-cd-best-practices
Clone the repo
git clone --depth 1 https://github.com/antiotaku/github-copilot-instructions

Made for: GitHub Copilot.

Per session 10,870 This file is loaded in full into every session.
When invoked 10,870 The same file — it is already loaded in full.
Security scan E 2 findings. Scan, not verified.
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 $0.10870 $0.10870
Opus 5 $0.05435 $0.05435
Sonnet 5 $0.02174 $0.02174
Haiku 4.5 $0.01087 $0.01087

Measured 2d ago against content hash 127c0c250613, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade E, and why

github-copilot-instructions github-actions-ci-cd-best-practices.instructions.md scanned grade E with 2 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 2d 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.

Hidden instructionshighPrompt injection

Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.

<!-- End of GitHub Actions CI/CD Best Practices Instructions -->

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- Clean up temporary files immediately after use (`rm -rf` in the same `RUN` command).
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.github/instructions/github-actions-ci-cd-best-practices.instructions.md · 608 lines

How it starts

The opening of the file, as written. The whole thing — 608 lines — stays where its author put it; the contents beside it link to each section on GitHub.

GitHub Actions CI/CD Best Practices

Your Mission

As GitHub Copilot, you are an expert in designing and optimizing CI/CD pipelines using GitHub Actions. Your mission is to assist developers in creating efficient, secure, and reliable automated workflows for building, testing, and deploying their applications. You must prioritize best practices, ensure security, and provide actionable, detailed guidance.

Core Concepts and Structure

1. Workflow Structure (.github/workflows/*.yml)

  • Principle: Workflows should be clear, modular, and easy to understand, promoting reusability and maintainability.
  • Deeper Dive:
    • Naming Conventions: Use consistent, descriptive names for workflow files (e.g., build-and-test.yml, deploy-prod.yml).
    • Triggers (on): Understand the full range of events: push, pull_request, workflow_dispatch (manual), schedule (cron jobs), repository_dispatch (external events), workflow_call (reusable workflows).
    • Concurrency: Use concurrency to prevent simultaneous runs for specific branches or groups, avoiding race conditions or wasted resources.
    • Permissions: Define permissions at the workflow level for a secure default, overriding at the job level if needed.
  • Guidance for Copilot:
    • Always start with a descriptive name and appropriate on trigger. Suggest granular triggers for specific use cases (e.g., on: push: branches: [main] vs. on: pull_request).
    • Recommend using workflow_dispatch for manual triggers, allowing input parameters for flexibility and controlled deployments.
    • Advise on setting concurrency for critical workflows or shared resources to prevent resource contention.
    • Guide on setting explicit permissions for GITHUB_TOKEN to adhere to the principle of least privilege.
  • Pro Tip: For complex repositories, consider using reusable workflows (workflow_call) to abstract common CI/CD patterns and reduce duplication across multiple projects.

Read the full file on GitHub · 608 lines

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. 2d ago First seen · 608 lines · 10,870 tokens per session scan E 127c0c250613

Subscribe to this mod's changes

github-copilot-instructions github-actions-ci-cd-best-practices.instructions.md is an instructions file published in the GitHub repository antiotaku/github-copilot-instructions (1 stars, last pushed 10mo ago), licensed MIT. It adds 10,870 tokens to every session, about $0.0543 per session on Opus 5. A static security scan graded it E with 2 findings (hidden instructions, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.