홈 / Skills / 개발 생산성 / Markdown과 Mermaid로 작성하기 (Markdown and Mermaid Writing)
개발 생산성

Markdown과 Mermaid로 작성하기 (Markdown and Mermaid Writing)

Clayton Young / Superior Byte WorksApache-2.0Skill 언어: 영어
라이선스 확인됨스크립트 없음중간 위험
데모실행 기록 · claude-sonnet-5-5 · 2026년 10월
I'm documenting a small data pipeline for my team's repo README. Every night a scheduler triggers an ingest job that pulls CSV files from an SFTP server, a validation step checks the schema and moves bad files to a quarantine folder, good files are loaded into a staging table, then a transform job builds the reporting tables, and finally a Slack message is sent. Please write the README section "How the nightly pipeline works": a short intro, a diagram of the flow, and a sequence diagram showing the interaction between the scheduler, the ingest job, the SFTP server, the database and Slack. Our README is viewed on GitHub.
Skill: markdown-mermaid-writing
Read: references/mermaid_style_guide.md
Read: references/diagrams/sequence.md

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 접근성 메타데이터를 붙이고, 노드 하나에 이모지는 최대 하나로 하며, 문서가 표시될 곳의 Mermaid 버전을 확인하라고 알려 줍니다.

포함된 참고 자료

Markdown 스타일 가이드, Mermaid 스타일 가이드, 현재 Mermaid 렌더링과 명령줄 내보내기 설명, 21개 다이어그램 안내, 문서 템플릿 6종(의사결정 기록, 사용 안내, 발표 자료, 프로젝트 문서, 연구 논문, 상태 보고서).

이런 때 좋습니다

README, 설계 문서, 방법 메모, 보고서처럼 워크플로, 데이터 모델, 타임라인을 편집 가능한 텍스트로 남기고 싶을 때.

참고 및 위험

중간 위험:Markdown 파일을 쓰고 편집합니다. 스크립트는 없습니다. 선택적인 다이어그램 내보내기는 npm으로 Mermaid 명령줄 도구와 Chromium 브라우저를 설치하므로 네트워크 연결이 필요합니다. GitHub 같은 표시 환경마다 Mermaid 버전이 다르니 게시하는 곳에서 다이어그램이 제대로 렌더링되는지 확인하세요. 시험 실행에서 만든 다이어그램은 렌더링해 보지 않았습니다. 스타일 규칙(2단계 제목에 이모지, H1은 하나)은 선택 사항이며, 먼저 자신의 프로젝트 스타일을 따르세요. 이 사본은 간소화한 판으로, 크기 제한에 맞추려고 40개 파일 중 6개를 지웠고 SKILL.md에 밝혀 두었습니다. Clayton Young과 Superior Byte Works의 Apache-2.0 작품이며 K-Dense가 MIT로 통합했습니다. 라이선스 파일 두 개를 함께 넣었습니다.