Configures GitHub Actions CI/CD workflows for testing, linting, and deployment. Use when setting up automation for a Python, Rust, or TypeScript project.
Configures GitHub Actions CI/CD workflows for testing, linting, and deployment. Use when setting up automation for a Python, Rust, or TypeScript project.
workflows_dir = Path(".github/workflows")
workflows_dir.mkdir(parents=True, exist_ok=True)
for workflow in required_workflows[language]:
template = templates_dir / language / "workflows" / f"{workflow}.template"
output = workflows_dir / workflow
engine.render_file(template, output)
print(f"✓ Created: {output}")
Verification: Run the command with --help flag to verify availability.
4. Validate Workflows
# Syntax check (requires act or gh CLI)
gh workflow list
# Or manually check YAML syntax
python3 -c "import yaml; yaml.safe_load(open('.github/workflows/test.yml'))"
Verification: Run pytest -v to verify tests pass.
Workflow Best Practices
Use Latest Action Versions
# Good - pinned to major version-uses:actions/checkout@v4-uses:actions/setup-python@v5# Avoid - unpinned or outdated-uses:actions/checkout@v2-uses:actions/setup-python@latest
Verification: Run python --version to verify Python environment.
Shell Script Safety in Workflows
When writing inline shell scripts in workflows, ensure proper exit code handling:
# BAD - pipeline masks exit code-run:|
make typecheck 2>&1 | grep -v "^make\["
echo "Typecheck passed" # Runs even if make failed!
# GOOD - use pipefail-run:|
set -eo pipefail
make typecheck 2>&1 | grep -v "^make\["
# GOOD - capture exit code explicitly-run:|
output=$(make typecheck 2>&1) || exit_code=$?
echo "$output" | grep -v "^make\[" || true
exit ${exit_code:-0}
For complex wrapper scripts, run /pensive:shell-review before integrating.
Updating Workflows
To update workflows to latest versions:
/attune:upgrade-project --component workflows
Verification: Run the command with --help flag to verify availability.
Related Skills
Skill(attune:project-init) - Full project initialization
Skill(sanctum:pr-prep) - PR preparation with CI checks
Exit Criteria
All required workflow files for the detected language exist under .github/workflows/
(Python: test.yml + lint.yml + typecheck.yml; Rust: ci.yml; TypeScript: test.yml + lint.yml +
build.yml) and contain valid YAML syntax verified by
python3 -c "import yaml; yaml.safe_load(open('...'))".
gh workflow list returns each created workflow file as an entry, confirming GitHub
recognizes the workflow definitions.
Any inline shell script in a workflow uses set -eo pipefail or explicit exit-code
capture; pipeline-masked failures (cmd | grep) without pipefail are flagged as errors.
If the project uses a CI platform other than GitHub Actions (GitLab CI, CircleCI), the
skill reports this incompatibility and stops rather than generating GitHub-specific files.