sync-deps — community sync-deps, rss_feed, community, ide skills, Claude Code, Cursor, Windsurf

v1.0.0

关于此技能

非常适合需要自动化依赖管理和同步的Python开发代理。 Synchronises all dependency files from the actual imports in the codebase. Use when asked to update requirements.txt, sync dependencies, update pyproject.toml dependencies, fix requirements, update deps, sync deps, update dependency files, or update renv/environment.yml. Scans all Python source files for third-party imports, resolves PyPI package names, fetches installed versions, then writes requirements.txt and updates pyproject.toml [project.dependencies] — keeping every dep file in sync with a single source of truth.

laceto laceto
[1]
[0]
更新于: 3/11/2026

Killer-Skills Review

Decision support comes first. Repository text comes second.

Reference-Only Page Review Score: 6/11

This page remains useful for operators, but Killer-Skills treats it as reference material instead of a primary organic landing page.

Original recommendation layer Concrete use-case guidance Explicit limitations and caution
Review Score
6/11
Quality Score
48
Canonical Locale
en
Detected Body Locale
en

非常适合需要自动化依赖管理和同步的Python开发代理。 Synchronises all dependency files from the actual imports in the codebase. Use when asked to update requirements.txt, sync dependencies, update pyproject.toml dependencies, fix requirements, update deps, sync deps, update dependency files, or update renv/environment.yml. Scans all Python source files for third-party imports, resolves PyPI package names, fetches installed versions, then writes requirements.txt and updates pyproject.toml [project.dependencies] — keeping every dep file in sync with a single source of truth.

核心价值

赋予代理从源文件中的实际导入中推导出项目的依赖项列表的能力,消除了手动记账和requirements.txt和pyproject.toml之间的漂移,利用诸如依赖扫描和文件格式(如requirements.txt和pyproject.toml)等协议。

适用 Agent 类型

非常适合需要自动化依赖管理和同步的Python开发代理。

赋予的主要能力 · sync-deps

添加或删除包后自动更新依赖项
调试requirements.txt和pyproject.toml之间的依赖漂移
发布前同步依赖文件

! 使用限制与门槛

  • 需要访问源文件和依赖文件
  • 仅限Python项目
  • 需要扫描源文件中的实际导入

Why this page is reference-only

  • - Current locale does not satisfy the locale-governance contract.
  • - The underlying skill quality score is below the review floor.

Source Boundary

The section below is supporting source material from the upstream repository. Use the Killer-Skills review above as the primary decision layer.

实验室 Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

常见问题与安装步骤

以下问题与步骤与页面结构化数据保持一致,便于搜索引擎理解页面内容。

? FAQ

sync-deps 是什么?

非常适合需要自动化依赖管理和同步的Python开发代理。 Synchronises all dependency files from the actual imports in the codebase. Use when asked to update requirements.txt, sync dependencies, update pyproject.toml dependencies, fix requirements, update deps, sync deps, update dependency files, or update renv/environment.yml. Scans all Python source files for third-party imports, resolves PyPI package names, fetches installed versions, then writes requirements.txt and updates pyproject.toml [project.dependencies] — keeping every dep file in sync with a single source of truth.

如何安装 sync-deps?

运行命令:npx killer-skills add laceto/rss_feed/sync-deps。支持 Cursor、Windsurf、VS Code、Claude Code 等 19+ IDE/Agent。

sync-deps 适用于哪些场景?

典型场景包括:添加或删除包后自动更新依赖项、调试requirements.txt和pyproject.toml之间的依赖漂移、发布前同步依赖文件。

sync-deps 支持哪些 IDE 或 Agent?

该技能兼容 Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer。可使用 Killer-Skills CLI 一条命令通用安装。

sync-deps 有哪些限制?

需要访问源文件和依赖文件;仅限Python项目;需要扫描源文件中的实际导入。

安装步骤

  1. 1. 打开终端

    在你的项目目录中打开终端或命令行。

  2. 2. 执行安装命令

    运行:npx killer-skills add laceto/rss_feed/sync-deps。CLI 会自动识别 IDE 或 AI Agent 并完成配置。

  3. 3. 开始使用技能

    sync-deps 已启用,可立即在当前项目中调用。

! 参考页模式

此页面仍可作为安装与查阅参考,但 Killer-Skills 不再把它视为主要可索引落地页。请优先阅读上方评审结论,再决定是否继续查看上游仓库说明。

Imported Repository Instructions

The section below is supporting source material from the upstream repository. Use the Killer-Skills review above as the primary decision layer.

Supporting Evidence

sync-deps

安装 sync-deps,这是一款面向AI agent workflows and automation的 AI Agent Skill。支持 Claude Code、Cursor、Windsurf,一键安装。

SKILL.md
Readonly
Imported Repository Instructions
The section below is supporting source material from the upstream repository. Use the Killer-Skills review above as the primary decision layer.
Supporting Evidence

Sync Dependencies

Derives the project's dependency list from actual imports in source files — one scan, one canonical list, propagated to every dep file. No manual bookkeeping; no drift between requirements.txt and pyproject.toml.

When to Use This Skill

  • User says "update requirements.txt", "sync deps", "fix requirements", "update deps"
  • User says "update pyproject.toml dependencies", "sync dependency files"
  • After adding or removing a package to the project
  • Before a release or a code review

Single Source of Truth

source files (.py, .ipynb)
        │
        ▼
  sync_deps.py   ← ONE scan, ONE canonical list
        │
        ├──▶ requirements.txt
        ├──▶ pyproject.toml  [project.dependencies]
        ├──▶ environment.yml  (if present)
        └──▶ setup.cfg        (if present)

Everything is derived; never edit dep files by hand.


Step 1 — Run the scanner

Run the bundled script from the repo root (not from inside the skill folder):

bash
1python .claude/skills/sync-deps/scripts/sync_deps.py

The script outputs one package>=X.Y line per third-party dependency, sorted alphabetically, to stdout. Capture it:

bash
1python .claude/skills/sync-deps/scripts/sync_deps.py > /tmp/deps_raw.txt

Inspect the output before writing anything. If a package is missing or wrong, update IMPORT_TO_PACKAGE in the script — that is the only place to change.


Step 2 — Write requirements.txt

Replace the full content of requirements.txt at the repo root with:

# Runtime dependencies — generated by sync-deps, do not edit by hand.
# Regenerate with: python .claude/skills/sync-deps/scripts/sync_deps.py
#
<one line per package from stdout, sorted>

Rules:

  • Keep the header comment exactly as shown.
  • Packages are sorted case-insensitively.
  • Dev-only packages (pytest, mypy, ruff, pytest-cov) must not appear here — they belong in pyproject.toml [project.optional-dependencies].dev only.

Step 3 — Update pyproject.toml [project.dependencies]

Read pyproject.toml. Replace the dependencies = [...] list under [project] with the same package list from Step 1, formatted as TOML strings:

toml
1dependencies = [ 2 "package-a>=X.Y", 3 "package-b>=X.Y", 4]

Rules:

  • Preserve all other sections unchanged (surgical edit only).
  • Dev packages stay in [project.optional-dependencies].dev — do not move them.
  • If [project.optional-dependencies].dev is missing, add it with at minimum: ["pytest>=8", "pytest-cov", "mypy", "ruff"].

Step 4 — Update optional dep files (if present)

Scan the repo root for these files and update them if found:

environment.yml (conda)

Update the dependencies: list. Preserve - pip: sub-list structure. Example shape:

yaml
1dependencies: 2 - python>=3.9 3 - pip: 4 - package-a>=X.Y 5 - package-b>=X.Y

setup.cfg

If install_requires exists under [options], replace it with the new list:

ini
1[options] 2install_requires = 3 package-a>=X.Y 4 package-b>=X.Y

Pipfile

If present, update the [packages] section. Do not modify [dev-packages].


Step 5 — Verify and report

After all edits, print a summary:

sync-deps complete
─────────────────────────────────────────
Source files scanned : <N> .py files, <M> .ipynb files
Third-party imports  : <K>
─────────────────────────────────────────
Updated:
  requirements.txt          — <N> packages
  pyproject.toml            — [project.dependencies] (<N> entries)
  environment.yml           — (skipped — not found)
  setup.cfg                 — (skipped — not found)
─────────────────────────────────────────
Packages:
  <sorted package list, one per line>

Import-to-Package Name Map

The script maintains IMPORT_TO_PACKAGE — a dict mapping Python import names to their canonical PyPI package names. This is the only place to fix name mismatches. Never hardcode a mapping elsewhere.

Import namePyPI package
sklearnscikit-learn
PILPillow
cv2opencv-python
yamlPyYAML
bs4beautifulsoup4
dotenvpython-dotenv
faissfaiss-cpu
rank_bm25rank-bm25
langchain_classiclangchain-classic
langchain_corelangchain-core
langchain_communitylangchain-community
langchain_openailangchain-openai

To add a new mapping: edit IMPORT_TO_PACKAGE in scripts/sync_deps.py.


Exclusion Rules

These are never added to requirements.txt:

  • Standard library modules (os, sys, json, …)
  • The project's own package (auto-detected from pyproject.toml [project].name)
  • Dev-only packages: pytest, pytest-cov, mypy, ruff, black, isort
  • Private names (starting with _)
  • Modules in excluded directories: venv/, .venv/, build/, dist/, .eggs/

Troubleshooting

ProblemCauseFix
Package missing from outputImport name not in IMPORT_TO_PACKAGE and not installedAdd mapping to IMPORT_TO_PACKAGE or install the package
Wrong version shownPackage not installed in active venvActivate the correct venv before running
sys.stdlib_module_names not availablePython < 3.10Script falls back to a static stdlib set; update Python if possible
Package appears but shouldn'tImport from a test fixture or example that shadows a real nameAdd it to DEV_ONLY_PACKAGES in the script
pyproject.toml parse errorNon-standard TOML formattingRead the file carefully and apply a surgical edit

相关技能

寻找 sync-deps 的替代方案 (Alternative) 或可搭配使用的同类 community Skill?探索以下相关开源技能。

查看全部

openclaw-release-maintainer

Logo of openclaw
openclaw

Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

333.8k
0
AI

widget-generator

Logo of f
f

为prompts.chat的信息反馈系统生成可定制的插件小部件

149.6k
0
AI

flags

Logo of vercel
vercel

React 框架

138.4k
0
浏览器

pr-review

Logo of pytorch
pytorch

Python中具有强大GPU加速的张量和动态神经网络

98.6k
0
开发者工具