AgentSkillsCN

modelkg-sdk-maintenance

更新 modelkg_common,并将共享的 SDK 变更同步至各服务(包括导入、依赖、配置与测试)。当您需要引入共享工具、自定义错误处理逻辑、中间件,或开发 HTTP 辅助工具时,此技能尤为适用。

SKILL.md
--- frontmatter
name: modelkg-sdk-maintenance
description: Update modelkg_common and propagate shared SDK changes across services (imports, requirements, configs, and tests). Use when adding shared utilities, errors, middleware, or HTTP helpers.

ModelKG SDK Maintenance

Overview

Keep modelkg_common consistent and ensure all services adopt changes safely.

Use When

  • Adding or changing shared errors, middleware, logging, request context, health, or HTTP helpers.
  • Updating shared settings or environment variable handling.
  • Introducing new shared dependencies used by multiple services.

Workflow

  1. Review the SDK change in modelkg_common/ and confirm the intended API.
  2. Find all services that import or depend on the touched module(s).
  3. Update imports and usage sites across services.
  4. Update dependencies (requirements/pyproject) where needed.
  5. Update service configuration or environment variables if behavior changed.
  6. Add or update tests to cover new SDK behavior in at least one service.
  7. Run the smallest relevant test set and fix any regressions.
  8. If API contracts change, refresh docs/openapi/modelkg-openapi.json.

Safety Checks

  • No circular imports introduced in modelkg_common.
  • Services still start with the updated shared module.
  • Logging and error responses remain consistent.

References

  • modelkg_common/README.md
  • modelkg_common/errors.py
  • modelkg_common/logging.py
  • modelkg_common/middleware.py
  • modelkg_common/http.py
  • modelkg_common/health.py