用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/cxcscmu/SkillLearnBench --skill run2-pdf-visual-extraction命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | run2_pdf-visual-extraction |
| description | Extract calendar event times by analyzing visual block positions relative to hour markers |
Accurately extract event times from calendar PDF by measuring visual block heights and positions relative to hour markers on the timeline axis.
import pdfplumber
import re
def get_hour_positions(pdf_path):
"""Extract positions of hour markers"""
with pdfplumber.open(pdf_path) as pdf:
page = pdf.pages[0]
text = page.extract_text()
# Find all hour markers
hours = {}
for line in text.split('\n'):
match = re.match(r'(\d{1,2}(?:am|pm))', line, re.IGNORECASE)
if match:
hour_str = match.group(1)
# Note: Would need OCR or position data to get pixel y-coordinates
return hours
When automated extraction is insufficient, measure block heights manually:
def estimate_block_duration(visual_inspection):
"""
Based on visual inspection of PDF:
Measure each block's height relative to hour markers:
- If block spans exactly from one hour line to next = 1 hour
- If block is half the height of 1-hour span = 30 minutes
- If block is 2 hour-spans tall = 2 hours
Cross-check by comparing block heights:
- Blocks of similar visual height likely have similar durations
- Use known 1-hour blocks as reference
"""
pass
def validate_event_times(events, constraints):
"""
Validate extracted times make sense:
1. Events don't overlap (except where explicitly flexible)
2. Events fit within business hours shown on calendar
3. Event durations are reasonable (not 20+ hours)
4. Sequence is correct (no events starting before earlier events)
"""
pass
events = [
{"name": "Out of office", "start": "00:00", "end": "09:00", "color": "gray", "flexible": False},
{"name": "Weekly Group Meeting", "start": "10:00", "end": "11:00", "color": "red", "flexible": False},
{"name": "Busy with task B", "start": "11:00", "end": "13:00", "color": "blue", "flexible": True},
{"name": "Project A Discussion", "start": "14:00", "end": "15:00", "color": "red", "flexible": False},
{"name": "Coffee Chat with someone", "start": "15:00", "end": "15:45", "color": "yellow", "flexible": False},
{"name": "Out of office", "start": "18:00", "end": , : , : },
]
基于 SOC 职业分类