feat: proactive library usage for domain-specific coding tasks#18
Merged
feat: proactive library usage for domain-specific coding tasks#18
Conversation
Expand agentlib-knowledge skill description to trigger on coding tasks involving domain-specific parameters, protocols, and standards. Add root CLAUDE.md with instructions for proactive library checking before writing domain-specific code. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Review Summary by QodoEnable proactive library usage for domain-specific coding
WalkthroughsDescription• Enables proactive library consultation for domain-specific coding tasks • Expands skill triggers to include code writing with domain parameters • Adds root CLAUDE.md with agent instructions for library usage • Clarifies exclusions to prevent triggering on general programming Diagramflowchart LR
User["User requests domain-specific code"] -->|triggers expanded skill| Skill["agentlib-knowledge skill"]
Skill -->|consults| Library["Knowledge library"]
Library -->|returns verified values| Agent["Agent writes code"]
Agent -->|cites sources| Output["Code with source comments"]
RootInstructions["CLAUDE.md root instructions"] -->|guides| Agent
File Changes1. CLAUDE.md
|
Code Review by Qodo
1. Trigger guidance contradicts itself
|
Claude Code only loads CLAUDE.md from project roots and ~/.claude/, not from plugin directories. The expanded skill description in SKILL.md is the correct mechanism for proactive triggering. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
Makes the agent proactively consult the knowledge library when writing code that involves domain-specific parameters, protocols, standards, or configurations — without the user explicitly asking.
Changes
Expanded skill triggers (
skills/agentlib-knowledge/SKILL.md): The skill now auto-triggers on coding tasks involving domain-specific values, not just explicit research questions like "look up" or "what does the book say". The "do NOT trigger on code editing" exclusion was narrowed to "general programming tasks" to avoid suppressing domain-specific coding triggers.Root CLAUDE.md (new): Always-loaded instructions telling the agent to check the library before writing domain-specific code, prefer library values over memory, and cite sources in comments. Clear exclusions for general programming, git operations, and simple edits.
Example behavior
Before: User says "set up a GROMACS simulation" → agent writes code from memory, might use wrong parameters.
After: User says "set up a GROMACS simulation" → agent checks library for simulation protocols → uses verified parameters with source citations in comments.
Test plan
ccw --plugin-dir <path>)/agentlib-knowledgewithout being asked🤖 Generated with Claude Code