AGENT SKILL

ams-github-actions-templates

暂无简介

License 许可
MIT
所属仓库
TanNhatCMS/jarvis
最近更新
2026-11-07
Stars
★ 0
Forks
1

03 SKILL.md 正文

GitHub Actions Templates

Overview

Most GitHub Actions workflows are variations on a few proven patterns: CI (build/test/lint), release (tag -> publish), deploy (environments + approvals), scheduled (cron jobs).

Templates encode the hard-won details: caching, concurrency, permissions scoping, artifact handling, failure notifications.

This skill provides the patterns and the adaptation checklist — copy the shape, adjust the specifics.

When to use

  • Setting up CI for a new repository
  • Standardizing Actions across many repos
  • Release and deployment pipelines on GitHub
  • Scheduled maintenance jobs (dependency updates, reports)
  • Reviewing or auditing existing workflow files

Core concepts

  • CI template shape. Triggers: PR + push to main. Jobs: lint, test (matrix across versions), build. Concurrency: cancel in-progress on new push. Permissions: least privilege.
  • Caching pattern. Cache dependencies by lockfile hash. Restore keys for partial hits. Cache saves minutes per run — the highest-ROI optimization.
  • Matrix builds. Test across OS/version matrix with fail-fast false for full signal. Keep matrix tight — each cell costs minutes.
  • Release template shape. Trigger: version tag. Jobs: build artifacts, generate changelog, create GitHub Release, publish (npm/PyPI/docker). Manual approval for prod publishes.
  • Deploy template shape. Environments (staging/prod) with protection rules and required reviewers. Secrets per environment. Deployment status reported back.
  • Scheduled template shape. Cron trigger, concurrency guard (no overlapping runs), failure notifications. For reports, cleanups, syncs.
  • Reusable workflows. Common jobs (setup, lint, test) as reusable workflows in a central repo. Called via workflow_call. Update once, propagate everywhere.
  • Composite actions. Repeated step sequences as composite actions. Smaller than reusable workflows; ideal for setup-like steps.

Practical workflow

  1. Pick the template. CI, release, deploy, or scheduled — start from the closest pattern, not a blank file.
  2. Adapt triggers. Narrow to needed events/branches/paths. Path filters prevent irrelevant runs (docs-only changes shouldn't run full CI).
  3. Scope permissions. Set least-privilege at workflow and job level. Contents: read default; add only what's needed.
  4. Add caching. Dependency cache keyed on lockfile. Verify cache hits in logs — misconfigured caching silently does nothing.
  5. Pin action versions. Third-party actions pinned to SHAs (or at least major versions). Supply-chain safety from day one.
  6. Set concurrency. Cancel-in-progress for PR builds; no-overlap guards for deploys and scheduled jobs.
  7. Wire notifications. Failure alerts to the team channel. Silent failures in CI are how broken mains happen.
  8. Extract reusables. After the third copy-paste across repos: reusable workflow or composite action in a shared repo.

Common pitfalls

  • Copy-paste without understanding. Templates adapted blindly keep wrong assumptions (paths, secrets, triggers). Read every line you adopt.
  • Unpinned actions. Floating versions = supply-chain risk + surprise breakage. Pin everything third-party.
  • Overbroad permissions. Write-all defaults. A compromised workflow with broad tokens is a repo takeover.
  • No concurrency control. Ten PR pushes = ten full CI runs queued. Cancel-in-progress for PRs; it's free.
  • Cache misconfiguration. Cache keys that never hit (wasted upload time) or hit wrongly (stale deps). Verify hits in logs.
  • Slow feedback loops. 30-minute CI on every PR. Parallelize jobs, cache aggressively, split slow suites. Speed is a feature.
  • Secrets sprawl. Same secret copy-pasted across 20 repos. Environment/organization secrets with least privilege.
  • No failure visibility. Red builds nobody notices. Notifications + branch protection on required checks = accountability.

04 同仓库更多 Skills

TanNhatCMS
TanNhatCMS/jarvis

web-scrape

Turn web pages into LLM-ready markdown via the Firecrawl API (renders JS, anti-bot handling). Use when browser_open/fetch fails on JS-heavy pages, or when you need clean markdown/structured extraction from a site. Requires FIRECRAWL_API_KEY.

★ 0
TanNhatCMS
TanNhatCMS/jarvis

design-taste-frontend

tasteskill v2, the anti-slop frontend skill. Art direction for websites, distilled from a study of 247 curated gallery sites (One Page Love, Awwwards Sites of the Day). Deals researched directions (idea, composition, type, palette, photographs, section blueprints) from a library, enforces a strict no-slop house style with a real-browser inspector, and runs a look-and-fix loop on screenshots. Use this whenever you build, design, redesign, restyle, polish or review a landing page, marketing site, portfolio, product page, one-pager, hero or any public-facing web page, in any stack (HTML/CSS, React, Next.js, Vue, Svelte, Astro, Tailwind) — also when the user says a page looks generic, templated, "AI-made", sloppy, or asks to make it look designed, premium, award-level or less like every other site. Not for dashboards or app screens.

★ 0
TanNhatCMS
TanNhatCMS/jarvis

test-driven-development

Use when implementing any feature or bugfix, before writing implementation code

★ 0
TanNhatCMS
TanNhatCMS/jarvis

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes

★ 0
TanNhatCMS
TanNhatCMS/jarvis

requesting-code-review

Use when completing tasks, implementing major features, or before merging to verify work meets requirements

★ 0
TanNhatCMS
TanNhatCMS/jarvis

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).

★ 0