Process student report submissions from Google Classroom. Renames files with lastname_firstname prefix, converts DOCX to PDF, cross-references against class roster, removes duplicates, and generates submission tracking. Use when processing downloaded student assignment submissions.
Process a folder of downloaded student reports into a standardized format for grading.
MUST READ FIRST:
GUIDE.md - Detailed processing rules and edge casesCLASS-LIST-TEMPLATE.md - Required format for class rosterWhen invoking this skill, provide:
Reports folder path - Location of downloaded student reports
docs/assignments/assignment-1/student-reports/Class roster (auto-detected) - The skill will search for CLASS-LIST.md automatically
The skill automatically searches for a class list by traversing upward from the reports folder:
Starting from: docs/assignments/assignment-1/student-reports/
Search order:
1. docs/assignments/assignment-1/student-reports/CLASS-LIST.md
2. docs/assignments/assignment-1/CLASS-LIST.md
3. docs/assignments/CLASS-LIST.md
4. docs/CLASS-LIST.md
5. CLASS-LIST.md (project root)
When found:
✓ Found class roster: docs/assignments/CLASS-LIST.md
Contains 31 students
When not found:
⚠ No CLASS-LIST.md found in directory hierarchy.
Without a class roster:
- Cannot cross-reference student names
- Cannot detect missing submissions
- Must rely on PDF content for name extraction
Do you want to continue without a class list?
If user chooses to continue without class list:
The search looks for these filenames (case-insensitive):
CLASS-LIST.mdCLASSLIST.mdclass-list.mdstudents.mdroster.mdBefore ANY processing, verify gitignore protection:
# Check if folder is in .gitignore
grep -r "student-reports" .gitignore
# If not present, add it immediately:
echo "assignment-N/student-reports/" >> docs/assignments/.gitignore
STOP and warn user if:
# List all files in the reports folder
ls -la [reports_folder]/
Document:
For each DOCX/DOC file, use AppleScript to convert:
osascript scripts/convert-docx.applescript "[input.docx]" "[output.pdf]"
After successful conversion:
Spawn one subagent per PDF to avoid context overflow:
For each PDF file, create a Task with prompt:
Read the PDF at [path] and extract the student name.
Look for the name in:
1. Title page or cover
2. Document headers
3. Author signature at the end
Return ONLY:
- First name
- Last name
- Confidence: high/medium/low
If name cannot be determined, return "UNIDENTIFIED" with reason.
After subagent returns:
lastname_firstname_ (lowercase)lastname_firstname_[original_name].pdfRequires: Class list (skip if not available)
For files marked UNIDENTIFIED:
Match strategies:
Flag remaining unidentified files for manual review.
If no class list available:
# Find students with multiple submissions
ls *.pdf | sed 's/_.*//' | sort | uniq -c | sort -rn | grep -v "^ *1 "
For each student with duplicates, spawn subagent to:
Selection priority (in order):
| Priority | Check | Action |
|---|---|---|
| 1 | Is latest version complete? | If yes, keep latest |
| 2 | Latest incomplete/corrupted? | Keep most complete version |
| 3 | Content identical? | Keep file with cleaner name |
| 4 | Still unclear? | Keep latest, flag for review |
Verification for "latest" selection:
Create tracking file at assignment-N/STUDENT-LIST.md:
With class list:
# Student Submission List - Assignment N
| Full Name | File Prefix | Report Submitted | Betyg |
|-----------|-------------|------------------|-------|
| Firstname Lastname | `lastname_firstname` | Yes | |
| Another Student | `student_another` | No | |
## Summary
- **Total students:** X (from class list)
- **Reports submitted:** Y
- **Missing reports:** Z
### Missing Submissions
- Student Name 1
- Student Name 2
Without class list:
# Student Submission List - Assignment N
| Full Name | File Prefix | Report Submitted | Betyg |
|-----------|-------------|------------------|-------|
| Firstname Lastname | `lastname_firstname` | Yes | |
| Another Student | `student_another` | Yes | |
## Summary
- **Reports processed:** X
- **Successfully renamed:** Y
- **Unidentified (manual review):** Z
⚠ No class list available - cannot determine missing submissions.
Display final summary:
## Processing Complete
✓ Files processed: X
✓ Successfully renamed: Y
✓ Duplicates removed: Z
⚠ Unidentified (manual review needed): N
Missing submissions: [list names]
| Original | Normalized |
|---|---|
| ö | o |
| ä | a |
| å | a |
| é | e |
| ü | u |
Combine without spaces:
martinezlofgrenvonessendelacruzannaisabel (remove hyphen in prefix)johan (ignore nickname)When subagent cannot extract name:
This skill requires Microsoft Word installed for DOCX conversion.
# Verify Word is available
osascript -e 'tell application "System Events" to get name of processes' | grep -i word
If Word not available, report error and list unconverted files.
Before completing, verify:
# Final verification
git status --ignored | grep student-reports
After successful processing:
lastname_firstname_ prefix