agentleFS
lgtm-hqlgtm-hq/ai-skills/skills/stand-ci/SKILL.md

stand-ci

Skill1 starsChanged 11 days agoMITView on GitHub

CI/CD and GitHub Actions guidelines. Use when writing workflows or Actions. Shell script code must be in dedicated .sh or .py files. Actions must be pinned to SHAs, not versions.

  • Installs packages

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Add version as comment for readability

    line 36
  2. Distinctive:

    Follow shell script best practices (set -euo pipefail for bash)

    line 86
  3. Distinctive:

    If CI needs to verify that two files agree on the same value, the second file is a derived artifact — generate it, don't validate it.

    line 90
  4. Very specific:

    Treat automation hooks as convenience, not correctness.

    line 100

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

CI/CD Standards

Standards for CI/CD pipelines and GitHub Actions.

GitHub Actions / Workflows

  • Shell script code should NOT be inline in Actions/Workflow YAML files
  • Extract scripts to dedicated .sh or .py files in a scripts/ directory
  • Reference these scripts from the workflow
  • ALWAYS pin actions to full commit SHAs, NOT version tags

Action Pinning

Actions MUST be pinned to SHA hashes for security and reproducibility:

# WRONG - version tag (can be moved, vulnerable to supply chain attacks)
- uses: actions/checkout@v4
- uses: actions/setup-python@v5

# CORRECT - pinned to SHA (immutable, secure)
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0

Finding SHAs

  1. Go to the action's releases page
  2. Click on the version tag
  3. Copy the full commit SHA
  4. Add version as comment for readability

Why

  • Easier to test scripts locally
  • Better syntax highlighting and linting
  • Reusable across workflows
  • Cleaner workflow files
  • Proper version control diffs

Examples

# WRONG - inline script in workflow
jobs:
  build:
    steps:
      - name: Build and deploy
        run: |
          echo "Building..."
          npm install
          npm run build
          if [ -f dist/index.js ]; then
            aws s3 sync dist/ s3://bucket/
          fi

# CORRECT - reference external script
jobs:
  build:
    steps:
      - name: Build and deploy
        run: ./scripts/ci/build-and-deploy.sh

Script Organization

scripts/
└── ci/
    ├── build.sh
    ├── deploy.sh
    ├── test.sh
    └── utils/
        └── helpers.py

Script Requirements

  • Scripts must be executable (chmod +x)
  • Include shebang line (#!/usr/bin/env bash or #!/usr/bin/env python3)
  • Follow shell script best practices (set -euo pipefail for bash)

No Hand-Maintained Mirrors of Canonical Sources

If CI needs to verify that two files agree on the same value, the second file is a derived artifact — generate it, don't validate it.

  • Replace verify-X-sync.py scripts with generate-X.py; CI runs the generator with --check (exit 1 + unified diff on drift) instead of parsing both files and comparing.
  • The same generator runs locally for the writer flow and in CI for the gate flow — a single code path, no parser duplication.
  • Generators consumed by automation (e.g. Renovate postUpgradeTasks) should be stdlib-only so they run in any minimal container without dep installation.
  • Treat automation hooks as convenience, not correctness. The --check gate is the truth-keeper; if the hook silently fails, CI still catches the drift.
# WRONG — verify two files agree
- run: python3 scripts/ci/verify-manifest-sync.py
- run: python3 scripts/ci/verify-tool-version-sync.py

# CORRECT — single generator, single check
- run: python3 scripts/ci/generate-tool-versions.py --check

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.