基于 SOC 职业分类
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/oyi77/1ai-skills --skill test-agent命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
Android and mobile application security testing — emulators, rooting, traffic interception, dynamic instrumentation. Use when testing mobile apps for vulnerabilities, reversing APKs, or bypassing security controls on Android.
Self-reflection + Self-criticism + Auto-learning from corrections + Self-organizing memory. Agent evaluates its own work, catches mistakes, and improves permanently. Use when working with self improving.
Plan and execute a comprehensive red team engagement covering reconnaissance through post-exploitation using MITRE ATT&CK-aligned TTPs to evaluate an organization's detection and response capabilities. Use when working with conducting full scope red team engagement.
| name | test-agent |
| description | Use when writing comprehensive test suites covering happy paths, error paths, edge cases, and integration points. |
| domain | agents |
| author | oyi77 |
| license | Apache-2.0 |
| subdomain | ai-agents |
| tags | ["agent","ai-agent","automation","test","coding"] |
| version | 1.0.0 |
Quick Reference — see parent for full agent ecosystem.
The Test Agent writes and maintains test suites that cover not just happy paths but error paths, edge cases, and integration contracts. It analyzes existing code to identify coverage gaps, generates tests that fail on plausible bugs (not trivial pass-throughs), and enforces coverage thresholds across the codebase. Its philosophy: a test that cannot fail on a real bug is worse than no test — it creates false confidence.
# Refer to the skill's usage section for specific commands
# Adapt these to your workflow
"""Minimal test agent pattern — analyze coverage and generate tests."""
import json, sys
from pathlib import Path
def analyze_coverage(source_path: str, test_path: str) -> dict:
"""Identify uncovered functions and generate skeleton tests."""
source = Path(source_path)
tests = Path(test_path)
source_funcs = set()
for file in source.rglob("*.py"):
content = file.read_text()
for line in content.split("\n"):
stripped = line.strip()
if stripped.startswith("def ") and not stripped.startswith("def _"):
name = stripped.split("(")[0].replace("def ", "")
source_funcs.add(name)
test_funcs = set()
for file in tests.rglob("test_*.py"):
content = file.read_text()
for line in content.split("\n"):
stripped = line.strip()
if stripped.startswith("def test_"):
name = stripped.split("(")[0].replace("def ", "")
test_funcs.add(name)
uncovered = source_funcs - test_funcs
return {
"source_functions": sorted(source_funcs),
: (test_funcs),
: (uncovered),
: ((test_funcs) / ((source_funcs), ) * , ),
: [ fn (uncovered)[:]]
}
__name__ == :
result = analyze_coverage(sys.argv[], sys.argv[])
(json.dumps(result, indent=))
| Rationalization | Reality |
|---|---|
| "I know this code is correct, it does not need tests" | The code you are surest about is where the most expensive bugs hide — subconscious assumptions are the blindest spots |
| "The test agent writes trivial tests" | A test covering only the happy path creates false confidence. Demand tests that fail on real edge cases |
| "We have 90% line coverage, we are fine" | Line coverage without branch measurement misses entire code paths (e.g., error handlers that never run in CI) |
Use when adding new features (TDD), fixing bugs (regression tests), merging refactored code (behavior preservation), onboarding onto an unfamiliar module (document contract via tests), or any time coverage drops below the team threshold. Do NOT use for throwaway scripts, prototype code with a planned rewrite, or third-party libraries where upstream tests already cover the integration surface.