python-ci
Skill1 starsChanged 53 days agoMITView on GitHub
ALWAYS load alongside the python-project skill for any new or existing Python project. Creates GitHub Actions CI workflows for linting (ruff) and testing (pytest + coverage). Do not skip — CI is a standard part of Python project setup.
- Reads credentials
In this repository28 other files it gives its agents.
- journal-coachSkill
- github-templatesSkill
- node-ciSkill
- renovateSkill
- create-readmeSkill
- markdown-styleSkill
- mermaid-syntaxSkill
- obsidian-vaultSkill
- ste100Skill
- forge-detectSkill
- forgejo-issueSkill
- forgejo-prSkill
- web-frontendSkill
- docker-pythonSkill
- pyproject-tomlSkill
- python-cliSkill
- python-devcontainerSkill
- python-projectSkill
- architecture-briefSkill
- design-advisorSkill
- saas-anti-pattern-reviewSkill
- saas-transition-chain-reviewSkill
- saas-transition-reviewSkill
- saas-transition-strategySkill
- security-reviewerSkill
- technical-debt-reviewSkill
- commit-messageSkill
- discord-sendSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 5 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
When scaffolding a new Python project, or when adding CI to an existing one:
- Distinctive: line 16
Ask the user: *"Will this project be hosted on GitHub?"* If no, skip all CI workflow creation entirely.
- Very specific: line 17
Read the repo name from pyproject.toml [project].name (the name with hyphens is the repo name)
- Very specific: line 18
Read config.toml from this directory.
- Very specific: line 19
Ask the user for the GitHub owner (default: <github_owner from config>)
- Distinctive: line 20
Ask the user for the URL base for badge links:
- Very specific: line 24
Ask the user: *"Do you want to set up Renovate for automated dependency updates?"* If yes, load the renovate skill and follow its …
- Very specific: line 25
If yes, load the renovate skill and follow its instructions for GitHub projects.
- Distinctive: line 40
After creating workflow files, add corresponding badges to the top of README.md in a single row.
- Distinctive: line 59
Create the directory before writing:
- Very specific: line 70
After creating workflow files, add the following section to README.md so contributors can run CI workflows locally with act.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
GitHub Actions workflows
When scaffolding a new Python project, or when adding CI to an existing one:
Setup
- Ask the user: "Will this project be hosted on GitHub?" If no, skip all CI workflow creation entirely.
- Read the repo name from
pyproject.toml[project].name(the name with hyphens is the repo name) - Read
config.tomlfrom this directory. If it exists, extractgithub_ownerandgithub_url_basefor defaults. If not, ask the user for these values and write them toconfig.toml(one-time setup). - Ask the user for the GitHub owner (default:
<github_owner from config>) - Ask the user for the URL base for badge links:
go.<owner>.com/gh(default, e.g.https://<github_url_base from config>)github.com/<owner>(e.g.https://github.com/<github_owner from config>)- Custom — user provides their own
- Ask the user: "Do you want to set up Renovate for automated dependency updates?"
If yes, load the
renovateskill and follow its instructions for GitHub projects. This createsrenovate.jsonand optionally.github/workflows/renovate.yml.
Substitute <owner>, <repo>, <package>, and <base> in all workflow files and badges using the values gathered above.
Workflow files
.github/workflows/lint.yml— always.github/workflows/test.yml— always.github/workflows/pypi.yml— only if the user opts in (ask first).github/workflows/create_draft_release.yml— only if the user opts in (ask first)renovate.json— only if the user opted in to Renovate
Badges
After creating workflow files, add corresponding badges to the top of README.md in a single row. The GitHub Tag badge is always added.
| Badge | Condition | Markdown |
| GitHub Tag | always | [](<base>/<repo>/releases) |
| Lint | always | [](<base>/<repo>/actions/workflows/lint.yml) |
| Test | always | [](<base>/<repo>/actions/workflows/test.yml) |
| PyPI | if opted in | [](https://pypi.org/project/<package>) |
| Renovate | if opted in | [](https://docs.renovatebot.com) |
Templates
Each template file lives in assets/. Read the .yml.tmpl with the Read tool, substitute placeholders, then write the result to .github/workflows/<name>.yml:
assets/lint.yml.tmpl→lint.yml(no substitutions)assets/test.yml.tmpl→test.yml(no substitutions)assets/pypi.yml.tmpl→pypi.yml(only if user opted in)assets/create_draft_release.yml.tmpl→create_draft_release.yml(only if user opted in)
Create the directory before writing:
mkdir -p .github/workflowsAction pinning policy
All workflow actions (uses: lines) are pinned to full commit SHAs with a version comment. The pinned version is the latest stable release available for > 30 days, ensuring a vetting window before automated updates are proposed. Renovate's minimumReleaseAge: "30 days" respects this window. To update a pin, find the desired tag's commit SHA via the GitHub API (/repos/{owner}/{repo}/git/ref/tags/{tag}) or the action's release page. Consider setting up Renovate (step 4) to automate these updates.
README update
After creating workflow files, add the following section to README.md so contributors can run CI workflows locally with act.
### Local CI with act
Requires [act](https://github.com/nektos/act) and a modern runner image:
```bash
# One-time setup
act -P ubuntu-latest=catthehacker/ubuntu:act-latest
```
```bash
# Lint and tests (triggered on push)
act -P ubuntu-latest=catthehacker/ubuntu:act-latest -W .github/workflows/lint.yml
act -P ubuntu-latest=catthehacker/ubuntu:act-latest -W .github/workflows/test.yml
# PyPI publish (workflow_dispatch — needs GITHUB_TOKEN)
act workflow_dispatch -P ubuntu-latest=catthehacker/ubuntu:act-latest \
-W .github/workflows/pypi.yml -s GITHUB_TOKEN=<token>
# Create draft release (workflow_dispatch — needs GITHUB_TOKEN)
act workflow_dispatch -W .github/workflows/create_draft_release.yml \
-s GITHUB_TOKEN=<token>
```
Replace `<token>` with a GitHub classic PAT with `repo` scope.(The block above is 4-space indented. Strip the leading 4 spaces from each line and write the result to README.)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

