Xspoonai official test suggestions

From jiayaoqijia/cryptoskill · View interactive version

Xspoonai official test suggestions is an AI agent skill from the GitHub repository jiayaoqijia/cryptoskill. Suggest unit tests from file list and function definitions. Analyzes code to recommend test cases and provides test templates for better coverage.

How to use this skill

Skill file

Description

Suggest unit tests from file list and function definitions. Analyzes code to recommend test cases and provides test templates for better coverage.

Inputs

{
  "files": ["list of source files"],
  "functions": ["function names to test"]
}

Outputs

{
  "ok": true,
  "data": {
    "suggestions": [],
    "coverage_estimate": "75%"
  }
}

Usage

Demo Mode

python scripts/main.py --demo

Get Test Suggestions

echo '{"files": ["main.py"], "functions": ["process_data"]}' | python3 scripts/main.py

Examples

Example 1: Test Suggestions

$ echo '{"files": ["utils.py"], "functions": ["calculate_total"]}' | python3 scripts/main.py
{
  "ok": true,
  "data": {
    "suggestions": ["Test with positive numbers", "Test with negative numbers", "Test edge cases"],
    "coverage_estimate": "85%"
  }
}

Error Handling

When an error occurs, the skill returns:

{
  "ok": false,
  "error": "Error description",
  "details": {
    "files": "File not found"
  }
}
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.