ci-cd-config-sync
Automatically updates CI/CD pipeline configurations when you modify dependencies, Docker, or environment settings.
Install
mkdir -p .claude/skills/ci-cd-config-sync && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/15923" && unzip -o skill.zip -d .claude/skills/ci-cd-config-sync && rm skill.zipInstalls to .claude/skills/ci-cd-config-sync
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Detect codebase changes and suggest GitHub Actions CI/CD config updates. Use when: adding dependencies (composer/npm), creating new Laravel features, changing environment variables, modifying Docker Compose, or adding tests. Analyzes changes and proposes workflow updates to keep CI/CD in sync with your project.Key capabilities
- →Detect changes in composer.json or package.json for dependency updates
- →Identify new Laravel features for test discovery and coverage updates
- →Recognize changes in environment variables or configuration files
- →Detect modifications in Docker Compose services
- →Propose updates for GitHub Actions workflows based on detected changes
- →Suggest adding security vulnerability checks for new dependencies
How it works
The skill analyzes changed files to categorize them by impact, catalogs existing GitHub Actions workflows, and then suggests specific updates based on the change type.
Inputs & outputs
When to use ci-cd-config-sync
- →Adding new PHP dependencies
- →Updating Docker Compose services
- →Adding CI tests
- →Syncing environment variables
About this skill
CI/CD Config Sync
Automatically detect project changes and synchronize GitHub Actions workflows with your codebase.
When to Use This Skill
Trigger this skill when:
- ✅ Installing new PHP/Node dependencies (
composer require,npm install) - ✅ Adding new Laravel features (models, controllers, migrations, jobs)
- ✅ Changing environment variables or configuration
- ✅ Modifying Docker Compose services or configuration
- ✅ Adding new test files or changing test suite structure
- ✅ Adding scheduled tasks or background jobs
- ✅ Changing database schema or seed data
Example prompts:
- "I added Pest tests for my feature. Update CI/CD to run them on push."
- "We're adding Redis to Docker Compose. Update the workflows accordingly."
- "Added a Laravel job queue. Update CI config to handle async jobs."
- "Added new environment variables. Sync the CI setup."
Skill Workflow
Step 1: Analyze Change Files
First, identify which files changed and categorize them:
| File Pattern | Category | CI Impact |
|---|---|---|
composer.json / package.json | Dependencies | Install steps, versions |
app/Models/, app/Actions/, app/Http/Controllers/ | Features | Test discovery, coverage |
.env*, config/ | Configuration | Env setup, secrets |
docker-compose.yml | Services | Service startup, health checks |
tests/ | Tests | Test commands, coverage |
database/migrations/, database/seeders/ | Database | Migration verification |
app/Jobs/ | Queue | Job testing, verification |
routes/ | Routes | Route validation |
Step 2: Catalog Current Workflows
Check .github/workflows/ for existing workflows:
ls -la .github/workflows/
Document each workflow's:
- Name: What it does (e.g.,
tests.yml,deploy.yml) - Trigger: When it runs (push, pull_request, schedule)
- Steps: What it executes (install, test, build, deploy)
- Env setup: Which environment variables it uses
Step 3: Suggest Updates by Change Type
New Dependencies (composer.json / package.json)
- Check: PHP version constraints, Node version constraints
- Update: Install step to include
composer install/npm install - Add: Lock file validation (composer.lock / package-lock.json)
- Verify: Check if new packages bring dev tools (PHPStan, ESLint, Prettier)
Suggested workflow updates:
- name: Validate dependency changes
run: |
composer install --no-scripts
npm install
- name: Check for security vulnerabilities
run: |
composer audit
npm audit
New Laravel Features (Models, Controllers, Migrations, Actions)
- Check: If features include new migrations, jobs, or policies
- Update: Test discovery to include feature tests
- Add: Migration validation step if
database/migrations/changed - Verify: Check if new models need factories or seeders
Suggested workflow updates:
- name: Run Laravel migrations
run: php artisan migrate --force
- name: Validate models and policies
run: php artisan model:show
- name: Run feature tests
run: php artisan test tests/Feature --compact
Environment Changes (.env, config/)
- Check: Which environment variables are new
- Update: CI workflow .env setup or GitHub Secrets
- Add: Env validation before tests run
- Verify: Check for database credentials, API keys, secrets
Suggested workflow updates:
- name: Validate environment configuration
run: |
php artisan config:cache
php artisan config:show app
- name: Verify all required env vars
run: php artisan tinker -e "echo config('app')"
Docker Compose Changes
- Check: New services (Redis, Postgres, Minio, etc.)
- Update: Service startup in CI workflow
- Add: Health check verification
- Verify: Port conflicts, service dependencies
Suggested workflow updates:
- name: Start Docker services
run: docker-compose up -d
- name: Wait for services
run: |
docker-compose exec -T postgres pg_isready || sleep 5
docker-compose exec -T redis redis-cli PING || sleep 5
- name: Run database setup
run: |
docker-compose exec -T app php artisan migrate
Test Suite Changes (tests/)
- Check: New test files, new test patterns (Feature, Unit, Browser)
- Update: Test command to discover all tests
- Add: Coverage reporting if tests added
- Verify: Check for new test dependencies (Pest, Dusk, etc.)
Suggested workflow updates:
- name: Run all tests
run: php artisan test --compact --coverage
- name: Upload coverage reports
uses: codecov/codecov-action@v3
with:
files: ./coverage/coverage.xml
Step 4: Validation Checklist
Before applying changes, verify:
- All new dependencies are installable without errors
- New PHP features follow Laravel conventions
- Environment variables don't expose secrets in logs
- Docker services are accessible and healthy
- Tests pass locally AND in CI environment
- Migrations can run fresh and rollback
- Coverage hasn't decreased significantly
- CI/CD workflow file syntax is valid (check with
yqor online validator)
Step 5: Apply and Test
- Create/update
.github/workflows/files with suggested changes - Validate workflow syntax:
yamllint .github/workflows/*.yml - Commit changes and push to test on CI
- Monitor first workflow run for errors
- Iterate if any configuration tweaks needed
Common Patterns
Pattern: Multi-PHP Version Testing
When adding PHP version constraints:
strategy:
matrix:
php-version: ['8.2', '8.3']
runs-on: ubuntu-latest
steps:
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
Pattern: Database Service Setup
When Docker Compose adds a database:
services:
postgres:
image: postgres:15-alpine
env:
POSTGRES_PASSWORD: ${{ secrets.DB_PASSWORD }}
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
Pattern: Cache Management
When caching dependencies:
- uses: actions/cache@v3
with:
path: |
vendor
node_modules
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Pattern: Artifact Uploads
When adding coverage or build artifacts:
- uses: actions/upload-artifact@v3
if: always()
with:
name: test-coverage
path: coverage/
Workflow Examples
Complete Test Workflow
name: Tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15-alpine
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
steps:
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
- run: composer install
- run: npm install
- run: php artisan migrate --force
- run: php artisan test --compact --coverage
Linting & Code Quality Workflow
name: Code Quality
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
- run: composer install
- run: vendor/bin/pint --check
- run: npm install
- run: npm run lint
Troubleshooting
Q: Workflow fails with "Command not found"
- A: Check if the tool is installed in the GitHub Actions runner. Add explicit install step.
Q: Tests pass locally but fail in CI
- A: Check for environment differences (PHP version, extensions, services running, database state).
Q: Migrations fail in CI but pass locally
- A: CI runs fresh database. Check for: missing migrations, hardcoded paths, local-only config.
Q: Service can't connect in CI
- A: Services are in separate containers. Use service name (e.g.,
postgresnotlocalhost). Useoptions: --health-cmdfor startup validation.
Next Steps
After using this skill, consider:
- Adding coverage reports with Codecov integration
- Setting up deployment workflows for staging/production
- Adding security scanning (dependabot, code scanning)
- Creating cron-based maintenance jobs (database cleanup, log rotation)
- Setting up notification workflows (Slack alerts, email on failure)
When not to use it
- →When no codebase changes are made that impact CI/CD configuration
- →When manual CI/CD configuration is preferred
Limitations
- →Limited to suggesting GitHub Actions CI/CD config updates
- →Relies on specific file patterns for change categorization
- →Requires manual verification of suggested changes before application
How it compares
This workflow automatically proposes CI/CD configuration changes synchronized with codebase modifications, reducing the manual effort and potential for human error in keeping workflows up-to-date.
Compared to similar skills
ci-cd-config-sync side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| ci-cd-config-sync (this skill) | 0 | 3mo | Review | Intermediate |
| github-actions-templates | 7 | 4mo | No flags | Intermediate |
| upgrade-deps | 0 | 2mo | No flags | Advanced |
| cli-commands | 2 | 2mo | No flags | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
github-actions-templates
wshobson
Create production-ready GitHub Actions workflows for automated testing, building, and deploying applications. Use when setting up CI/CD with GitHub Actions, automating development workflows, or creating reusable workflow templates.
upgrade-deps
obot-platform
Upgrade dependencies and runtimes safely, run CI, and report higher-risk options.
cli-commands
windmill-labs
MUST use when using the CLI.
toolhive-release
stacklok
Creates ToolHive release PRs by analyzing commits since the last release, categorizing changes, recommending semantic version bump type (major/minor/patch), and triggering the release workflow. Use when cutting a release, preparing a new version, checking what changed since last release, or when the user mentions "release", "version bump", or "cut a release".
prowler-ci
prowler-cloud
Helps with Prowler repository CI and PR gates (GitHub Actions workflows). Trigger: When investigating CI checks failing on a PR, PR title validation, changelog gate/no-changelog label, conflict marker checks, secret scanning, CODEOWNERS/labeler automation, or anything under .github/workflows.
bazel-build-optimization
wshobson
Optimize Bazel builds for large-scale monorepos. Use when configuring Bazel, implementing remote execution, or optimizing build performance for enterprise codebases.