Skip to content

gpsaggese/helpers / .claude/skills/related_python_packages.create

related_python_packages.create

Verified

Create or update related_python_packages.md for a dir from its content

FileKindSize
SKILL.mdskill md5.1 KB
---
description: Create or update related_python_packages.md for a dir from its content
model: sonnet
---

# Goal

- You are an expert in the Python ecosystem and in technical writing.
- Given a dir `<DIR>`, create or update the file
  `<DIR>/related_python_packages.md`, which lists all the Python packages related to
  the content of `<DIR>`
- Follow the rules `.claude/skills/related_python_packages.rules.md`
- Follow the template `.claude/templates/related_python_packages.template.md`
- Say in the file how it was generated, with the line
  ```markdown
  - Generated by `.claude/skills/related_python_packages.create/SKILL.md`
  ```

# Workflow

## Pick the Mode

- If `<DIR>/related_python_packages.md` exists, update it
  - Read it, and keep every package section that is still valid
- If it does not exist, create it
- If `<DIR>` has a file in an old format, merge its packages into the new file
  - E.g., `packages.md`, `package_list.md`, `package_list.tsv`, `related_packages.md`,
    `<NAME>.packages.md`
  - Rename the old file with `git mv` when it is the main one
  - Delete the other old files with `git rm`, only after every package of the old
    file is in the new file

## Read the Content of the Dir

- List the lectures, slides (`*.smd`), notebooks (`*.ipynb`), markdown files, code,
  `requirements.txt` files, and Dockerfiles of `<DIR>`
- Write down:
  - The topics of the content
  - The lesson tags, e.g., `03.2`, taken from the names of the lecture files
  - The packages that the content names or imports

## Find the Candidate Packages

- Start from the packages that the content names or imports
- For each topic, search the web for the main Python packages
  - Prefer packages with public docs and a GitHub repo
- Keep a package only if a lesson or a project in `<DIR>` can use it
- Drop a package that is not Python, unless it has a Python interface that the content
  uses

## Group the Packages

- Group the packages by primary function into clusters
  - Name each cluster with a short noun phrase
  - Write the function of the cluster in one line
- Put each package in exactly one cluster
- Use 3 to 10 clusters

## Collect the Fields

- Fill all the fields of a package, in the order of the rules
- Collect the stars and the status of each repo:
  ```bash
  > gh repo view <OWNER>/<REPO> --json stargazerCount,isArchived,pushedAt
  ```
- If `gh` is not available, keep the old count with the prefix `~`, or write `N/A`
- Check each URL with `gh repo view` or `curl -sI <URL>`
- Take the labels of `Category` from
  `class_project/project_descriptions/all_projects.md`
  - If the repo has no such file, reuse the labels of the other
    `related_python_packages.md` files
- Take the `Features` from the README or the docs of the package
- Set the `Alternatives` from the packages of the same cluster

## Write the File

- Write the header: the title, the `Generated by` line, `Scope`, and `Stars as of`
- Write the sections of the clusters and of the packages in the order of the rules
- Write the table `Functionality Clusters` last, from the sections
- Wrap the prose at 85 characters, and keep the URLs on one line
- Do not run `lint_text.py` on the file
  - It capitalizes the package names in the headers and in the `Alternatives`
    bullets, e.g., `z3-solver` becomes `Z3-solver`

## Update an Existing File

- Refresh `Stars` and `Status` for every package
- Add the new packages, and place them in the right cluster and position
- Keep the `Features` and `Alternatives` that are correct
- Do not delete a package without a reason
  - If a package is gone from the content, say so in the report and leave it
- Report the changes: the packages added, the packages with a changed status, and the
  fields fixed

## Check the File

- Run the checks of the `# Verification` section
- Fix every failed check

# Constraints

- Do not modify any file other than `<DIR>/related_python_packages.md`
  - Exception: the old-format files that are merged into it
- Do not invent a URL, a star count, a feature, or a package
- Do not commit the changes
- Do not use emojis or the em-dash

# Examples

- A filled file: `book_springer/related_python_packages.md`
- A filled file with lessons: `msml610/tutorials/L03_knowledge_representation/related_python_packages.md`

# Verification

- [ ] The file is named `<DIR>/related_python_packages.md`
- [ ] The first bullet after the title is
      ``- Generated by `.claude/skills/related_python_packages.create/SKILL.md` ``
- [ ] The file has one `#` header
- [ ] Every package has all the fields, in the order of the rules
- [ ] Every package appears in exactly one cluster
- [ ] The packages are ordered by stars inside each cluster
- [ ] The clusters are ordered by the stars of their top package
- [ ] The table `Functionality Clusters` lists exactly the packages of the sections
- [ ] Every name in `Alternatives` matches a `###` header, or has a URL
- [ ] Every `Status` is one of `active`, `maintenance`, `archived`, `not used`,
      `N/A`
- [ ] Every `Category` is a label of `all_projects.md`, or a justified new label
- [ ] No old-format file is left in `<DIR>` with packages that are not in the new file
- [ ] No other file of `<DIR>` changed
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 197kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall