Here's the section, ready to paste into your README. Both diagrams use standard Mermaid, which GitHub renders natively in light and dark mode.
## How the nightly pipeline works
Every night a scheduler triggers an ingest job. The job pulls CSV files from an SFTP server and checks each file's schema. Files that fail go to a quarantine folder, and files that pass are loaded into a staging table. A transform job then builds the reporting tables from staging, and a Slack message is sent at the end of the run.
### Pipeline flow
```mermaid
flowchart LR
accTitle: Nightly Pipeline Flow
accDescr: A scheduler triggers ingest from SFTP. Each CSV is validated. Bad files go to quarantine, good files load into staging, then the transform builds reporting tables and Slack is notified.
schedule([⏰ Nightly trigger]) --> ingest[📥 Pull CSVs from SFTP]
ingest --> validate{🔍 Schema valid?}
validate -->|No| quarantine[🗂️ Move to quarantine]
validate -->|Yes| staging[💾 Load into staging table]
staging --> transform[⚙️ Build reporting tables]
transform --> notify([📤 Send Slack message])
quarantine --> notify
classDef good fill:#dcfce7,stroke:#16a34a,stroke-width:2px,color:#14532d
classDef bad fill:#fee2e2,stroke:#dc2626,stroke-width:2px,color:#7f1d1d
class staging,transform good
class quarantine bad
```
### Interaction between components
```mermaid
sequenceDiagram
accTitle: Nightly Pipeline Sequence
accDescr: The scheduler starts the ingest job, which downloads files from SFTP, validates each one, quarantines bad files or loads good ones into the database, runs the transform, and posts a summary to Slack.
participant sched as ⏰ Scheduler
participant ingest as 📥 Ingest job
participant sftp as 🖥️ SFTP server
participant db as 💾 Database
participant slack as 📤 Slack
sched->>ingest: Trigger nightly run
ingest->>sftp: List and download CSV files
sftp-->>ingest: CSV files
loop 🔄 Each file
ingest->>ingest: 🔍 Validate schema
alt ✅ Schema valid
ingest->>db: Load into staging table
db-->>ingest: Rows loaded
else ❌ Schema invalid
ingest->>ingest: 🗂️ Move to quarantine folder
end
end
ingest->>db: Run transform (build reporting tables)
db-->>ingest: Reporting tables updated
ingest->>slack: 📤 Post run summary
slack-->>ingest: Message accepted
```
A few details are my assumptions, so please check them against your setup:
- Who runs what: You didn't say which component runs validation and the transform. I showed the ingest job doing validation and loading, then triggering the transform in the database. If the transform is a separate job, add it as a sixth participant between the database and Slack.
- Failures: The Slack message is sent after both good and bad files, as in the flow diagram. If it should only fire on success, or should list the quarantined files, say so and I'll adjust both diagrams.
- Quarantine location: I didn't say whether the folder is on the SFTP server or local storage. Name it in the intro if readers will need to find it.
I couldn't render the diagrams here, but they follow standard Mermaid syntax. You can paste them into mermaid.live, or preview the README on GitHub, to confirm they display.
Real run in an isolated folder with only this skill installed. Only the Skill and Read tools were enabled, so no command was run and no file was written. The scenario is fictional. The diagrams were not rendered in this run: check them in a Mermaid-aware preview such as GitHub or mermaid.live before publishing.
できること
**「Markdown 文書 + Mermaid の図」**という任意の書き方を提供し、構造をスクリーンショットではなく、編集でき差分も見やすいテキストに残します。適切な図の種類(フローチャート、シーケンス図、ER 図、状態遷移図、ガントチャート、C4、タイムライン、マインドマップなど)を選ぶ手助けをし、その種類のガイドに誘導します。ガイドには検証済みの例とそのまま使えるテンプレートがあります。accTitle と accDescr のアクセシビリティ用メタデータを付け、1 ノードの絵文字は最大 1 つにし、文書を表示する場所の Mermaid のバージョンを確認するよう促します。
付属の参考資料
Markdown のスタイルガイド、Mermaid のスタイルガイド、現行の Mermaid の描画とコマンドラインでの書き出しの説明、21 の図のガイド、6 つの文書テンプレート(意思決定記録、手順書、プレゼン資料、プロジェクト文書、研究論文、状況報告)。
向いている場面
README、設計書、手法のメモ、レポートなど、ワークフロー、データモデル、タイムラインを編集できるテキストのまま残したいとき。
中リスク:Markdown ファイルを書き込み・編集します。スクリプトはありません。任意の図の書き出しでは、npm で Mermaid のコマンドラインツールと Chromium ブラウザをインストールするため、ネットワーク接続が必要です。GitHub など表示先によって Mermaid のバージョンが異なるため、公開する場所で図が描画されるか確認してください。試用で作られた図は描画していません。スタイルの約束事(2 階層目の見出しに絵文字、H1 は 1 つ)は任意で、まずご自身のプロジェクトの書き方に従ってください。このコピーは簡略化版で、サイズ制限のため 40 ファイルのうち 6 つを削除し、SKILL.md に明記しています。Clayton Young と Superior Byte Works による Apache-2.0 の作品で、K-Dense が MIT で統合しました。ライセンスファイルを 2 つ同梱しています。