skills/skills.netease.im/project-plan-generator

project-plan-generator

SKILL.md

Project Plan Generator Skill v2

Generate professional project implementation plans with self-adaptive native Excel Gantt charts that automatically scale to any number of tasks and color-code by status.

Features

  • Self-adaptive Gantt chart: Chart data range auto-expands with task count, no row limit
  • Status-based coloring: Each bar colored by task status (待开始=棕色, 进行中=浅蓝, 已完成=绿色, 阻塞=黄色)
  • Date axis auto-range: X-axis covers project duration + 3 months buffer for future edits
  • Hierarchical tasks: Supports phases and subtasks with indentation
  • Flexible input: Accepts JSON configuration files
  • Phase highlighting: Phase rows automatically styled with brown background and bold text

Quick Start

Basic Usage

# Generate plan from JSON configuration
project-plan-generator --config project-config.json --template /path/to/template.xlsx --output my-project-plan.xlsx

# Or use default template
project-plan-generator --config project-config.json --output output.xlsx

JSON Configuration Format

Create a JSON file with your project structure:

{
  "project_name": "服务治理项目实施计划",
  "phases": [
    {
      "name": "1.项目启动会",
      "start_date": "2026-02-26",
      "duration_days": 6,
      "end_date": "2026-03-03",
      "status": "待开始",
      "notes": null,
      "tasks": [
        {
          "name": "1.1项目启动会材料输出",
          "start_date": "2026-02-26",
          "duration_days": 5,
          "end_date": "2026-03-02",
          "status": "待开始",
          "notes": null
        },
        {
          "name": "1.2进行项目启动会",
          "start_date": "2026-03-03",
          "duration_days": 1,
          "end_date": "2026-03-03",
          "status": "待开始",
          "notes": null
        }
      ]
    }
  ]
}

Input Requirements

The skill requires the following information:

  1. Project phases - Major stages of the project
  2. Phase content - Description of what each phase entails
  3. Phase start/end times - Dates for each phase
  4. Detailed tasks - Subtasks within each phase with their own start/end times

Output Format

The generated Excel file includes a single sheet with:

  1. Left side - Data table (Columns A-F):

    • 事项 (Task/Phase)
    • 开始时间 (Start Date)
    • 时长 (Duration in days, auto-calculated)
    • 结束时间 (End Date)
    • 状态 (Status: 待开始/进行中/已完成/阻塞)
    • 备注 (Notes)
  2. Right side - Native Excel Gantt Chart (anchored at Column G):

    • Stacked bar chart with transparent offset + colored duration bars
    • Y-axis: tasks in project order (first task at top)
    • X-axis: date timeline at top, left→right, with 3-month post-project buffer
    • Per-bar coloring based on status column (E):
状态 颜色 色值
待开始 棕色 #D2B48C
进行中 浅蓝色 #87CEEB
已完成 绿色 #90EE90
阻塞 黄色 #FFD700

Installation

The skill requires Python 3.8+ with the following packages:

pip install pandas openpyxl matplotlib

CLI Reference

Required Arguments

  • --config, -c: Path to JSON configuration file
  • --output, -o: Output Excel file path

Optional Arguments

  • --template, -t: Custom Excel template path (default: included template)
  • --chart: Enable native Excel Gantt chart generation (recommended)
  • --status-colors: Custom status color mapping in JSON format
  • --verbose, -v: Enable verbose logging
  • --date-format: Date format for input/output (default: %Y-%m-%d)

Examples

# Generate with Gantt chart (recommended)
python scripts/main.py --config project.json --output plan.xlsx --chart -v

# Generate with custom template
python scripts/main.py --config project.json --template custom-template.xlsx --output plan.xlsx --chart

# Generate without chart (data table only)
python scripts/main.py --config project.json --output plan.xlsx

Template Requirements

The Excel template must contain:

  1. A sheet named "项目实施计划" (or configurable via --sheet-name)
  2. The following columns in the first row (row 2):
    • Column A: 事项 (Task/Phase)
    • Column B: 开始时间 (Start Date)
    • Column C: 时长 (Duration)
    • Column D: 结束时间 (End Date)
    • Column E: 状态 (Status)
    • Column F: 备注 (Notes)

The first row (row 1) is reserved for the project title and will be automatically populated with the project_name from the configuration.

Advanced Usage

Dynamic Date Calculation

If you omit end_date or duration_days, the skill will calculate missing values:

{
  "phases": [
    {
      "name": "Phase 1",
      "start_date": "2026-01-01",
      "duration_days": 10
      // end_date will be calculated automatically
    }
  ]
}

Status Mapping

Default status values are Chinese, but you can use any status text. The Gantt chart will color-code tasks based on status.

Custom Templates

You can create your own Excel templates. Ensure they follow the required column structure. The skill will preserve all formatting and formulas.

Troubleshooting

Common Issues

  1. Missing dependencies: Install required packages with pip install pandas openpyxl matplotlib
  2. Template not found: Specify full path with --template or copy template to skill directory
  3. Date format issues: Use YYYY-MM-DD format for dates in JSON
  4. Chart generation fails: Ensure matplotlib is installed and can create plots

Debug Mode

Use --verbose flag to see detailed processing information:

project-plan-generator --config project.json --output plan.xlsx --verbose

Examples

Example configuration files are available in the examples/ directory.

Advanced Usage

Multi-Project Planning

You can generate plans for multiple related projects by creating a master configuration:

{
  "projects": [
    {
      "project_name": "项目A",
      "phases": [...]
    },
    {
      "project_name": "项目B",
      "phases": [...]
    }
  ]
}

Run with --multi-project flag to generate separate Excel files for each project.

Conditional Formatting

The skill supports conditional formatting in Excel templates. Add formatting rules to your template, and they will be preserved in the output.

Custom Date Formats

Override default date formats with --date-format flag:

project-plan-generator --config project.json --output plan.xlsx --date-format "%Y/%m/%d"

Email Reporting

Automatically email generated plans with --email flag (requires SMTP configuration).

Integration with Other Skills

xlsx Skill Integration

Use the generated Excel file with the xlsx skill for further analysis:

# Generate project plan
project-plan-generator --config project.json --output plan.xlsx

# Analyze with xlsx skill
xlsx analyze plan.xlsx --sheet "项目实施计划" --metrics

docx Skill Integration

Generate Word reports from your project plans:

# Convert Excel plan to Word document
docx create --from-excel plan.xlsx --template report-template.docx --output project-report.docx

scheduled-task Skill Integration

Schedule regular plan generation:

# Create scheduled task to generate plan every Monday
scheduled-task create --name "weekly-project-plan" --command "project-plan-generator --config project.json --output plan-$(date +%Y%m%d).xlsx" --schedule "weekly" --day-of-week "mon"

Version History

v2.0.0 (2026-04-12)

  • Self-adaptive Gantt chart: Chart auto-scales to any number of tasks
  • Status-based coloring: Per-bar color based on E column (待开始/进行中/已完成/阻塞)
  • Date axis improvements: Left→right with date labels at top, 3-month buffer
  • Task order fixed: First task at top, last at bottom (Y-axis maxMin)
  • Duration auto-calc: C column computed from start/end dates, not formula
  • Fresh workbook: No longer dependent on template chart; builds chart from scratch

v1.0.0 (2026-03-11)

  • Initial release
  • Basic project plan generation with Gantt charts
  • Excel template support
  • JSON configuration format

Contributing

We welcome contributions! Here's how to help:

  1. Report bugs: Open an issue with detailed reproduction steps
  2. Suggest features: Share your ideas for new features
  3. Submit pull requests:
    • Fork the repository
    • Create a feature branch
    • Add tests for new functionality
    • Ensure all tests pass
    • Submit a pull request with clear description

Development Setup

# Clone the skill repository
git clone <repository-url>

# Install dependencies
pip install -r requirements.txt

# Run tests
python -m pytest tests/

# Test the skill locally
./scripts/main.py --config examples/sample-project.json --output test-output.xlsx

Code Style

  • Follow PEP 8 for Python code
  • Use descriptive variable names
  • Add docstrings to functions
  • Include type hints where possible

License

MIT

Installs
2
First Seen
Apr 23, 2026