Back to list
morodomi

flask-quality

by morodomi

Question-Driven TDD workflow for Claude Code. Risk-based automation: INIT → PLAN → RED → GREEN → REFACTOR → REVIEW → COMMIT

0🍴 0📅 Jan 23, 2026

SKILL.md


name: flask-quality description: Flask品質チェック。pytest-flask/mypy/Black実行時に使用。「Flaskの品質チェック」「Flask テスト」で起動。 allowed-tools: Bash, Read, Grep, Glob

Flask Quality Check

Flask プロジェクトの品質チェックツール。

Commands

ツールコマンド用途
pytestpytestテスト実行(pytest-flask)
mypymypy --strict型チェック
Blackblack .コードフォーマット
isortisort .import整理

Flask-specific Testing

Fixtures (pytest-flask)

Fixture用途
clienttest_client インスタンス
appFlask アプリケーション
app_contextアプリケーションコンテキスト

App Factory Pattern

# conftest.py
import pytest
from myapp import create_app

@pytest.fixture
def app():
    app = create_app()
    app.config.update({"TESTING": True})
    yield app

@pytest.fixture
def client(app):
    return app.test_client()

Usage

テスト実行

# 基本
pytest

# verbose
pytest -v

# 特定ファイル
pytest tests/test_routes.py

# カバレッジ
pytest --cov=src --cov-report=html

API テスト例

def test_get_users(client):
    response = client.get('/api/users')
    assert response.status_code == 200
    assert response.json is not None

def test_create_user(client):
    response = client.post('/api/users', json={
        'name': 'Test User',
        'email': 'test@example.com'
    })
    assert response.status_code == 201

静的解析

# 型チェック
mypy --strict src/

# フォーマット
black .
isort .

Quality Standards

項目目標
mypystrict mode
カバレッジ90%+
black/isortエラー0

Reference

  • 詳細: reference.md

Score

Total Score

70/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon