feat: add data-viz skill for data storytelling and visualizations#170
Merged
anandgupta42 merged 3 commits intomainfrom Mar 16, 2026
Merged
feat: add data-viz skill for data storytelling and visualizations#170anandgupta42 merged 3 commits intomainfrom
anandgupta42 merged 3 commits intomainfrom
Conversation
|
|
||
| ```ts | ||
| const kpis = { | ||
| total: _.sumBy(data, "revenue"), average: _.meanBy(data, "revenue"), |
There was a problem hiding this comment.
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
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
data-vizskill for data storytelling and visualization/data productsdata-vizfor consistencySKILL.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
🤖 Generated with Claude Code