# Flask Quality

> Flask品質チェック。pytest-flask/mypy/Black実行時に使用。「Flaskの品質チェック」「Flask テスト」で起動。

- **Type:** Skill
- **Install:** `agentstack add skill-morodomi-tdd-skills-flask-quality`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [morodomi](https://agentstack.voostack.com/s/morodomi)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [morodomi](https://github.com/morodomi)
- **Source:** https://github.com/morodomi/tdd-skills/tree/main/plugins/tdd-flask/skills/flask-quality

## Install

```sh
agentstack add skill-morodomi-tdd-skills-flask-quality
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Flask Quality Check

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

## Commands

| ツール | コマンド | 用途 |
|--------|---------|------|
| pytest | `pytest` | テスト実行（pytest-flask） |
| mypy | `mypy --strict` | 型チェック |
| Black | `black .` | コードフォーマット |
| isort | `isort .` | import整理 |

## Flask-specific Testing

### Fixtures (pytest-flask)

| Fixture | 用途 |
|---------|------|
| `client` | test_client インスタンス |
| `app` | Flask アプリケーション |
| `app_context` | アプリケーションコンテキスト |

### App Factory Pattern

```python
# 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

### テスト実行

```bash
# 基本
pytest

# verbose
pytest -v

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

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

### API テスト例

```python
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
```

### 静的解析

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

# フォーマット
black .
isort .
```

## Quality Standards

| 項目 | 目標 |
|------|------|
| mypy | strict mode |
| カバレッジ | 90%+ |
| black/isort | エラー0 |

## Reference

- 詳細: `reference.md`

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [morodomi](https://github.com/morodomi)
- **Source:** [morodomi/tdd-skills](https://github.com/morodomi/tdd-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-morodomi-tdd-skills-flask-quality
- Seller: https://agentstack.voostack.com/s/morodomi
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
