agentleFS
hugobatistahugobatista/agent-skills/skills/devops/node-ci/SKILL.md

node-ci

Skill1 starsChanged 53 days agoMITView on GitHub

Creates GitHub Actions CI workflows for Node.js/Bun projects: typecheck (tsc), tests (bun test), draft releases, and npm publish with OIDC trusted publishing.

  • Pipes a download into a shell

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. About 0 are common, 6 are distinctive, and 9 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 9

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    When scaffolding a new Node.js/Bun project, or when adding CI to an existing one:

    line 12
  2. Distinctive:

    Ask the user: *"Will this project be hosted on GitHub?"* If no, skip all CI workflow creation entirely.

    line 16
  3. Very specific:

    Read the repo name from package.json name field (the name with hyphens is the repo name).

    line 17
  4. Very specific:

    Read config.toml from this directory.

    line 18
  5. Very specific:

    Ask the user for the GitHub owner (default: <github_owner from config>)

    line 19
  6. Distinctive:

    Ask the user for the URL base for badge links:

    line 20
  7. Very specific:

    Ask the user: *"Do you want to set up Renovate for automated dependency updates?"* If yes, load the renovate skill and follow its …

    line 24
  8. Very specific:

    If yes, load the renovate skill and follow its instructions for GitHub projects.

    line 25
  9. Distinctive:

    After creating workflow files, add corresponding badges to the top of README.md in a single row.

    line 40
  10. Distinctive:

    Create the directory before writing:

    line 59
  11. Distinctive:

    After the first publish, go to the package on npmjs.com → Settings → Trusted Publisher.

    line 75
  12. Distinctive:

    Delete the classic access token from npm and the secret from GitHub.

    line 77
  13. Very specific:

    Remove always-auth and registry-url from the workflow if present.

    line 78
  14. Very specific:

    If the user prefers classic tokens over OIDC, they can set NODE_AUTH_TOKEN as a repository secret and the workflow falls back to …

    line 82
  15. Very specific:

    After creating workflow files, add the corresponding badges to README.md at the top, below the # <title> line.

    line 86

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

GitHub Actions workflows

When scaffolding a new Node.js/Bun project, or when adding CI to an existing one:

Setup

  1. Ask the user: "Will this project be hosted on GitHub?" If no, skip all CI workflow creation entirely.
  2. Read the repo name from package.json name field (the name with hyphens is the repo name).
  3. Read config.toml from this directory. If it exists, extract github_owner and github_url_base for defaults. If not, ask the user for these values and write them to config.toml (one-time setup).
  4. Ask the user for the GitHub owner (default: <github_owner from config>)
  5. Ask the user for the URL base for badge links:
    • go.<owner>.com/gh (default, e.g. https://<github_url_base from config>)
    • github.com/<owner> (e.g. https://github.com/<github_owner from config>)
    • Custom — user provides their own
  6. Ask the user: "Do you want to set up Renovate for automated dependency updates?" If yes, load the renovate skill and follow its instructions for GitHub projects. This creates renovate.json and optionally .github/workflows/renovate.yml.

Substitute <owner>, <repo>, and <base> in all workflow files and badges using the values gathered above.

Workflow files

  • .github/workflows/lint.yml — always (typecheck via tsc --noEmit)
  • .github/workflows/test.yml — always (bun test)
  • .github/workflows/create_draft_release.yml — only if the user opts in (ask first)
  • .github/workflows/npm.yml — only if the user opts in (ask first)
  • renovate.json — only if the user opted in to Renovate

Badges

After creating workflow files, add corresponding badges to the top of README.md in a single row. The GitHub Tag badge is always added.

BadgeConditionMarkdown
GitHub Tagalways[![GitHub Tag](https://img.shields.io/github/v/tag/<owner>/<repo>?logo=github&label=latest)](<base>/<repo>/releases)
Lintalways[![Lint](https://img.shields.io/github/actions/workflow/status/<owner>/<repo>/lint.yml?label=Lint)](<base>/<repo>/actions/workflows/lint.yml)
Testalways[![Test](https://img.shields.io/github/actions/workflow/status/<owner>/<repo>/test.yml?label=Test)](<base>/<repo>/actions/workflows/test.yml)
npmif opted in[![npm](https://img.shields.io/npm/v/<repo>.svg)](https://www.npmjs.com/package/<repo>)
Renovateif opted in[![Renovate](https://img.shields.io/badge/renovate-enabled-brightgreen?logo=renovatebot)](https://docs.renovatebot.com)

Templates

Each template file lives in assets/. Read the .yml.tmpl with the Read tool, substitute placeholders, then write the result to .github/workflows/<name>.yml:

  • assets/lint.yml.tmpl → lint.yml (no substitutions)
  • assets/test.yml.tmpl → test.yml (no substitutions)
  • assets/create_draft_release.yml.tmpl → create_draft_release.yml (only if user opted in)
  • assets/npm.yml.tmpl → npm.yml (only if user opted in)

Create the directory before writing:

mkdir -p .github/workflows

Action pinning policy

All workflow actions (uses: lines) are pinned to full commit SHAs with a version comment. The pinned version is the latest stable release available for > 30 days, ensuring a vetting window before automated updates are proposed. Renovate's minimumReleaseAge: "30 days" respects this window. To update a pin, find the desired tag's commit SHA via the GitHub API (/repos/{owner}/{repo}/git/ref/tags/{tag}) or the action's release page. Consider setting up Renovate (step 5) to automate these updates.

Bun is installed via the official curl -fsSL https://bun.sh/install | bash script. No third-party action needed. To pin a specific version, pass it as an argument: bash -s "bun-v1.2.0".

npm Trusted Publishing

The assets/npm.yml.tmpl uses npm OIDC trusted publishing (GA since July 2025) instead of long-lived NPM_TOKEN secrets. Setup steps:

  1. First publish must use a classic access token (create on npmjs.com → Account → Access Tokens → read and write).
  2. After the first publish, go to the package on npmjs.com → Settings → Trusted Publisher.
  3. Fill in GitHub owner, repo name, and the workflow filename (npm.yml).
  4. Delete the classic access token from npm and the secret from GitHub.
  5. Remove always-auth and registry-url from the workflow if present.

The workflow strips _authToken from .npmrc before publish to prevent setup-node from interfering with OIDC. It publishes with --provenance for supply chain attestation.

If the user prefers classic tokens over OIDC, they can set NODE_AUTH_TOKEN as a repository secret and the workflow falls back to token-based auth.

README update

After creating workflow files, add the corresponding badges to README.md at the top, below the # <title> line. Badges go in a single row.

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.