用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill fai-pytest-coverage命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | fai-pytest-coverage |
| description | Generates pytest test suites with fixtures, parametrize, mocks, and coverage configuration. |
| metadata | {"author":"frootai"} |
name: fai-pytest-coverage description: "Generate Python pytest test suites with fixtures, parametrization, mocking (pytest-mock), and coverage reports." waf: ["Reliability", "Operational Excellence"] plays: ["32-test-generation", "24-code-assistant"]
Generates pytest test suites with fixtures, parametrize, mocks, and coverage configuration.
This skill provides a structured, repeatable procedure for generates pytest test suites with fixtures, parametrize, mocks, and coverage configuration.. It can be used standalone as a LEGO block or auto-wired inside solution plays via the FAI Protocol.
Category: Testing Complexity: Medium Estimated Time: 10-30 minutes
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
target | string | Yes | — | Target resource, file, or endpoint |
environment | enum | No | dev | Target environment: dev, staging, prod |
verbose | boolean | No | false | Enable detailed output logging |
dry_run | boolean | No | false | Validate without making changes |
config_path | string | No | config/ | Path to configuration directory |
Verify all required tools, credentials, and dependencies are available.
# Check required tools
command -v node >/dev/null 2>&1 || { echo 'Node.js required'; exit 1; }
command -v az >/dev/null 2>&1 || { echo 'Azure CLI required'; exit 1; }
Read settings from the FAI manifest and TuneKit config files.
# Load from fai-manifest.json if inside a play
CONFIG_DIR="${config_path:-config}"
if [ -f "fai-manifest.json" ]; then
echo "FAI Protocol detected — auto-wiring context"
fi
Perform the primary operation: generates pytest test suites with fixtures, parametrize, mocks, and coverage configuration..
Verify the output meets quality thresholds and WAF compliance.
# Validate output
if [ "$?" -eq 0 ]; then
echo "✅ Skill completed successfully"
else
echo "❌ Skill failed — check logs"
exit 1
fi
| Output | Type | Description |
|---|---|---|
status | enum | success, warning, failure |
duration_ms | number | Execution time in milliseconds |
artifacts | string[] | List of generated/modified files |
logs | string | Detailed execution log |
| Pillar | How This Skill Contributes |
|---|---|
| reliability | Includes retry logic, validates outputs, provides rollback steps |
| operational-excellence | Produces structured logs, integrates with CI/CD, follows IaC patterns |
| Exit Code | Meaning | Action |
|---|---|---|
| 0 | Success | Proceed to next step |
| 1 | Validation failure | Check input parameters |
| 2 | Dependency missing | Install required tools |
| 3 | Runtime error | Check logs, retry with --verbose |
# Run this skill directly
npx frootai skill run fai-pytest-coverage
When referenced in fai-manifest.json, this skill auto-wires with the play's context:
{
"primitives": {
"skills": ["skills/fai-pytest-coverage/"]
}
}
Agents can invoke this skill using the /skill command in Copilot Chat.
| Stage | Tool | Config |
|---|---|---|
| Chunking | Semantic chunker | 512 tokens, 10% overlap |
| Embedding | text-embedding-3-large | 3072 dimensions |
| Indexing | Azure AI Search | Hybrid (vector + BM25) |
| Retrieval | Hybrid search | 60% semantic, 40% keyword |
| Reranking | Semantic reranker | Top 5 after rerank |
| Generation | GPT-4o | temp=0.1, top_p=0.9 |
from azure.ai.formrecognizer import DocumentAnalysisClient
# Semantic chunking preserves paragraph boundaries
chunks = semantic_chunk(
text=document,
max_tokens=512,
overlap_tokens=50,
respect_boundaries=True # Don't split mid-sentence
)
{
"search_type": "hybrid",
"semantic_weight": 0.6,
"keyword_weight": 0.4,
"top_k": 5,
"min_score": 0.78,
"reranker": "semantic",
"filter": "category eq 'technical'"
}
dry_run=trueSource: frootai/frootai — distributed by TomeVault.