data-narrative
Skill0 starsChanged 4 months agoMITView on GitHub
Turns a raw dataset into a structured, evidence-grounded Markdown report where every claim traces back to the code or source that produced it. Orchestrates four specialist roles: Detective (external context), Analyst (exhaustive data profiling via data-science skill), Editor (narrative angle + report.md), and Inspector (provenance binding → inspector.json). USE FOR: any dataset-to-report workflow where auditability and claim traceability matter - analytical briefings, stakeholder reports, data-backed narratives. DO NOT USE FOR: SQL querying (use data-analyst), pipeline construction (use data-engineering), standalone EDA without a deliverable (use data-science), or architecture diagrams (use excalidraw-diagram).
In this repository29 other files it gives its agents.
- architectSkill
- brainstormingSkill
- concise-planningSkill
- context-engineerSkill
- data-analystSkill
- data-deprecation-analysisSkill
- data-engineeringSkill
- analystSkill
- detectiveSkill
- editorSkill
- inspectorSkill
- data-scienceSkill
- excalidraw-diagramSkill
- genai-securitySkill
- guardianSkill
- holdout-validationSkill
- implementerSkill
- llm-app-patternsSkill
- llm-memSkill
- opsSkill
- prompt-librarySkill
- security-boundariesSkill
- story-masterSkill
- story-plannerSkill
- subagent-executionSkill
- systematic-debuggingSkill
- task-routingSkill
- thinkerSkill
- verification-before-completionSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 4 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 34
Do not generate statistics mentally: Every number in report.md must come from an Analyst script.
- Very specific: line 35
Output directory is fixed: All artifacts go to narrative-output/ in the current working directory.
- Distinctive: line 37
verification-before-completion applies at the end: Before declaring the pipeline complete, run the Inspector verification gate (Step 5 …
- Distinctive: line 61
Before running any role, determine whether the input is a single file or a folder of files, then follow the matching path.
- Very specific: line 84
Create narrative-output/ if it does not exist
- Very specific: line 85
Read PROJECT_CONTEXT.md if present - use domain constraints
- Very specific: line 86
Write narrative-output/preflight.json with the pre-flight record so every downstream role can read it
- Very specific: line 88
If the dataset path is missing, unreadable, or relationship is "unrelated", stop and ask the user before proceeding.
- Distinctive: line 110
Task: Run exhaustive profiling of the dataset and produce a findings manifest where every finding is paired with a Python script.
- Very specific: line 116
Every finding in analyst.json has a code.script that points to an existing file
- Very specific: line 118
Analyst → Editor handoff check: If the Analyst finds no findings of "significance": "high", surface this to the user before proceeding - …
- Very specific: line 132
Every specific number in report.md appears verbatim in analyst.json or detective.json
- Very specific: line 150
Verification gate: After the Inspector writes inspector.json, confirm the file exists and contains a non-empty claims[] array.
- Distinctive: line 156
After all four roles complete, present this summary to the user:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
data-narrative Skill
Version: 9.0 | Updated: 01-July-2026 | Architect: Karim Bhalwani | Deps: data-science (Analyst), security-boundaries (Detective), verification-before-completion (Inspector gate)
Turns a raw dataset into a report.md where every claim is evidence-traced. Four sequential roles run as a fixed pipeline; each role reads what the previous one produced. The pipeline always runs in full - there are no skip-ahead paths.
Behavioral Directives
- Pipeline is sequential and non-negotiable. Detective → Analyst → Editor → Inspector. No role may be skipped. No role may run before its predecessor has written its output file.
- Do not generate statistics mentally. Every number in
report.mdmust come from an Analyst script. If the Editor needs a number the Analyst did not compute, re-task the Analyst before writing the report. - Output directory is fixed. All artifacts go to
narrative-output/in the current working directory. Create it if it does not exist. - Load sub-role SKILL.md files before running each role. Each role has its own
SKILL.mdwith detailed instructions. Read it before starting that role's work. - verification-before-completion applies at the end. Before declaring the pipeline complete, run the Inspector verification gate (Step 5 below). Do not claim done without fresh evidence.
Dependencies
Load these before starting:
~/.copilot/skills/data-narrative/detective/SKILL.md - before running Detective
~/.copilot/skills/data-narrative/analyst/SKILL.md - before running Analyst
~/.copilot/skills/data-narrative/editor/SKILL.md - before running Editor
~/.copilot/skills/data-narrative/inspector/SKILL.md - before running Inspector
~/.copilot/skills/data-science/SKILL.md - loaded by Analyst role
~/.copilot/skills/security-boundaries/SKILL.md - loaded by Detective role
~/.copilot/skills/verification-before-completion/SKILL.md - loaded at Inspector gatePipeline
Pre-flight: Validate Input
Before running any role, determine whether the input is a single file or a folder of files, then follow the matching path.
Single file (e.g., data/sales.csv)
- Confirm the file exists and is readable
- Extract column names and 5 sample rows
- Record:
{ "mode": "single", "files": ["data/sales.csv"], "schema": { ... } }
Multiple files (e.g., data/ or explicit file list)
- List all
.csv/.xlsxfiles in the folder (ignore hidden files and__pycache__) - For each file, read column names and 5 sample rows
- Identify likely join keys: columns with the same name across files are join candidates - flag them
- Assess relationship type:
- Same schema, different periods (e.g.,
jan.csv,feb.csv) → treat as a single concatenated dataset; Analyst should union before profiling - Different schemas, shared key (e.g.,
orders.csv+customers.csv) → treat as a relational dataset; Analyst should join on the shared key before profiling - Unrelated files → ask the user which file(s) to focus on before continuing
- Same schema, different periods (e.g.,
- Record:
{ "mode": "multi", "files": [...], "relationship": "union|join|unrelated", "join_key": "<col or null>" }
Pass the full pre-flight record to the Detective so it has context about the full dataset shape.
Both cases
- Create
narrative-output/if it does not exist - Read
PROJECT_CONTEXT.mdif present - use domain constraints - Write
narrative-output/preflight.jsonwith the pre-flight record so every downstream role can read it
If the dataset path is missing, unreadable, or relationship is "unrelated", stop and ask the user before proceeding.
Role 1 - Detective
Load: ~/.copilot/skills/data-narrative/detective/SKILL.md
Task: Gather the external context that frames the dataset. Pass the Detective:
- Dataset name and file path
- Column names and 5 sample rows
- Any topic hint the user provided
Done when: narrative-output/detective.json exists and contains at least 2 context items.
Role 2 - Analyst
Load: ~/.copilot/skills/data-narrative/analyst/SKILL.md + ~/.copilot/skills/data-science/SKILL.md
Task: Run exhaustive profiling of the dataset and produce a findings manifest where every finding is paired with a Python script.
Done when:
narrative-output/analyst.jsonexists with ≥ 3 findings- At least one Python script exists in
narrative-output/analyst/ - Every finding in
analyst.jsonhas acode.scriptthat points to an existing file
Analyst → Editor handoff check: If the Analyst finds no findings of "significance": "high", surface this to the user before proceeding - the dataset may be too sparse to support a meaningful narrative.
Role 3 - Editor
Load: ~/.copilot/skills/data-narrative/editor/SKILL.md
Task: Select a single narrative angle and draft the report.
Done when:
narrative-output/editor.mdexists (outline with chosen angle)narrative-output/report.mdexists (full draft, ≤ 800 words body, no Provenance section yet)- Every specific number in
report.mdappears verbatim inanalyst.jsonordetective.json
Editor → Inspector handoff check: Cross-reference every statistic in report.md against analyst.json before handing off. If any number cannot be matched, re-task the Analyst to produce it before continuing.
Role 4 - Inspector
Load: ~/.copilot/skills/data-narrative/inspector/SKILL.md + ~/.copilot/skills/verification-before-completion/SKILL.md
Task: Bind every claim in report.md to its upstream evidence and write the provenance manifest.
Done when:
narrative-output/inspector.jsonexists and is schema-valid- ≥ 80% of quantitative claims in
report.mdmust be bound to a Python script innarrative-output/analyst/as their primary evidence source (evidence type:code). Claims sourced exclusively fromdetective.jsonmay be tagged as evidence typereferenceand do not count toward the 80% threshold. report.mdhas the Provenance footer appended by the Inspector
Verification gate: After the Inspector writes inspector.json, confirm the file exists and contains a non-empty claims[] array. Report the claim count and evidence type distribution to the user.
Completion Report
After all four roles complete, present this summary to the user:
data-narrative pipeline complete
================================
Dataset : <path>
Report : narrative-output/report.md
Provenance : narrative-output/inspector.json
Angle : <chosen angle in one sentence>
Claims bound : <n> total | <code_count> code evidence | <ref_count> reference evidence
Analyst scripts: <count> scripts in narrative-output/analyst/
To verify all claims:
python ~/.copilot/skills/data-narrative/inspector/scripts/verify_claims.py \
--inspector narrative-output/inspector.jsonOutput File Reference
| File | Role | Description |
narrative-output/detective.json | Detective | External context items with source URLs |
narrative-output/analyst.json | Analyst | Findings manifest with code line references |
narrative-output/analyst/*.py | Analyst | Python scripts - one per finding group |
narrative-output/analyst/plots/*.png | Analyst | Visualisations (if produced) |
narrative-output/editor.md | Editor | Editorial outline: chosen angle + section plan |
narrative-output/report.md | Editor + Inspector | Final narrative report with Provenance footer |
narrative-output/inspector.json | Inspector | Provenance manifest (schema: inspector/references/output-schema.json) |
Error Handling
| Situation | Action |
| Dataset not found | Stop, ask user for correct path |
| Detective finds no context (0 items) | Warn and continue - Editor will note "no external context available" |
| Analyst finds no high-significance findings | Stop, present findings list to user, ask whether to proceed |
| Editor needs a number the Analyst did not compute | Re-task Analyst before writing report.md |
| Analyst re-tasked more than 2 times for the same missing statistic | Stop, report the statistic that cannot be produced and the reason, and ask the user whether to omit that claim from the report or provide the value manually. |
| Inspector cannot bind a claim to evidence | Flag in inspector.json as unbound; do not fabricate evidence |
| Inspector coverage < 60% | Report the gap to the user before declaring complete |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

