agentleFS
gerrymanoimgerrymanoim/exchange_calendars/.agents/skills/dependencies-management/SKILL.md

dependencies-management

Skill695 starsChanged 5 days agoApache-2.0View on GitHub

Instructions to update project dependencies (including Github actions used by CI workflows). Create a new branch (following the naming convention in @AGENTS.md). IMPORTANT: updating uv MUST NOT be skipped. If the above command fails (e.g. due to a GitHub API rate limit), try the following fallbacks in order until uv --version confirms the latest version is active on PATH: Fallback 1 — official install script (preferred; replaces PATH binary directly): Fallback 2 — pip (use only if curl is unavailable):

  • Pipes a download into a shell
  • Reads credentials
  • Installs packages

The file

Show its rules and text

We split this skill into the rules it gives an agent

19 rules. About 0 are common, 12 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈12

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create a new branch (following the naming convention in @AGENTS.md).

    line 13
  2. Very specific:

    IMPORTANT: updating uv MUST NOT be skipped: If the above command fails (e.g.

    line 22
  3. Very specific:

    Update the rev: pin of each repository in .pre-commit-config.yaml to the repository's latest tag:

    line 59
  4. Distinctive:

    Keep any changes that the hooks make.

    line 71
  5. Very specific:

    Run the test suite under the highest Python version that the project supports (i.e.

    line 75
  6. Distinctive:

    All tests pass and no raised warning is fixable (see *Fixable warnings* section below) → go to step 7 to raise PR.

    line 81
  7. Distinctive:

    all fixable warnings (see *Fixable warnings* section below).

    line 87
  8. Distinctive:

    all tests are passing with the exception of any requiring unreachable services.

    line 94
  9. Distinctive:

    all fixable warnings have been fixed.

    line 95
  10. Distinctive:

    label: Add the 'dependencies' label to the PR.

    line 111
  11. Distinctive:

    All checks green → proceed to step 12.

    line 125
  12. Very specific:

    Use the information read from get_check_runs to identify any OS/python version configurations for which the test suite has failed.

    line 130
  13. Distinctive:

    If the tests failed on specific matrix combinations (e.g.

    line 132
  14. Very specific:

    If necessary use a Docker container with the target OS.

    line 133
  15. Distinctive:

    create a new branch against the repository's master branch.

    line 134
  16. Very specific:

    update the uv package with uv self update.

    line 135
  17. Distinctive:

    Run the test suite to identify failing tests.

    line 139
  18. Distinctive:

    ONLY if any test failures cannot be resolved, raise an issue that references the PR and details:

    line 151
  19. Very specific:

    Call mcp__github__unsubscribe_pr_activity to unsubscribe from the PR activity.

    line 159

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Dependencies Management

Update Dependencies

Instructions to update project dependencies (including Github actions used by CI workflows).

1. Prepare the branch

Create a new branch (following the naming convention in @AGENTS.md).

2. Update the lock file and environment

Update uv:

uv self update --token $GITHUB_TOKEN

IMPORTANT: updating uv MUST NOT be skipped. If the above command fails (e.g. due to a GitHub API rate limit), try the following fallbacks in order until uv --version confirms the latest version is active on PATH:

Fallback 1 — official install script (preferred; replaces PATH binary directly):

curl -LsSf https://astral.sh/uv/install.sh | sh
source $HOME/.local/bin/env  # refresh current shell session
uv --version                 # verify PATH binary is now updated

Fallback 2 — pip (use only if curl is unavailable):

pip install --user --upgrade uv
uv --version   # check if PATH binary was updated

Once uv is up to date, run:

uv lock --upgrade  # update the lock file
uv export --format requirements-txt --no-emit-project --no-hashes --no-dev -o requirements.txt  # sync @requirements.txt with @uv.lock
uv sync --inexact  # update environment to match @uv.lock

3. Update GitHub Actions versions

For each uses: <owner>/<repo>@<version> entry across all files in .github/workflows/, list the repository's tags with the newest version first:

git ls-remote --tags --refs --sort=-v:refname https://github.com/<owner>/<repo>

In each case update the version pin to the tag of any more recent stable release (ignore the tag of any pre-release, for example v8.0.0-rc.1). Preserve the existing pinning style, so if the current pin is a specific version such as @v3.0.1, update to the full latest version string, whilst if it's a major-version tag such as @v4, update to any new major-version tag (if the project no longer publishes a major-version tag then switch to the full semver). Note that the listing places a major-version tag (for example v4) after every full version tag of that major version.

4. Update pre-commit hook versions

Update the rev: pin of each repository in .pre-commit-config.yaml to the repository's latest tag:

uv run pre-commit autoupdate

Then run the hooks against all files:

uv run pre-commit run --all-files

Keep any changes that the hooks make. If a hook reports a violation that the hook cannot fix, fix the violation and run the hooks again.

5. Test

Run the test suite under the highest Python version that the project supports (i.e. the highest version in the python-version list of the matrix in @.github/workflows/build-test.yml).

uv run --python <highest_version> pytest -v

Interpret local test results:

  • All tests pass and no raised warning is fixable (see Fixable warnings section below) → go to step 7 to raise PR.
  • Any test failure or a fixable warning raised → proceed to step 6 to fix.

6. Fix

Any failing tests and fixable warnings will likely have their origin in changes to the dependencies. To provide support for the latest dependencies MAKE REVISIONS to the code base to fix:

  • code causing tests to fail.
  • all fixable warnings (see Fixable warnings section below).

As a general RULE, change the package code to get the tests passing, not the test code! You may make changes to the test code only with good reason and only when this does not impair the test's efficacy.

To facilitate identifying the cause of test failures consider researching the changelogs of updated dependencies for versions released since the previously locked version.

Iterate on this process until:

  • all tests are passing with the exception of any requiring unreachable services.
  • all fixable warnings have been fixed.

IMPORTANT: in this step you should not run the full test suite, rather validate fixes by re-running only the previously failing tests. Example to run a specific test:

uv run --python <highest_version> pytest tests/test_module.py::test_name

7. Raise PR

Once local tests pass, commit all changes to the branch and raise a PR.

  • PR title: Title the PR as Update Dependencies <MM> <DD> (auto) where:
    • <MM> should be replaced with the first three letters of the current month, the first of which should be capitalized.
    • <DD> should be replaced with the current day of the month as represented by two digits. Example title: Update Dependencies Apr 07 (auto)
  • label: Add the 'dependencies' label to the PR.
  • otherwise comply with the package's 'create-pr' skill.

8. Subscribe to PR activity

Raising the PR will trigger GitHub CI workflows. Subscribe to the raised PR's activity.

Proceed to step 9 when you receive events indicating that all triggered workflows have completed. A push to the PR cancels any workflow run in progress for an earlier push. An event for a cancelled workflow run of an earlier push does not indicate completion. Continue to wait for the workflow runs of the latest push.

9. Inspect CI results

The CI workflow will have run the full test suite against a matrix of OS and Python versions. Use mcp__github__pull_request_read with the get_check_runs method to read check statuses for all matrix jobs.

Interpret CI test results:

  • All checks green → proceed to step 12.
  • Any check red → proceed to step 10.

10. Fix tests for specific OS/Python configuration

Use the information read from get_check_runs to identify any OS/python version configurations for which the test suite has failed.

If the tests failed on specific matrix combinations (e.g. Windows / Python 3.10) then simulate a local matching environment.

  • If necessary use a Docker container with the target OS. (To specify different Python versions you will be able to run commands with uv run and pass the --python option.)
  • create a new branch against the repository's master branch.
  • update the uv package with uv self update.
  • overwrite uv.lock with the version previously created by step 2.
  • synchronise the environment by running uv sync.

Run the test suite to identify failing tests. For example:

uv run --isolated --python 3.11 pytest -v

Then find fixes for the failing tests by following step 6.

Finally commit the necessary changes to your original branch (to which previous commits were made). This will trigger the CI on the PR re-run. Return to step 9 (inspect CI results).

11. Fallback: raise an issue

ONLY if any test failures cannot be resolved, raise an issue that references the PR and details:

  • the failing tests
  • any fixes already attempted
  • any suggested next steps.

12. Tidy up

Perform the following 'tidy up' actions:

  • Call mcp__github__unsubscribe_pr_activity to unsubscribe from the PR activity.
  • Review and if necessary update the PR body to reflect the final circumstances.

Fixable warnings Warnings that have their origin in a dependency's code are considered UNFIXABLE and you should not attempt to fix them. All other warnings are considered fixable.

A warning's origin is the file that the warning reports, not the package that issued the warning.

Adding dependencies

# Add a dependency
uv add <package>

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.