test_heng

python-arch-optimizer

開発v1.0.2
作者:test_heng更新日 2026-05-11全 3 バージョン · 最新版の公開日 2026-03-15@clawhub_jjflydudu/python-arch-optimizer
コードレビュースクリプトツール#测试

AlphaMoatによると、2026-09時点でpython-arch-optimizerのダウンロード数は1,455、スター数は1で、AIスキル全体5,078件中4,792位、開発では577件中563位です。

インストール数
266
ダウンロード数
1455
スター数
1
総合順位
#4,792
全体の上位 95% · 開発の上位 98%
プラットフォームインストール数ダウンロード数スター数コメント
ClawHub ↗23957--
SkillHub ↗26614551—

プラットフォームごとに集計方法が異なります。サイト内の合計は各プラットフォームの大きい方の値を使い、合算はしていません。

このスキルでできること

ディレクトリ、依存、インポート、テストの配置を分析して改善案を出します。文書は移行前のプレビューと利用者の確認を求め、バックアップとロールバックの仕組みを説明しています。

資料公開日 2026-10-26

できること

  • Python のディレクトリと依存の変更を計画する

使う場面

  • 既存プロジェクトの構成を整理したいとき

プロンプト例

スキルのドキュメントをもとに生成した例であり、実際の実行結果ではありません。

この Python プロジェクトを確認して再構成案を出してください

利用条件

スキルのドキュメントの記載に基づいて整理したもので、実際のインストールや動作は検証していません。

必要なコマンドラインツール
python

月次の推移

インストール数266
191232272新集計旧集計2026-03 · インストール数 197 (旧集計)2026-05 · インストール数 266 (旧集計)2026-06 · インストール数 266 (旧集計)2026-07 · インストール数 266 (旧集計)2026-08 · インストール数 266 (旧集計)2026-09 · インストール数 26626-0326-09
ダウンロード数1455
3129261540新集計旧集計2026-03 · ダウンロード数 397 (旧集計)2026-05 · ダウンロード数 743 (旧集計)2026-06 · ダウンロード数 866 (旧集計)2026-07 · ダウンロード数 1063 (旧集計)2026-08 · ダウンロード数 1179 (旧集計)2026-09 · ダウンロード数 145526-0326-09
スター数1
-11新集計旧集計2026-03 · スター数 - (旧集計)2026-05 · スター数 1 (旧集計)2026-06 · スター数 1 (旧集計)2026-07 · スター数 1 (旧集計)2026-08 · スター数 1 (旧集計)2026-09 · スター数 126-0326-09

2026-09 以降は新集計(全カタログ集計)、それ以前は旧集計(インストール数が正のスキルのみ、同名スキルを合算)です。両者は直接比較できないため、グラフでは線をつながず、期間をまたぐ増減も計算していません。

月ダウンロード数前月比スター数インストール数
2026-091455—1266
2026-08旧集計1179+10.9%1266
2026-07旧集計1063+22.7%1266
2026-06旧集計866+16.6%1266
2026-05旧集計743—1266
2026-03旧集計397—-197

SKILL.md 原文

作者が公開した元のファイルをテキストのまま表示しています。AlphaMoat による編集や審査はしていません。リンクはクリックできません。コマンドは内容を確認してから実行してください。取得日 2026-10-23。

原文を表示(2.7 KB・ClawHub v1.0.2)
---
name: python-arch-optimizer
description: Python 项目架构优化技能。用于分析和重构 Python 项目结构,使其符合最佳实践。使用场景:(1) 评估现有项目架构,(2) 重构目录结构,(3) 优化依赖管理,(4) 改进代码组织,(5) 建立测试架构,(6) 配置 CI/CD
---

# Python 架构优化器

本技能帮助优化 Python 项目的整体架构,使其更符合现代 Python 工程最佳实践。

## 核心能力

### 1. 目录结构优化
- 按功能/模块划分项目
- 分离配置、业务逻辑、测试
- 符合 PEP 8 和 Python 社区惯例

### 2. 依赖管理
- `requirements.txt` / `pyproject.toml` / `poetry` 配置
- 依赖分类(生产/开发/可选)
- 版本锁定策略

### 3. 代码组织
- 包/模块设计
- 导入结构优化
- 关注点分离

### 4. 测试架构
- pytest 配置
- 测试目录结构
- 覆盖率配置

### 5. 工程化配置
- pre-commit 钩子
- linting 配置(ruff/black/mypy)
- CI/CD 模板

## 工作流程

### 步骤 1: 分析现有架构
```bash
# 使用分析脚本
python scripts/analyze_project.py <project-path>
```

读取项目结构,识别问题:
- 循环依赖
- 过深的嵌套
- 缺失的 `__init__.py`
- 测试覆盖率低
- 配置硬编码

### 步骤 2: 生成优化建议
参考 `references/best-practices.md` 生成具体建议。

### 步骤 3: 执行重构(需用户确认)

**⚠️ 安全警告:** 重构操作会移动/创建文件,可能影响现有项目。

**必须获得用户明确确认后**才能执行迁移脚本:
```bash
# 用户确认后执行(支持:yes / y / 确认 / 是)
python scripts/migrate_project.py <project-path>
```

**回滚策略:**
- 迁移前自动备份到 `<project-path>.backup.<timestamp>/`
- 提供 `--dry-run` 预览变更
- 失败时自动恢复备份

### 步骤 4: 验证
运行测试和 lint 检查确保重构后功能正常。

## 参考文档

- **最佳实践**: `references/best-practices.md` - Python 项目架构详细指南

## 脚本工具

- `scripts/analyze_project.py` - 项目结构分析
- `scripts/generate_structure.py` - 生成推荐结构
- `scripts/migrate_project.py` - 执行迁移(支持 --dry-run 预览、自动备份、回滚)

### 迁移脚本安全机制

```bash
# 1. 预览模式(不会修改任何文件)
python scripts/migrate_project.py ./my-project --dry-run

# 2. 保存计划供审查
python scripts/migrate_project.py ./my-project --plan migration-plan.json

# 3. 用户确认后执行(自动备份)
python scripts/migrate_project.py ./my-project

# 4. 失败时自动回滚到备份
```

## 触发条件

当用户提到:
- "优化 Python 项目结构"
- "重构 Python 代码架构"
- "Python 项目目录怎么组织"
- "改进 Python 工程化"
- "Python 最佳实践"
本サイトで保存したその他のファイル(必要に応じて取得、不完全な場合があります)
  • references/best-practices.md · 4.5 KB
  • skill-card.md · 2.0 KB

開発の人気スキル

Github開発

Interact with GitHub using the gh CLI. Use gh issue, gh pr, gh run, and gh api for issues, PRs, CI runs, and advanced queries.

↓ 38.7万★ 708Peter Steinberger
Multi Search Engine開発

Multi search engine integration with 16 engines (7 CN + 9 Global). Supports advanced search operators, time filters, site search, privacy engines, and Wolfra...

↓ 16.2万★ 763g_pyAng
Mcporter開発

Use the mcporter CLI to list, configure, auth, and call MCP servers/tools directly (HTTP or stdio), including ad-hoc servers, config edits, and CLI/type generation.

↓ 8万★ 204Peter Steinberger
Mermaid Diagram開発

Generate valid Mermaid diagrams like flowcharts, sequence diagrams, mind maps, ER diagrams, or user journeys from text or product descriptions.

↓ 7.3万★ 59pupujanet-eng
YouTube開発

YouTube Data API integration with managed OAuth. Search videos, manage playlists, access channel data, and interact with comments. Use this skill when users want to interact with YouTube. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway). Calls run through the maton CLI with OAuth login, or over raw HTTP with a Maton API key where the CLI cannot be installed. Every call is authenticated as the user's connection and reaches only what that connection's authorization allows, which the provider enforces on every request; the endpoints documented here are the ones this skill uses, and any other endpoint of this app needs the user to ask for it by name. Default to read and list calls, and confirm every write or new connection with the user. This file also documents the three constructs that turn a YouTube connection into automation, in the order they are used: the connection (the first step), a hosted function that runs a YouTube action through the Maton SDK, and a trigger that calls that function on a schedule or on an event. Those sections are the platform's own reference text, shared with the api-gateway skill, with YouTube examples; they add no YouTube capability - YouTube is not an event source, a trigger cannot read YouTube data, and the files under references/<source>/triggers.md are the platform's event catalogues for the sources Maton offers (time, Calendly, GitHub, Gmail, HubSpot, Linear, Notion, Slack, Stripe).

↓ 6.2万★ 145byungkyu
GitHub開発

GitHub API integration with managed OAuth. Access repositories, issues, pull requests, commits, branches, and users. Use this skill when users want to interact with GitHub repositories, manage issues and PRs, search code, or automate workflows. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway). Calls run through the maton CLI with OAuth login, or over raw HTTP with a Maton API key where the CLI cannot be installed. Every call is authenticated as the user's connection and reaches only what that connection's authorization allows, which the provider enforces on every request; the endpoints documented here are the ones this skill uses, and any other endpoint of this app needs the user to ask for it by name. Default to read and list calls, and confirm every write or new connection with the user. This file also documents the three constructs that turn a GitHub connection into automation, in the order they are used: the connection (the first step), a hosted function that runs a GitHub action through the Maton SDK, and a trigger that calls that function on a schedule or on an event. Those sections are the platform's own reference text, shared with the api-gateway skill, with GitHub examples; they add no GitHub capability - GitHub is itself an event source, so its own events are in references/github/triggers.md, and the files under references/<source>/triggers.md are the platform's event catalogues for the sources Maton offers (time, Calendly, GitHub, Gmail, HubSpot, Linear, Notion, Slack, Stripe).

↓ 3.8万★ 53byungkyu
Code開発

計画、実装、検証、テストをカバーするコーディング作業のスキルです。

↓ 3.7万★ 66Iván
Docker Essentials開発

Essential Docker commands and workflows for container management, image operations, and debugging.

↓ 3.7万★ 42Arnarsson

データ月:2026-09 · ダウンロード数、スター数、インストール数は公開スキルレジストリ(ClawHub、SkillHub)から月単位で集計しています。詳しくはデータの方法論をご覧ください。