在 Manus 中运行任何 Skill
一键导入
一键导入
一键在 Manus 中运行任何 Skill
开始使用api-test-writer
星标3
分支0
更新时间2026年3月24日 07:46
Use when writing API tests in apps/api/tests/
安装
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
SKILL.md
readonly菜单
Use when writing API tests in apps/api/tests/
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | api-test-writer |
| description | Use when writing API tests in apps/api/tests/ |
import pytest
from skillhub_flask.app import create_app
@pytest.fixture
def app(db_session):
app = create_app(testing=True, session_factory=lambda: db_session)
yield app
@pytest.fixture
def client(app):
return app.test_client()
@pytest.fixture
def auth_headers():
token = create_test_jwt(user_id="test-uuid", division="engineering-org")
return {"Authorization": f"Bearer {token}"}
def test_list_skills(client, auth_headers):
response = client.get("/api/v1/skills", headers=auth_headers)
assert response.status_code == 200
data = response.get_json()
assert "items" in data
assert "total" in data
def test_unauthorized_returns_401(client):
response = client.get("/api/v1/users/me")
assert response.status_code == 401
def test_division_enforcement(client, auth_headers_wrong_division):
response = client.post("/api/v1/skills/restricted-skill/install",
headers=auth_headers_wrong_division)
assert response.status_code == 403
mise run test:api:coverage — fails if < 80%.
apps/api/tests/apps/api/tests/conftest.pyapps/api/pyproject.tomlRecord browser-based feature demos as GIFs via Playwright and optionally document them in docs/features/index.md. Trigger with "Demo <feature>" or "Demo and Document <feature>".
Use when creating service modules in apps/api/skillhub/services/
Use when implementing division-based access control on any endpoint
Use when adding services to docker-compose.yml or creating Dockerfiles
Use when implementing error handling across the API, frontend, or MCP server
Use when creating new Flask blueprints in apps/api/skillhub_flask/blueprints/