Skip to content

feat: add data-viz skill for data storytelling and visualizations#170

Merged
anandgupta42 merged 3 commits intomainfrom
feat/viz-skills
Mar 16, 2026
Merged

feat: add data-viz skill for data storytelling and visualizations#170
anandgupta42 merged 3 commits intomainfrom
feat/viz-skills

Conversation

@arora-saurabh448
Copy link
Copy Markdown
Collaborator

@arora-saurabh448 arora-saurabh448 commented Mar 15, 2026

Summary

  • Adds a new data-viz skill for data storytelling and visualization/data products
  • Renames skill from previous name to data-viz for consistency
  • Includes comprehensive skill definition (SKILL.md) and a component guide reference (component-guide.md)

Changes

  • .opencode/skills/data-viz/SKILL.md — new skill definition with prompts and usage guidance
  • .opencode/skills/data-viz/references/component-guide.md — reference guide for visualization components (994 lines)

Test plan

  • Run through a sample visualization request to confirm skill output is coherent
  • Confirm no regressions in existing skills

🤖 Generated with Claude Code


```ts
const kpis = {
total: _.sumBy(data, "revenue"), average: _.meanBy(data, "revenue"),
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The code example for KPI aggregation uses _.maxBy(data, "revenue"), which returns an object, not the maximum numeric value as implied.
Severity: MEDIUM

Suggested Fix

Update the code example to correctly extract the numeric value from the object returned by _.maxBy. For instance, change max: _.maxBy(data, "revenue") to max: _.maxBy(data, "revenue")?.revenue or use an alternative like _.max(_.map(data, 'revenue')).

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: .opencode/skills/data-viz/references/component-guide.md#L263

Potential issue: The code example in `component-guide.md` for calculating KPIs uses
`_.maxBy(data, "revenue")` to find the maximum revenue. This function returns the entire
data object containing the maximum value, not the numeric value itself. If an AI agent
copies this example to generate code, any subsequent attempt to use the result as a
number (e.g., for mathematical operations or formatting) will fail, potentially leading
to incorrect outputs like `[object Object]` or runtime errors in the AI-generated code.

Did we get this right? 👍 / 👎 to inform future reviews.

@anandgupta42 anandgupta42 merged commit b541b87 into main Mar 16, 2026
8 checks passed
anandgupta42 pushed a commit that referenced this pull request Mar 17, 2026
* feat: added a skill for data story telling and visualizations/ data products

* fix: rename skill to data-viz

* fix: reduce skills.md and references files by 60%

---------

Co-authored-by: Saurabh Arora <saurabh@altimate.ai>
@anandgupta42 anandgupta42 deleted the feat/viz-skills branch March 17, 2026 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants