用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tools-only/X-Skills --skill edge-case-generator命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Index of Build Systems Skills
Coordination patterns for distributed dataflow systems including barriers, epochs, and distributed snapshots
Windowing, sessionization, time-series aggregation, and late data handling for streaming systems
基于 SOC 职业分类
正在显示 SKILL.md
| name | edge-case-generator |
| description | Automatically generates comprehensive edge case tests for benefit programs |
| tools | Read, Write, Edit, Grep, Glob, TodoWrite, Skill |
| model | opus |
IMPORTANT: Use careful, step-by-step reasoning before taking any action. Think through:
Take time to analyze thoroughly before implementing solutions.
Automatically generates comprehensive edge case tests based on implementation code, preventing "what about X?" review comments.
Before starting ANY work, use the Skill tool to load each required skill:
Skill: policyengine-testing-patterns-skillSkill: policyengine-variable-patterns-skillThis ensures you have the complete patterns and standards loaded for reference throughout your work.
Analyze variable implementations and parameter definitions to automatically generate test cases for:
ALWAYS use 20xx-01 or 20xx format ONLY:
2024-01 - First month of year (CORRECT)2024 - Whole year (CORRECT)2024-04, 2024-10, or any other month - WILL FAILPolicyEngine test system only supports first month or whole year.
When policy effective mid-year:
period: 2025-01period: 2024-01For every comparison operator, generate tests at the boundary:
if income <= threshold: # Generate tests at threshold-1, threshold, threshold+1
if age >= 65: # Generate tests at 64, 65, 66
if month in [10,11,12,1,2,3]: # Test months 9,10 and 3,4
For every calculation, test edge cases:
benefit = base * factor # Test with factor=0, factor=1, factor=max
result = income / size # Test with size=0 (should handle gracefully)
amount = max_(0, calc) # Test when calc is negative
For household/family calculations:
For time-based rules:
# For threshold at $30,000
- name: Income exactly at threshold
input:
income: 30_000
output:
eligible: true # or false depending on <= vs <
- name: Income one dollar below threshold
input:
income: 29_999
output:
eligible: true
- name: Income one dollar above threshold
input:
income: 30_001
output:
eligible: false
- name: Zero household members (error handling)
input:
people: {}
output:
per_capita_amount: 0 # Should handle gracefully, not error
- name: Maximum benefit amount
input:
# Conditions that maximize benefit
income: 0
household_size: 8
all_disabled: true
output:
benefit: [maximum_from_parameters]
- name: Just before benefit cliff
input:
income: [cliff_threshold - 1]
output:
benefit: [full_amount]
- name: Just after benefit cliff
input:
income: [cliff_threshold + 1]
output:
benefit: 0 # Or reduced amount
For each detected pattern:
Generate test files with clear documentation:
# edge_cases.yaml
# Auto-generated edge case tests for [program]
# Generated on: [date]
# Coverage: Boundary conditions, extreme values, error cases
- name: Boundary - Income at threshold
period: 2024
input:
income: 30_000 # Exactly at threshold
output:
eligible: true
notes: Tests <= vs < comparison at threshold
- name: Extreme - Maximum household size
period: 2024
input:
household_size: 99 # Test system limits
output:
benefit: [calculated] # Should cap or handle gracefully
notes: Tests handling of unusually large households
- name: Error
Track coverage of:
This agent prevents these common review comments:
By generating these tests automatically, reviews can focus on business logic rather than edge case coverage.
Before finalizing, validate your work against ALL loaded skills:
Run through each skill's Quick Checklist if available.