test-ai-analysis

Automate AI analysis module tests for cost, quota, caching, and session integrity.

Updated Mar 30, 2025
One-click install
npx skills add https://github.com/j4xie/my-prototype-logistics --skill test-ai-analysis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-ai-analysis
Source: https://github.com/j4xie/my-prototype-logistics/tree/main/.claude/skills/test-ai-analysis
Command: npx skills add https://github.com/j4xie/my-prototype-logistics --skill test-ai-analysis

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates testing for the AI analysis module, including quota checks, batch cost data, AI session handling, and caching behavior.

Core Features & Use Cases

  • AI Quota & Cost Data: Validate quota endpoints and cost-related batch analyses.
  • AI Interaction Flows: Test AI analysis sessions, followups, and caching behavior.
  • Use Case: Ensure AI analysis features respect quota rules and caching for repeat queries.

Quick Start

Run the AI analysis test suite: bash tests/api/test-ai-analysis.sh

Frequently Asked Questions about test-ai-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate testing for AI analysis quota and cost validation?

Automate AI analysis testing by running the provided test suite that validates quota endpoints, cost-related batch analyses, and caching behavior against your Java backend and Python AI service. The Skill orchestrates end-to-end HTTP interactions with token-based authentication to verify cost analysis integrity and quota management across local integration environments.

Can I test AI session handling and caching behavior in my local environment?

Yes. This Skill tests AI interaction flows including session handling, follow-ups, and repeat-query caching by executing reproducible test orchestration against localhost services. It validates token retrieval, service health checks, and session management to ensure caching respects quota rules across conversations.

What does batch cost analysis testing cover?

Batch cost analysis testing covers token-based quota validation, cost data extraction from JSON responses, and time-range reporting. The Skill performs error handling and data validation across batch analyses to verify that your AI analysis module correctly tracks and reports costs without quota violations.

Do I need specific infrastructure to run these AI analysis tests?

Yes. The Skill requires a Java backend running on localhost:10010 and a Python AI service on localhost:8085. It performs functional testing for end-to-end HTTP interactions in local integration environments, making it suitable for development and staging validation of the Cretas food traceability AI analysis system.

How do I verify token retrieval and service health in my AI pipeline?

Run the AI analysis test suite to validate token retrieval from authentication endpoints and perform service health checks on both backend and AI services. The Skill extracts and validates responses to ensure session management and error handling work correctly before moving to production.

Can this Skill test conversation history and caching across multiple queries?

Yes. The Skill tests caching behavior and conversation history management by simulating AI follow-ups and repeat queries. It verifies that your system correctly caches responses, respects quota limits, and maintains session state across multiple interactions without redundant processing.