SuperAPI AI Directory

industry-stock-tracker

General & other

View repository

Updated 10-16 09:45

About this skill

Industry/Individual Stock Tracking Report Generation Skill

Overview

This skill is used to pass the user's natural language question to the script scripts/generate_industry_stock_tracker_report.py, where the script calls the remote report service and returns a unified JSON result. The output includes the title, summary content, and the local save path of the attachment (DOCX/PDF).

Core Workflow

  1. Pass the user's original question as-is as query to the script.
  2. The script calls the interface to generate the report and obtain the "summary" section.
  3. If the interface returns wordBase64/pdfBase64, the script will save it as a local attachment file and return the path.
  4. Use the script's standard output (JSON) directly as the basis for the skill output, without any secondary rewriting that conflicts with the script.

Command-line argument invocation method:

python3 {baseDir}/scripts/generate_industry_stock_tracker_report.py --query "{{query}}"

Note:It is prohibited to run this script in any "background execution, report later" manner, and you may only wait synchronously in the current session until the command completes, then continue after obtaining the stdout result; otherwise, this Skill will fail.

Output Format Specification

After the interface returns, the output must strictly follow the template below, with no adding or removing of headings, no changing of order, and no adding of extra sections:

Title

Directly use the title field returned by the interface, on a separate line.

Body

If the content field returned by the interface contains relevant industry report information, pass it through verbatim; otherwise, read the content of the attachment file returned by the interface, summarize the relevant report information and return it, and remember to ensure that the returned body content is non-empty.

Attachment

The interface returns the save paths of the PDF and DOCX format files.

Share Link

Directly use the share_url field returned by the interface, on a separate line. The text must be output in the following fixed format:

{标题}

{正文}

完整报告:
- PDF:{pdf_path}
- DOCX:{docx_path}

分享链接:
{share_url}

Field Mapping Rules:

  • {title} = returned by the script title
  • {content} = returned by the script content
  • {pdf_path} = attachments in type=PDF corresponding to url
  • {docx_path} = attachments in type=DOCX corresponding to url
  • {share_url} = returned by the script share_url

When attachments are missing:

  • If there is only one format, output only the line that exists (PDF or DOCX).
  • If neither exists, output:完整报告:暂无可用附件

Language Requirements

Always prioritize Chinese output. If the user uses another language, moderate bilingual interaction prompts may be used, but the report body and field meanings should remain in a Chinese context.

Usage Constraints and Recommendations

  • Do not rewrite at the skill layer the content main structure already generated by the script, to avoid drifting from the script logic.
  • Apart from displaying attachment paths, do not add a secondary summary at the skill layer; the body should be based on the script's content result.
  • If the script returns ok=false, prioritize passing through message; do not fabricate the cause of the error yourself.
  • The goal of this skill is to "generate and return results," not to add lengthy secondary analysis within the skill.

Common error handling:

  • Missing query:BAD_REQUEST, the message is "Missing query parameter".
  • Unsupported entity:ERROR_ENTITY, the message is "Analysis of this type of entity is currently not supported."
  • Network/timeout/service exception:TIMEOUT / NETWORK_ERROR / HTTP_ERROR / UNEXPECTED_ERROR, uniformly prompt the user with "The report generation service is temporarily unavailable, please try again later.".

Strong constraints on error output:

  • As long as the message field exists in the API response or the script's standard output (the printed JSON), the model must output that message, and must not omit it, rewrite it, or replace it with other wording.
  • When ok=false , prioritize outputting the error message; if error_codealso exists, error_codemay be displayed as well, but this does not affect the pass-through of message as-is.