$ recombobulate _
home / tips / ask-claude-to-write-a-github-actions-workflow-that-matches-your-projects-stack
148

Ask Claude to Write a GitHub Actions Workflow That Matches Your Project's Stack

recombobulate @recombobulate · Mar 30, 2026 · Workflows
ask-claude-to-write-a-github-actions-workflow-that-matches-your-projects-stack

CI config is one of those things that's always slightly wrong the first time — wrong Node version, missing database service, caching that doesn't cache. Claude reads your project and gets it right by building the workflow from what actually exists.

> read my project and create a GitHub Actions workflow that runs
> the linter and tests on every pull request

Claude checks your package.json, composer.json, or equivalent for the language version, build commands, and test scripts. It reads your config to figure out which services you need — MySQL, Redis, Elasticsearch — and sets up the right services block with matching versions.

You can be specific about what you need:

> create a CI workflow that:
> - runs on PRs to main
> - sets up PHP 8.4 with the extensions we use
> - starts MySQL and Redis
> - runs composer install with caching
> - runs Pint to check formatting
> - runs the test suite
> - uploads coverage to codecov

> create a deploy workflow that builds the Docker image and pushes
> to our container registry when we tag a release

Claude generates workflow YAML that uses the correct action versions, sets up proper dependency caching to speed up builds, and configures environment variables from your actual .env.example.

A few things Claude handles that generic templates miss:

  • Service containers — sets up the exact database and cache versions your app uses
  • Caching — configures cache keys that actually invalidate when dependencies change
  • Matrix builds — tests across multiple PHP/Node/Python versions if you need it
  • Conditional steps — only runs expensive steps (deploy, coverage) on the right branches
  • Secrets usage — references secrets by name without exposing values

If you already have a workflow that's flaky or slow, paste it and ask Claude to fix it:

> our CI takes 12 minutes — read the workflow and optimize it for speed

Your CI should match your project, not a template. Claude reads your stack and builds the pipeline to fit.

via Claude Code

~/recombobulate $ tip --comments --count=0

Log in to leave a comment.

~/recombobulate $ tip --related --limit=3
0
Run Claude Code in GitHub Actions to Automatically Review Every Pull Request

Set up Claude Code as an automated reviewer in your CI pipeline — on every pull request, it reads the diff, checks for bugs, security issues, missing tests, and convention violations, then posts its findings as a PR comment. Your human reviewers get a head start because the obvious issues are already flagged before they look.

recombobulate @recombobulate · 1 day ago
0
Ask Claude to Build a Deployment Checklist from Your Actual Infrastructure

Before deploying, tell Claude to read your project — migrations, environment variables, queue workers, scheduled tasks, caching, third-party integrations — and generate a deployment checklist that's specific to your app. Not a generic "did you run migrations?" list, but one that knows YOUR infrastructure and catches the things YOUR deploy can break.

recombobulate @recombobulate · 1 day ago
0
Ask Claude to Generate a README from Your Actual Codebase — Not a Template

Instead of writing a README from memory or copying a template, tell Claude to read your project and generate one that's actually accurate — real setup instructions from your config, real architecture from your directory structure, real API examples from your routes, and real prerequisites from your dependency files.

recombobulate @recombobulate · 1 day ago