npx machina-cli add skill athola/claude-night-market/workflow-setup --openclawTable of Contents
- When To Use
- Standard Workflows
- Python Workflows
- Rust Workflows
- TypeScript Workflows
- Workflow
- 1. Check Existing Workflows
- 2. Identify Missing Workflows
- 3. Render Workflow Templates
- 4. Validate Workflows
- Workflow Best Practices
- Use Latest Action Versions
- Matrix Testing (Python)
- Caching Dependencies
- Updating Workflows
- Related Skills
Workflow Setup Skill
Set up GitHub Actions workflows for continuous integration and deployment.
When To Use
- Need CI/CD for a new project
- Adding missing workflows to existing project
- Updating workflow versions to latest
- Automating testing and quality checks
- Setting up deployment pipelines
When NOT To Use
- GitHub Actions workflows already configured and current
- Project uses different CI platform (GitLab CI, CircleCI, etc.)
- Not hosted on GitHub
- Use
/attune:upgrade-projectinstead for updating existing workflows
Standard Workflows
Python Workflows
- test.yml - Run pytest on push/PR
- lint.yml - Run ruff linting
- typecheck.yml - Run mypy type checking
- publish.yml - Publish to PyPI on release
Rust Workflows
- ci.yml - Combined test/lint/check workflow
- release.yml - Build and publish releases
TypeScript Workflows
- test.yml - Run Jest tests
- lint.yml - Run ESLint
- build.yml - Build for production
- deploy.yml - Deploy to hosting (Vercel, Netlify, etc.)
Workflow
1. Check Existing Workflows
ls -la .github/workflows/
Verification: Run the command with --help flag to verify availability.
2. Identify Missing Workflows
from project_detector import ProjectDetector
detector = ProjectDetector(Path.cwd())
language = detector.detect_language()
required_workflows = {
"python": ["test.yml", "lint.yml", "typecheck.yml"],
"rust": ["ci.yml"],
"typescript": ["test.yml", "lint.yml", "build.yml"],
}
missing = detector.get_missing_configurations(language)
Verification: Run pytest -v to verify tests pass.
3. Render Workflow Templates
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 pytest -v to verify tests pass.
Matrix Testing (Python)
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
os: [ubuntu-latest, macos-latest, windows-latest]
Verification: Run pytest -v to verify tests pass.
Caching Dependencies
- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip' # Cache pip dependencies
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 initializationSkill(sanctum:pr-prep)- PR preparation with CI checks
Troubleshooting
Common Issues
Command not found Ensure all dependencies are installed and in PATH
Permission errors Check file permissions and run with appropriate privileges
Unexpected behavior
Enable verbose logging with --verbose flag
Source
git clone https://github.com/athola/claude-night-market/blob/master/plugins/attune/skills/workflow-setup/SKILL.mdView on GitHub Overview
Configure GitHub Actions CI/CD workflows to automate testing, linting, and deployment. This skill guides you from verifying existing workflows to rendering templates and validating configurations for quality automation.
How This Skill Works
It starts by listing current workflows with ls -la .github/workflows/. Then it detects the project language and determines required workflows. It renders missing workflow templates into .github/workflows and validates them using commands like gh workflow list or YAML syntax checks to ensure correctness.
When to Use It
- Need CI/CD for a new project
- Adding missing workflows to an existing project
- Updating workflow versions to latest
- Automating testing and quality checks
- Setting up deployment pipelines
Quick Start
- Step 1: Check existing workflows with `ls -la .github/workflows/`.
- Step 2: Identify missing workflows using a language detector and the required_workflows map, then render templates.
- Step 3: Validate workflows with `gh workflow list` and a YAML syntax check (e.g., `python3 -c "import yaml; yaml.safe_load(open('.github/workflows/test.yml'))"`).
Best Practices
- Use Latest Action Versions
- Matrix Testing (Python)
- Pin actions to major versions (e.g., v4, v5) to avoid silent breaks
- Validate Workflows regularly with gh CLI and YAML parsing
- Render and update workflows using the provided templates and verify with tests
Example Use Cases
- Add Python test.yml, lint.yml, and typecheck.yml to a new Python project to automate testing and type checking on push/PR.
- Create rust ci.yml to run the combined test/lint/check workflow for a Rust project.
- Set up TypeScript workflows: test.yml, lint.yml, build.yml, and deploy.yml for end-to-end checks and hosting deployment.
- Upgrade existing workflows to the latest action versions and re-run validation to prevent failures from outdated actions.
- Use gh CLI and YAML syntax checks to verify the new workflows before merging into main.
Frequently Asked Questions
Related Skills
ci-cd
chaterm/terminal-skills
CI/CD 流水线配置
makefile-generation
athola/claude-night-market
Generate language-specific Makefiles with testing, linting, and automation targets. Use for project initialization and workflow standardization. Skip if Makefile exists.
precommit-setup
athola/claude-night-market
Configure three-layer pre-commit system with linting, type checking, and testing hooks. Use for quality gate setup and code standards. Skip if pre-commit is optimally configured.
error-patterns
athola/claude-night-market
'Standardized error handling patterns with classification, recovery,
risk-classification
athola/claude-night-market
'Inline risk classification for agent tasks using a 4-tier model. Hybrid
CI/CD Pipeline Security Expert
martinholovsky/claude-skills-generator
Expert in CI/CD pipeline design with focus on secret management, code signing, artifact security, and supply chain protection for desktop application builds