op-task-extractor

Convert user-provided code or natural language into a standardized single-file task script.

258|48|Updated Jun 22, 2020
One-click install
npx skills add https://github.com/mindspore-ai/akg --skill op-task-extractor-mindspore-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: op-task-extractor
Source: https://github.com/mindspore-ai/akg/tree/main/akg_agents/workspace/.opencode/skills/op-task-extractor
Command: npx skills add https://github.com/mindspore-ai/akg --skill op-task-extractor-mindspore-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

从用户提供的代码或自然语言描述,构建标准化的单文件自包含任务代码。

Core Features & Use Cases

  • 将输入类型(代码文件或自然语言描述)转化为标准的 {op_name}.py 任务文件,并通过验证脚本确认可执行。
  • 支持自动化构建工作流所需的 get_inputs() 和 get_init_inputs(),确保前向传播可重复执行。
  • 适用于算子自动生成工作流的场景,帮助快速生成可验证的任务实现。

Quick Start

Provide a code file path or natural language description to generate a standard {op_name}.py task file and run the included validation.

Frequently Asked Questions about op-task-extractor

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

FAQPage Schema
How do I generate a self-contained task script from natural language operator descriptions?

To generate a self-contained task script from natural language, provide the operator description to automatically build a standardized {op_name}.py file. The output enforces dependency inlining and includes validation to ensure deterministic execution.

Why do I need get_inputs() and get_init_inputs() functions in my operator automation workflow?

You need get_inputs() and get_init_inputs() functions in your operator automation workflow to ensure forward propagation remains repeatable. These standardized functions define initialization parameters and input data dynamically for the generated task script.

What is the best way to validate a generated operator task file for deterministic execution?

The best way to validate a generated operator task file for deterministic execution is to run the included validation script. This mandatory step executes the standardized single-file task to confirm it runs correctly and produces validated output.

Can I convert an existing Python code file into a standardized single-file task script?

Yes, you can convert an existing Python code file into a standardized single-file task script. Provide the code file path as input to automatically generate the {op_name}.py file with inlined dependencies and required input functions.

Does the task generation process enforce inlining of external dependencies for operator scripts?

Yes, the task generation process strictly enforces inlining of external dependencies for operator scripts. This ensures the resulting single-file task code is fully self-contained and can execute deterministically without external package requirements.