{"data":{"slug":"discovered-86775c4c067d7434190f068d715f6b0d0e45a7524a2e7584","title":"Document Data Flow","summary":"Create or update the data flow architecture document (`docs\/pages\/data-flow.md`) to trace how data moves between major components of the project.","url":"https:\/\/skillshunter.net\/skills\/discovered-86775c4c067d7434190f068d715f6b0d0e45a7524a2e7584","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/discovered-86775c4c067d7434190f068d715f6b0d0e45a7524a2e7584","markdown_url":"https:\/\/skillshunter.net\/skills\/discovered-86775c4c067d7434190f068d715f6b0d0e45a7524a2e7584.md","download_url":"https:\/\/skillshunter.net\/skills\/discovered-86775c4c067d7434190f068d715f6b0d0e45a7524a2e7584\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Before running, ensure the working directory is set to the repo root using `git rev-parse --show-toplevel` or `pwd`. Use `Glob` and `Grep` to locate configuration files, route definitions, and type definitions to identify the project architecture.","instructions":"---\nname: document-data-flow\ndescription: Create or update the data flow architecture document (docs\/pages\/data-flow.md).\nallowed-tools: Read, Glob, Grep, Write, Edit, Agent, Bash(git rev-parse:*)\n---\n\n# Document Data Flow\n\nCreate or update `docs\/pages\/data-flow.md` \u2014 a reference document tracing how data moves between the major components of the project.\n\n## Context\n- Repo root: !`git rev-parse --show-toplevel 2>\/dev\/null || pwd`\n\n## Working directory\n\nAll paths in this skill (`docs\/pages\/data-flow.md`, any existing architecture docs you Read first) are relative to **Repo root** from Context. The cwd may be a subdirectory \u2014 prefix every Read\/Edit\/Write\/Grep\/Glob call with the Repo root value. Bare paths are cwd-relative and will silently create\/read files in the wrong place.\n\n## When to run\n\n- After adding a new data pipeline or processing stage\n- After changing message protocols or communication patterns between components\n- After modifying serialization boundaries, API contracts, or adding new message types\n- After introducing a new architectural layer or external integration\n\n## Workflow\n\n### Step 1: Discover the project architecture\n\nExplore the codebase to identify:\n- The major components or layers (e.g. API server, worker, database client, frontend, CLI)\n- How components communicate (HTTP, WebSocket, message queue, function calls, IPC, events)\n- Shared types, schemas, or interface definitions\n- Entry points and data sources (user input, external APIs, scheduled jobs, file uploads)\n- Key modules, their responsibilities, and which files implement each component\n\nUse `Glob` and `Grep` to locate configuration files, route definitions, message handlers, type definitions, and module boundaries. Read the main entry points and any existing architecture docs.\n\n### Step 2: Update the document\n\nUpdate `docs\/pages\/data-flow.md` covering:\n- Component overview (each major component, its role, and key files)\n- Serialization and data format constraints (if any)\n- Data flow diagrams for each major flow (e.g. request handling, event processing, data sync)\n- Message or API protocol tables (all message\/event types, endpoints, directions)\n- Connection management, error propagation, and retry behavior\n\n### General formatting rules\n\n- Component names are capitalized: API Server, Worker, Database, Message Queue\n- Component names in headers and flow diagrams use bold italic: `***API Server***`\n- Component names in running text use italic: `*API Server*`\n- Do not hardcode file paths in component headers \u2014 a component may span multiple files\n- Each component section in the overview ends with a \"Key files:\" bulleted list with brief descriptions\n- Component descriptions in the overview list responsibilities but should not include method names \u2014 save those for the detailed flow diagrams\n- Method\/function references must include their file or class prefix: `server.handleRequest()`, `JobQueue.enqueue()`. Lowercase prefix = module file, uppercase prefix = class. Omit the prefix only when all methods listed together belong to the same file\/class and it is specified explicitly.\n\n### Formatting rules for data flow diagrams\n\nEach flow section has this structure:\n1. **Summary paragraph** \u2014 what this flow does, in 1-2 sentences\n2. **Triggers** \u2014 bulleted list of what initiates this flow\n3. **Horizontal rule** (`---`) \u2014 separates the description from the flow steps\n4. **Flow steps** \u2014 alternating component headers and numbered action lists\n\n**Component headers** in flow steps use bold italic on their own line:\n\n```\n***API Server***\n```\n\n**Action lists** are numbered Markdown lists under each component header. Include\nmethod names with file\/class prefixes:\n\n```\n***API Server***\n\n1. Validate the incoming request via `server.validatePayload()`\n2. Authenticate the caller and resolve permissions\n3. Dispatch the job to *Worker* via the message queue\n4. Return `202 Accepted` with a job ID to the caller\n```\n\n**Data transitions** between components use fenced code blocks with `\u21e9` prefix.\nEach line inside the block starts with `\u21e9` followed by three spaces:\n\n````\n```\n\u21e9   JobPayload (serialized as JSON):\n\u21e9   { jobId, type, params, createdAt }\n```\n````\n\nIf no data is passed across a boundary, say so explicitly:\n\n````\n```\n\u21e9   (no data passed)\n```\n````\n\n**Key rules:**\n- Do NOT mix actions and data \u2014 the code block region is only for data labels\n- Data transitions always appear between two component headers\n- Messages, events, and API calls are data \u2014 show them in code blocks\n\n### Formatting rules for branching flows\n\nWhen a flow branches (e.g., synchronous vs asynchronous processing, success vs failure), use an HTML `<table>` with:\n- One column per branch, headers (`<th>`) describing each branch\n- One row per component step \u2014 each cell contains the data received (code block) then the component name and its actions\n- Use `valign=\"top\"` on `<td>` elements so shorter branches align to the top\n- Empty `<td><\/td>` for rows where only one branch continues\n- Use Markdown inside `<td>` (with a blank line after the opening tag) for formatting\n- Each component gets its own row to keep numbered lists independent\n\n### Step 3: Verify\n\n- Ensure all message types, event names, or API endpoints from the source code appear in the protocol tables\n- Ensure new data pipelines are represented in the flow diagrams\n- Check that the document is consistent with actual code\n","use_cases":["After adding a new data pipeline or processing stage","After modifying message protocols or communication patterns between components","After introducing a new architectural layer or external integration"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/AnotherSava\/claude-code-common\/blob\/1a7f9f9cce53f6946ae1e3a9cc0733f2524a4b93\/claude\/skills\/document-data-flow\/SKILL.md","source_commit":"1a7f9f9cce53f6946ae1e3a9cc0733f2524a4b93","license":null,"version":null,"listing_approved_at":"2026-12-01","created_at":"2026-11-30T08:07:58.000000Z","updated_at":"2026-12-01T12:48:20.000000Z","seo_title":"Document Data Flow Architecture","seo_description":"Update the data flow architecture document to reflect how data moves between components, including message types, API endpoints, and serialization formats.","seo_keywords":["data flow documentation","architecture diagram","component communication","message protocol tracking","API endpoint mapping"]}}