Skip to content

anbeime/skill / skills/data-flow-skill/data-flow-skill

data-flow-skill

Verified

面向数据分析任务的一站式 Agent Skill,覆盖数据类型检测、数据理解、预处理、统计分析、可视化图表生成、正式报告和幻灯片输出。适用于课程作业、论文实验、业务分析、SEO/GEO 数据报告和可追溯数据分析工作流。

FileKindSize
README.mdmarkdown1.8 KB
SKILL.mdskill md7.7 KB
references/data-types.mdmarkdown907 B
references/reporting.mdmarkdown816 B
references/slides.mdmarkdown895 B
references/validation.mdmarkdown1.1 KB
references/visualization.mdmarkdown797 B
references/workflow.mdmarkdown875 B
requirements.txtmanifest97 B
scripts/README.mdmarkdown1.0 KB
scripts/analysis/__init__.pyscript35 B
scripts/analysis/analyzer_data_understanding.pyscript5.2 KB
scripts/analysis/analyzer_dataset_detection.pyscript7.6 KB
scripts/analysis/analyzer_findings_generation.pyscript57.1 KB
scripts/analysis/analyzer_preprocessing.pyscript1.9 KB
scripts/analysis/analyzer_statistical_analysis.pyscript934 B
scripts/analysis/analyzer_strategy_registry.pyscript3.4 KB
scripts/analysis/analyzer_time_series_analysis.pyscript2.0 KB
scripts/image_gen/image_generator.pyscript6.4 KB
scripts/mermaid/__init__.pyscript202 B
scripts/mermaid/cli.pyscript4.8 KB
scripts/mermaid/echarts_export.pyscript6.6 KB
scripts/mermaid/flowchart.pyscript9.4 KB
scripts/visualization/matplotlib/bar_memevolve.pyscript4.7 KB
scripts/visualization/matplotlib/bar_spice.pyscript6.0 KB
scripts/visualization/matplotlib/box_plot.pyscript4.4 KB
scripts/visualization/matplotlib/bubble_chart.pyscript5.8 KB
scripts/visualization/matplotlib/calendar_heatmap.pyscript8.2 KB
scripts/visualization/matplotlib/line_aime.pyscript3.0 KB
scripts/visualization/matplotlib/line_loss_inset.pyscript5.4 KB
scripts/visualization/matplotlib/line_selfdistill.pyscript7.0 KB
scripts/visualization/matplotlib/parallel_coordinates.pyscript6.7 KB
scripts/visualization/matplotlib/radar_dora.pyscript4.7 KB
scripts/visualization/matplotlib/scatter_break.pyscript5.8 KB
scripts/visualization/matplotlib/scatter_tsne.pyscript4.4 KB
scripts/visualization/matplotlib/stacked_bar.pyscript4.5 KB
scripts/visualization/matplotlib/violin_plot.pyscript5.3 KB

scripts/mermaid/cli.py

View on GitHub
"""CLI for generating and exporting Mermaid flowcharts."""

from __future__ import annotations

import argparse

try:
    from .flowchart import MermaidFlowchart, render_mermaid_file
    from .echarts_export import render_echarts_file
except ImportError:
    from flowchart import MermaidFlowchart, render_mermaid_file
    from echarts_export import render_echarts_file


def build_parser() -> argparse.ArgumentParser:
    parser = argparse.ArgumentParser(description="Generate Mermaid flowcharts and export images.")
    subparsers = parser.add_subparsers(dest="command", required=True)

    build_parser = subparsers.add_parser("build", help="Generate a Mermaid flowchart from ordered steps.")
    build_parser.add_argument("--title", required=True, help="Chart title.")
    build_parser.add_argument("--step", action="append", required=True, help="Ordered step text. Repeat this flag.")
    build_parser.add_argument("--output", required=True, help="Output .mmd file path.")
    build_parser.add_argument("--direction", default="TD", help="Mermaid direction, e.g. TD or LR.")

    render_parser = subparsers.add_parser("render", help="Render a Mermaid file to an image or PDF.")
    render_parser.add_argument("--input", required=True, help="Input .mmd file path.")
    render_parser.add_argument("--output", required=True, help="Output file path, e.g. .png/.svg/.pdf.")
    render_parser.add_argument("--theme", default="default", help="Mermaid theme.")
    render_parser.add_argument("--background", default="white", help="Background color.")
    render_parser.add_argument("--scale", type=int, default=2, help="Render scale.")
    render_parser.add_argument("--width", type=int, help="Optional canvas width.")
    render_parser.add_argument("--height", type=int, help="Optional canvas height.")

    export_parser = subparsers.add_parser("export", help="Generate a Mermaid file and immediately render it.")
    export_parser.add_argument("--title", required=True, help="Chart title.")
    export_parser.add_argument("--step", action="append", required=True, help="Ordered step text. Repeat this flag.")
    export_parser.add_argument("--mmd-output", required=True, help="Output .mmd file path.")
    export_parser.add_argument("--image-output", required=True, help="Rendered output path.")
    export_parser.add_argument("--direction", default="TD", help="Mermaid direction, e.g. TD or LR.")
    export_parser.add_argument("--theme", default="default", help="Mermaid theme.")
    export_parser.add_argument("--background", default="white", help="Background color.")
    export_parser.add_argument("--scale", type=int, default=2, help="Render scale.")
    export_parser.add_argument("--width", type=int, help="Optional canvas width.")
    export_parser.add_argument("--height", type=int, help="Optional canvas height.")

    echarts_parser = subparsers.add_parser("echarts", help="Render an ECharts JSON config to an image.")
    echarts_parser.add_argument("--input", required=True, help="Input ECharts JSON config file path.")
    echarts_parser.add_argument("--output", required=True, help="Output image file path.")
    echarts_parser.add_argument(
        "--format",
        choices=["png", "jpeg", "svg", "pdf"],
        help="Output format. Inferred from output path if not specified.",
    )
    echarts_parser.add_argument(
        "--timeout",
        type=int,
        default=60,
        help="Rendering timeout in seconds (default: 60).",
    )

    return parser


def main() -> int:
    parser = build_parser()
    args = parser.parse_args()

    if args.command == "build":
        flowchart = MermaidFlowchart.from_steps(args.title, args.step, direction=args.direction)
        path = flowchart.write(args.output)
        print(path)
        return 0

    if args.command == "render":
        path = render_mermaid_file(
            args.input,
            args.output,
            theme=args.theme,
            background_color=args.background,
            scale=args.scale,
            width=args.width,
            height=args.height,
        )
        print(path)
        return 0

    if args.command == "export":
        flowchart = MermaidFlowchart.from_steps(args.title, args.step, direction=args.direction)
        mmd_path = flowchart.write(args.mmd_output)
        image_path = render_mermaid_file(
            mmd_path,
            args.image_output,
            theme=args.theme,
            background_color=args.background,
            scale=args.scale,
            width=args.width,
            height=args.height,
        )
        print(image_path)
        return 0

    if args.command == "echarts":
        path = render_echarts_file(
            args.input,
            args.output,
            format=args.format,
            cli_timeout_seconds=args.timeout,
        )
        print(path)
        return 0

    parser.error("Unsupported command.")
    return 2


if __name__ == "__main__":
    raise SystemExit(main())
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 467kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 319kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 319kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 319kUpdated Claude CodeCodexVerifiedInstall