dotfiles/.claude/skills/upstream-audit/SKILL.md
Create or update an upstream contributions page (docs/upstream.md) tracking the project's relationship with its dependencies. Discovers merged PRs, reported issues, workarounds, and declined features.
npx skillsauth add kdeldycke/dotfiles upstream-auditInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
![ -f pyproject.toml ] && grep '^name' pyproject.toml | head -1 || echo "No pyproject.toml"
!git config user.name 2>/dev/null || echo "No git user"
!gh api /user --jq '.login' 2>/dev/null || echo "No gh auth"
![ -f docs/upstream.md ] && grep '^## ' docs/upstream.md || echo "No docs/upstream.md yet"
![ -f docs/upstream.md ] && grep -c 'github.com/' docs/upstream.md || echo 0
You create and maintain docs/upstream.md, which tracks the project's relationship with its upstream dependencies: code contributed back, workarounds provided, issues reported, and features declined.
Fetch this file as reference when building or auditing an upstream page:
kdeldycke/click-extra/docs/upstream.md: tracks ~35 merged PRs across Click, python-tabulate, Pygments, Furo, Cloup, and click-contrib projects, plus upstreamed workarounds, feature-area-grouped workarounds still in place, declined PRs, and open upstream issues.The page uses five sections:
Items are listed as markdown links: - [`#N` - Title](url)
audit (default): Check status of all linked issues/PRs in an existing page and report items that need to move between sections.init: Create docs/upstream.md from scratch by discovering all upstream contributions.refresh: Same as audit, but also apply the changes.sync-git: Scan the git log for upstream references not yet in the document.init)Determine the GitHub username from gh api /user --jq '.login' or git config user.name. Confirm with the user.
Extract dependencies from pyproject.toml (both [project.dependencies] and [project.optional-dependencies]/[dependency-groups]). For each dependency, find its GitHub repository:
pip show <pkg> or https://pypi.org/pypi/<pkg>/jsonuv.lock for source URLsAlso include significant build/test/docs dependencies (Sphinx themes, pytest plugins, linters) that the project interacts with.
For each upstream repo, search for the maintainer's participation:
gh api "repos/{owner}/{repo}/issues?creator={username}&state=all&per_page=100" \
--jq '.[] | "#\(.number) \(.title) [\(.state)] \(.pull_request // empty | "PR") \(.html_url)"'
For repos with many results, also check PRs specifically:
gh search prs --author {username} --repo {owner}/{repo} --limit 50
For PRs: gh pr view <url> --json state,mergedAt,title
For issues: gh issue view <url> --json state,stateReason,title
Search the git log for upstream references not yet found:
git log --all --oneline --grep="github.com/" | head -100
Search the codebase for inline issue references:
grep -rn 'github\.com/.*/\(issues\|pull\)/' src/ lib/ --include="*.py" | grep -v __pycache__
Also check docs/ and any changelog for upstream references.
| Item type | Status | Section | | --------- | ------------------------------------------------------- | ---------------------------- | | PR | merged | Code contributed upstream | | PR | closed, not merged | Declined by upstream | | PR | open | Open upstream | | Issue | closed, this project had workaround, workaround removed | Upstreamed from this project | | Issue | open or closed, this project provides workaround | Addressed by this project | | Issue | closed as not planned | Declined by upstream | | Issue | open, no local workaround | Open upstream |
To determine whether the project has a workaround for an issue, search the codebase for references to that issue URL or number.
Write the document following the five-section structure. Within "Code contributed upstream", group PRs by upstream project and optionally by theme (for projects with many PRs). Within "Addressed by this project", group by feature area rather than by upstream project.
Use the {octicon} title format if sphinx-design is available (check docs/conf.py for the extension):
# {octicon}`git-pull-request` Upstream
audit)For every GitHub URL in the document, check its current state via gh:
gh pr view <url> --json state,mergedAtgh issue view <url> --json state,stateReasonFlag items that need to move:
| Current section | New state | Action | | ------------------------- | ------------------------- | ----------------------------------------------------------------------------------- | | Open upstream | PR merged | Move to "Code contributed upstream" | | Open upstream | Issue closed as completed | Move to "Upstreamed" or "Addressed" depending on whether a local workaround existed | | Open upstream | Closed as not planned | Move to "Declined by upstream" | | Addressed by this project | Fixed upstream | Move to "Upstreamed from this project" |
sync-git)Search for upstream references not yet tracked:
git log --all --oneline --grep="github.com/" | head -100
git log --all --oneline --grep="upstream" | head -50
git log --all --oneline --grep="workaround" | head -50
git log --all --oneline --grep="backport" | head -50
For each new reference, determine which section it belongs to and report it.
For audit, produce a summary:
| Action | Count | | --------------------- | ----- | | Items to move | N | | New items to add | N | | Stale items to remove | N |
Then list each change with: URL, current section, recommended section, reason.
Do not edit the file until the user confirms (except with refresh).
docs/benchmark.mdThe upstream page and the benchmark page both track upstream issues and PRs. When items change status in docs/upstream.md (a gap gets fixed, a workaround gets upstreamed, a PR gets merged), check whether docs/benchmark.md has a corresponding entry in its "Gaps and opportunities" or feature tables that needs updating. Suggest running /benchmark-update audit afterward if upstream changes affect the competitive comparison.
documentation
Detect stale translations in readme.*.md and contributing.*.md files by comparing structure and content against the English source, then draft updated translations for changed sections.
testing
Two-way comparison and synchronization of Sphinx documentation across sibling projects. Discovers discrepancies in conf.py, install.md, index.md toctree, pyproject.toml docs dependencies, extra-deps sections, readme badges, and static assets. Use when you want to align documentation structure, catch stale dependencies, or push improvements across your Sphinx-enabled repositories.
tools
Optimize GitHub topics for discoverability by analyzing competition on topic pages.
development
Run and write YAML test plans for compiled binaries.