data-flow-audit
Detect split data source anti-patterns and scattered business rule duplication where the same logic is reimplemented across multiple files and languages. Catches semantic duplication that syntactic tools like jscpd miss. Use at phase checkpoints or when investigating data consistency issues.
npx skills add majiayu000/claude-skill-registry --skill data-flow-audit --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Data Flow Audit Skill Detect cases where the same business concept is served through multiple API endpoints with independently maintained logic — the "split data source" anti-pattern — and where the same business rule (filter predicates, conditions, thresholds) is scattered across multiple files and languages. ## Why This Matters When the same data reaches the UI through two different code paths, subtle inconsistencies emerge: - Different filtering, defaults, or error handling per endpoint - Duplicated helper functions that drift independently - Hardcoded constants (rates, thresholds) updated in one place but not the other - Frontend components showing conflicting values for the same metric When the same business rule is reimplemented across SQL, API routes, shared libs, and Trigger.dev jobs: - Adding a new filter condition requires updating N locations manually - Some locations get missed, causing silent data inconsistencies - No tool catches it because the code is *reimplemented* in each language, not *copy-pasted* ## Workflow Overview Copy this checklist and track progress: ``` Data Flow Audit Progress: - [ ] Step 0: Validate known rules from MEMORY.md - [ ] Step 1: Map all AP
- Why This Matters
- Workflow Overview
- Step 0: Validate Known Rules from MEMORY.md
- 0.1 Parse MEMORY.md for documented rules
- 0.2 Validate each documented location
- 0.3 Discover undocumented locations
- 0.4 Report known rule status
- Step 1: Map API Routes, Jobs, and Data Sources
- 1.1 Discover API routes and jobs
- 1.2 For each route/job, extract data sources
- 1.3 Identify route groups
- 1.4 Identify implicit BFF pairs
- Step 2: Detect Overlapping SQL/Table References
- 2.1 Shared table access
Next.js API routes (pages router)
find src/pages/api -name "*.ts" -not -name "*.test.*"
Next.js API routes (app router)
find src/app/api -name "route.ts"
Trigger.dev jobs
find trigger/jobs -name "*.ts" -not -name "*.test.*" 2>/dev/null
Shared lib modules with data fetching
grep -rl "\.from(\|\.rpc(" src/lib/ --include="*.ts" | grep -v test
grep -rn "\.from(" src/pages/api/ src/lib/ trigger/jobs/ --include="*.ts" | grep -v test
grep -rn "\.rpc(" src/pages/api/ src/lib/ trigger/jobs/ --include="*.ts" | grep -v testWhat does the data-flow-audit skill do?
Detect split data source anti-patterns and scattered business rule duplication where the same logic is reimplemented across multiple files and languages. Catches semantic duplication that syntactic tools like jscpd miss. Use at phase checkpoints or when investigating data consistency issues.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill data-flow-audit --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
