Skip to content

fix: data-viz skill not invoked by LLM — reduce description size, improve intent matching#444

Closed
arora-saurabh448 wants to merge 2 commits intomainfrom
fix/viz_skill
Closed

fix: data-viz skill not invoked by LLM — reduce description size, improve intent matching#444
arora-saurabh448 wants to merge 2 commits intomainfrom
fix/viz_skill

Conversation

@arora-saurabh448
Copy link
Collaborator

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

Summary

  • data-viz skill description was 861 chars (3.5x longer than any other skill) with a trailing newline from YAML > folded scalar — reduced to 382 chars, fixed formatting, added intent-based trigger examples ("show me trends", "break down costs by region")
  • System prompt skill directive upgraded from a weak suggestion ("Use the skill tool...") to a clear instruction ("check if a skill matches the user's intent... load it first") — net +1 sentence, no bloat

Root Cause

Traced via /trace across 33+ sessions: the data-viz skill was loaded correctly at the system level but the LLM never called the skill tool to load its instructions — even across 7 visualization-related sessions (dashboards, charts, chart fixes). Three factors combined:

Factor Before After
Description length 861 chars (YAML > block) 382 chars (single line)
Trailing \n Yes — broke </description> XML tag No
System prompt "Use the skill tool" (suggestion) "check intent... load it first" (directive)

Test plan

  • altimate skill test data-viz passes
  • altimate skill list --json shows no trailing newline, description under 400 chars
  • altimate run --yolo --max-turns 3 "visualize sales trends" invokes the skill tool
  • altimate run --yolo --max-turns 3 "show me costs by region" invokes the skill tool (intent match, no keyword)

Summary by CodeRabbit

  • Documentation
    • Refined the data-visualization skill description to use intent-driven triggers (e.g., "show trends," "break down costs by region," "compare metrics," "explore datasets") and emphasize building interactive visualizations and dashboards with React component libraries.
  • Refactor
    • Updated agent system instructions to improve detection and loading of relevant skills based on user intent before execution.

Copy link

@claude claude bot left a comment

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review.

Tip: disable this comment in your organization's Code Review settings.

@coderabbitai
Copy link

coderabbitai bot commented Mar 24, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 18fb08ea-8bb4-40e3-a8f8-bafd7310a70c

📥 Commits

Reviewing files that changed from the base of the PR and between 6b2593c and 2705be9.

📒 Files selected for processing (1)
  • .opencode/skills/data-viz/SKILL.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • .opencode/skills/data-viz/SKILL.md

📝 Walkthrough

Walkthrough

These changes shorten and rephrase the data-viz skill frontmatter to use intent-driven trigger examples and update the system prompt to instruct the agent to check skill applicability and load matching skills via the skill tool before starting work.

Changes

Cohort / File(s) Summary
Skill Description Updates
./.opencode/skills/data-viz/SKILL.md
Rewrote description frontmatter from keyword/BI-tool oriented triggers to intent-driven activation/examples (e.g., "show me trends", "break down costs by region"), removing directive to prefer code-first over recommending BI platforms.
System Prompt Updates
packages/opencode/src/session/system.ts
Expanded skill role wording to include "bundled references for domain-specific tasks" and added an explicit instruction for the agent to verify skill-intent match and load the skill via the skill tool when applicable before proceeding.

Sequence Diagram(s)

sequenceDiagram
  participant User as User
  participant Agent as Agent
  participant SkillChecker as Skill Checker
  participant SkillTool as Skill Tool
  participant SkillRepo as Skill Repository

  User->>Agent: Request (e.g., "show trends for Q1")
  Agent->>SkillChecker: Evaluate intent vs. skills
  SkillChecker->>SkillRepo: Query matching skills
  SkillRepo-->>SkillChecker: Return matching skill(s)
  SkillChecker->>Agent: Recommend loading skill
  Agent->>SkillTool: Load selected skill
  SkillTool-->>Agent: Skill loaded (context & references)
  Agent->>User: Proceed with skill-aware response
Loading

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested labels

contributor

Poem

🐰 I hopped through prompts, trimmed the fluff away,
Intent-led paths now guide the play.
Skills wake gently when meaning is clear,
Dashboards and charts hop bravely near. 🥕✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main change: fixing the data-viz skill not being invoked by adding intent-based examples and reducing description size.
Description check ✅ Passed The description covers all required sections (Summary, Test Plan, Checklist) with comprehensive details about changes, root cause analysis, and specific test steps.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/viz_skill

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant