piflow-skill-generator_planner

Generates PiFlow-compatible skill directories from JSON specs or validated workflow summaries.

539|171|Updated May 3, 2018
One-click install
npx skills add https://github.com/cas-bigdatalab/piflow --skill piflow-skill-generator-planner
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: piflow-skill-generator_planner
Source: https://github.com/cas-bigdatalab/piflow/tree/main/workspace/skills/planner/piflow-skill-generator_planner
Command: npx skills add https://github.com/cas-bigdatalab/piflow --skill piflow-skill-generator-planner

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Turning a one-off successful data processing run into a reusable, PiFlow-discoverable skill requires manually writing SKILL.md frontmatter, skill.json metadata, parameter contracts, scripts, and registration entries. This Skill automates that packaging so verified workflows become structured, validated skill directories.

Core Features & Use Cases

  • Template-driven skill generation: Creates SKILL.md, skill.json, scripts/, references/, and assets/ from a UTF-8 JSON spec, following a unified PiFlow template with DAG-readable input_params and output_params.
  • Flow-to-skill restoration: Restores a draft spec from a validated successful workflow summary, then generates or minimally rewrites an existing skill while preserving its name and directory.
  • Validation and registration: Ships scripts to validate skill structure, register skills into the classification list and icon storage, and record generated skills for frontend preview.
  • Use Case: After an agent successfully cleans a batch of EPUB metadata, provide the flow summary JSON and this Skill produces a complete epub_metadata_cleaner skill directory with an executable Python entrypoint, parameter contract, and registration.

Quick Start

Ask the agent to save the just-completed data processing workflow as a PiFlow skill using the flow summary JSON file.

Frequently Asked Questions about piflow-skill-generator_planner

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

FAQPage Schema
How do I generate a PiFlow skill from a JSON spec?

Run scripts/generate_piflow_skill.py with --spec pointing to a UTF-8 JSON spec containing name, description, input_params, output_params, and a script definition. The script creates the full skill directory under skills/generated and registers it.

How to convert a successful workflow into a reusable skill?

Pass a flow summary JSON via --flow to generate_piflow_skill.py. The generator restores a draft spec from the flow's inputs, outputs, scripts, and processing steps, then builds the skill directory using the standard template.

What files must a PiFlow skill directory contain?

Each skill needs a SKILL.md with YAML frontmatter (name, description, version, input_params, output_params), a skill.json with role-annotated parameters and command_template, and an executable Python entry script under scripts/. References and assets directories are optional.

Can I update an existing skill with a new workflow?

Yes, use scripts/rewrite_piflow_skill.py with --skill-dir and a new flow summary. It merges existing stable facts with the new flow, keeps the original skill name, and rebuilds the directory with overwrite enabled.

Why does skill validation fail after generation?

Common causes include mismatched command_template tokens versus input_params, non-UTF-8 encoding, directory name differing from the frontmatter name, or missing required parameter fields. Run validate_piflow_skill.py to identify the specific issue.

When should this skill generator not be triggered?

It should only run when the user explicitly asks to generate or save a skill, or when a completed task's verified workflow needs to be persisted. It is not a default entry point for general data processing requests.