用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/deusXmachina-dev/memorylane --skill pattern-to-pdf命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | pattern-to-pdf |
| allowed-tools | mcp__memorylane__browse_timeline, mcp__memorylane__search_context, mcp__memorylane__get_activity_details |
| description | Generate a process description document as a downloadable PDF from a detected pattern |
Generate a shareable process briefing from a detected pattern or user-described workflow — a visual process map, step-by-step walkthrough, occurrence stats, and improvement opportunities. Output is a downloadable PDF.
A PDD is a process briefing document — not a corporate BPM artifact with swim lanes and BPMN notation. It's the document you wish existed when you joined a team: "here's how we actually do X, step by step, with the apps involved, how long it takes, and what varies each time."
The pattern-detector finds that a process exists. The PDD describes how it works — with enough detail that someone unfamiliar could follow it, and enough structure to spot what's automatable.
Pattern Detector output:
"Client Onboarding" — Email → CRM → billing → welcome email,
3-4x/week, ~20 min each
↓ PDD Generator
Process Description Document:
Executive summary — what, why, how often, how long
At a Glance — stats bar with key metrics
Process Map — visual flowchart showing each step
Steps — numbered walkthrough with apps, actions, variations
Opportunity — biggest time sink + concrete automation suggestion
Determine which process to document:
/discover-patterns run), use that as the starting point.Cast a wide net across 30 days:
search_context(query="<process description + key apps>", startTime="30 days ago", endTime="now", limit=30)
Use the pattern name, key apps, and distinguishing actions as search terms. Try 2–3 query variations if the first returns sparse results (e.g., search by app name, then by action description, then by output artifact).
Group returned activities by date proximity — activities within 60 minutes of each other likely belong to the same occurrence. Count distinct occurrences and note their date ranges.
For the selected instances, fetch full details:
get_activity_details(ids=["id1", "id2", "id3", ...])
Use OCR text to understand exactly what happens at each step — what fields are filled, what data moves between apps, what decisions are made.
Privacy: never reproduce passwords, API keys, or personal messages from OCR in the output.
If fewer than 3 instances were found in Step 2:
browse_timeline around each known date with a ±2 hour window:browse_timeline(startTime="<known_date> - 2 hours", endTime="<known_date> + 2 hours", limit=50, sampling="uniform")
Cross-reference all deep-dived instances to build:
Use the HTML Template below to produce the final document. Include:
Convert to PDF:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<style>
@page {
margin: 24px;
}
body {
margin: 0;
padding: 24px;
}
@media print {
body {
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
}
}
</style>
</head>
<body>
<!-- filled-in template HTML here -->
</body>
</html>
/tmp/pdd-temp.html using the Write tool.client-onboarding-pdd.pdf):"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" --headless --disable-gpu --no-pdf-header-footer --print-to-pdf="<slug>-pdd.pdf" /tmp/pdd-temp.html 2>/dev/null && rm /tmp/pdd-temp.html
If Chrome is not installed, fall back to saving as <slug>-pdd.html and tell the user.
3–4 sentences covering:
A stats bar with key metrics at a glance:
| Metric | Source |
|---|---|
| Frequency | Occurrence count ÷ time window (e.g., "~3x/week") |
| Avg duration | Mean time from first to last activity per occurrence |
| Apps involved | Distinct apps seen across all instances |
| Last seen | Date of most recent occurrence |
| Instances observed | How many occurrences the PDD is based on |
A vertical CSS flowchart — the visual centerpiece of the document.
Design rules:
Node anatomy:
┌─────────────────────────────┐
│ [App Badge] Action text │
│ "Enter client details" │
└──────────────┬──────────────┘
│
▼
Decision node anatomy:
┌──────────────┐
╱ International ╲
╱ client? ╲
╲ ╱
╲ ╱
└──┬────────┬──┘
Yes │ │ No
▼ ▼
A numbered walkthrough — each step includes:
| Field | Description |
|---|---|
| # | Step number in sequence |
| App | Which application is used |
| Action | What the user does (specific: "Enter client name and billing address", not "Use CRM") |
| What varies | What changes between instances (e.g., "Client name, billing amount") or "Nothing — identical each time" |
A brief assessment:
The process map uses pure inline CSS (no classes, no external styles). It follows the same design language as the pattern-detector template.
Step node:
<div
style="background: #fff; border: 2px solid #e2e8f0; border-radius: 10px; padding: 14px 18px; max-width: 420px; margin: 0 auto;"
>
<span
style="display: inline-block; background: #6366f1; color: white; font-size: 11px; font-weight: 600; padding: 2px 10px; border-radius: 99px; margin-right: 8px;"
>{app_name}</span
>
<span style="font-size: 14px; color: #1e293b;">{action_text}</span>
</div>
Variable step node (dashed border):
<div
style="background: #fffbeb; border: 2px dashed #f59e0b; border-radius: 10px; padding: 14px 18px; max-width: 420px; margin: 0 auto;"
>
<span
style="display: inline-block; background: #f59e0b; color: white; font-size: 11px; font-weight: 600; padding: 2px 10px; border-radius: 99px; margin-right: 8px;"
>{app_name}</span
>
<span style="font-size: 14px; color: #1e293b;">{action_text}</span>
<div style="font-size: 12px; color: #92400e; margin-top: 6px;">Varies: {what_varies}</div>
</div>
Decision node:
<div
style="background: #f0f9ff; border: 2px solid #38bdf8; border-radius: 10px; padding: 14px 18px; max-width: 420px; margin: 0 auto; text-align: center;"
>
<span style="font-size: 14px; font-weight: 600; color: #0369a1;">{decision_question}</span>
</div>
Connector between steps:
<div style="width: 2px; height: 28px; background: #cbd5e1; margin: 0 auto;"></div>
Branch connector (Yes/No):
<div style="display: flex; justify-content: center; gap: 80px; margin: 0 auto; max-width: 420px;">
<div style="text-align: center;">
<div style="font-size: 12px; font-weight: 600; color: #10b981; margin-bottom: 4px;">Yes</div>
<div style="width: 2px; height: 20px; background: #10b981; margin: 0 auto;"></div>
</div>
<div style="text-align: center;">
<div style="font-size: 12px; font-weight: 600; color: #94a3b8; margin-bottom: 4px;">No</div>
<div style="width: 2px; height: 20px; background: #94a3b8; margin: 0 auto;"></div>
</div>
</div>
Replace all {placeholders} with actual data. Step 7 handles wrapping this in a full HTML document and converting to PDF — this template is just the body content.
<div
style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; max-width: 720px; color: #1a1a2e;"
>
<!-- HEADER -->
<div
style="background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%); border-radius: 12px; padding: 24px 28px; margin-bottom: 24px; color: white;"
>
<div style="font-size: 20px; font-weight: 700; margin-bottom: 4px;">{process_name}</div>
<div style="font-size: 13px; opacity: 0.85;">
Process Description Document · Based on {instances_observed} observed instances ·
{analysis_window}
</div>
</div>
<!-- EXECUTIVE SUMMARY -->
<div
style="border: 1px solid #e2e8f0; border-radius: 10px; padding: 20px 24px; margin-bottom: 16px; background: #fff;"
>
<div style="font-size: 14px; color: #475569; line-height: 1.6;">{executive_summary}</div>
</div>
<!-- AT A GLANCE — STATS ROW -->
<div style="display: flex; gap: 16px; margin-bottom: 20px; flex-wrap: wrap;">
<div
style="flex: 1; min-width: 120px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 14px 16px; text-align: center;"
>
<div
=
>
Frequency
{frequency}
Avg Duration
{avg_duration}
Apps
{apps_involved}
Last Seen
{last_seen}
Instances
{instances_observed}
Process Map
{app_name}</span
>
{action_text}
{app_name}</span
>
{action_text}
Varies: {what_varies}
{decision_question}
Yes
No
Steps
#
App
Action
What Varies
{step_number}
{app_name}</span
>
{action}
{what_varies}
Opportunity
Biggest time sink
{biggest_time_sink}
Automatable
{whats_automatable}
Recommended next step
{automation_suggestion}
Generated from screen activity data.
This document reflects observed behavior, not self-reported processes. Steps marked as
variable were found to differ across instances.
These show the expected level of detail. Each example: input pattern → what the PDD should contain.
Input pattern: "Client Onboarding — Email → CRM → billing system → welcome email, 3-4x/week, ~20 min"
Expected PDD structure:
Input pattern: "Revenue reporting — Stripe → Google Sheets → formulas → Slack, every Monday, ~35 min"
Expected PDD structure:
Input pattern: "Expense review — PDF open → policy check in browser → approve/reject in expense tool, 10-15 per batch, twice a week"
Expected PDD structure:
get_activity_details for the deep-dive step. Never reproduce raw OCR in the output.