Create assignment submission documents (Word/PDF) with screenshots, discussions, and analysis. Use when (1) user needs to create Lab.docx or Assignment.docx, (2) mentions "作业文档" or "submission document", (3) needs to organize screenshots and discussions for submission.
Guide students in creating well-structured assignment submission documents that meet academic requirements.
Student Information Source:
Read student information from .env.local in workspace root:
NAME - Student nameNUMBER - Student numberEMAIL - Student email (optional)When creating documents, automatically populate student information from these environment variables.
Standard assignment document structure:
Assignment Title
Student Information (from .env.local)
├── Name: {NAME from .env.local}
├── Student Number: {NUMBER from .env.local}
├── Section/Class (if required)
└── Date: {Current date}
Step-by-Step Content
├── Step X: Title
│ ├── Screenshots (with captions)
│ ├── Code snippets (if needed)
│ ├── Output/Results
│ └── Discussion/Analysis
└── Repeat for each step
Conclusion/Summary (if required)
References (if required)
Title Page:
.env.local NAME).env.local NUMBER)For Each Step:
Discussion Sections:
What to capture:
Screenshot quality:
Captions:
When to include:
Format:
Example:
Code Snippet 1: Calculate Zipf metrics
def calculate_zipf_metrics(df):
log_rank = np.log(df['rank'])
log_freq = np.log(df['frequency'])
slope, _, r_value, _, _ = stats.linregress(log_rank, log_freq)
return -slope, r_value**2
Structure:
Example for comparative analysis:
Step 5: Comparative Analysis
The two texts show different Zipf distributions:
1. Shape of Zipf Curve:
- Literary text (Emma): Smoother curve with R² = 0.95
- Informational text (Bible): Slightly steeper with R² = 0.93
- Both follow Zipf's Law closely (linear on log-log scale)
2. Frequency Decay:
- Literary: α = 1.08 (moderate decay)
- Informational: α = 1.15 (faster decay)
- Higher α indicates more concentrated vocabulary
3. Vocabulary Richness:
- Literary: 7,500 unique words
- Informational: 12,000 unique words
- Bible has richer vocabulary due to diverse content
Conclusion: Both texts confirm Zipf's Law, but informational
text shows steeper decay and larger vocabulary.
ML Course Labs (CST8506):
Two approaches:
For detailed ML lab patterns: See references/ml-lab-patterns.md
Key workflow:
⚠️ CRITICAL: Preserving Template Content:
Lab[N]_Answer.md, COPY content EXACTLY from Lab[N]AnswerTemplate.mdCritical for DOCX templates:
Writing descriptions:
NLP/DL Course Labs: Structure may vary - check course-specific templates
General Lab with Multiple Steps:
Structure: May vary by course - check course-specific templates
Pattern 3: General Lab with Multiple Steps
Lab 1: Title
Student Info
Step 1: Setup
- Screenshot: Environment setup
- Discussion: Installation process
Step 2: Data Loading
- Screenshot: Data loaded successfully
- Code: Loading function
- Discussion: Data characteristics
Step 3: Analysis
- Screenshot: Analysis output
- Screenshot: Visualization
- Discussion: Results interpretation
...
Pattern 4: Programming Assignment
Assignment 1: Title
Student Info
Part 1: Implementation
- Code snippets with explanations
- Screenshots of test runs
Part 2: Testing
- Test cases and results
- Screenshots of all tests passing
Part 3: Analysis
- Performance analysis
- Discussion of approach
Pattern 5: Research/Analysis Assignment
Assignment: Title
Student Info
Introduction
- Problem statement
- Approach overview
Methodology
- Steps taken
- Tools used
Results
- Screenshots of outputs
- Tables/charts
- Observations
Discussion
- Analysis of results
- Comparison with expectations
- Limitations
Conclusion
Fonts:
Spacing:
Organization:
Before submitting, verify:
.env.localgenerate_code_screenshots.py)generate_output_screenshots.py)images/ directoryCreating the document:
Taking screenshots:
Image editing:
Converting to PDF:
Scenario 1: ML Course Lab (CST8506)
User: "Help me create Lab1.docx for ML PCA assignment"
Your workflow:
.env.local (NAME, NUMBER)learning-code_generation skilluv run python .skills/learning-code_screenshot/scripts/generate_code_screenshots.py <script.py> images/uv run python .skills/learning-code_screenshot/scripts/generate_output_screenshots.py <script.py> images/.env.locallearning-md_to_docx skillScenario 2: NLP Course Lab
User: "Help me create Lab1.docx for NLP assignment"
Your workflow:
.env.local (NAME, NUMBER)Scenario 3: General Assignment
User: "Create assignment document"
Your workflow:
.env.local (NAME, NUMBER)