-
Notifications
You must be signed in to change notification settings - Fork 84
Add Agent Skills support #57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add Agent Skills support #57
Conversation
This commit establishes the Ralph Wiggum spec-driven development framework and comprehensive specifications for the Agent Skills feature. Ralph Wiggum Setup: - .specify/memory/constitution.md - Project principles and configuration - templates/spec-template.md - Feature specification template - templates/checklist-template.md - Implementation checklist template - scripts/ralph-loop.sh - Spec implementation runner - AGENTS.md - AI agent guidelines Agent Skills Specifications (11 specs): - 000: Implementation order and phasing - 001: Skill types and interfaces - 002: Skill parser for SKILL.md files - 003: Skill discovery system - 004: Central skill manager - 005: Skill execution engine - 006: React hooks and TanStack Query API - 007: Skills settings UI - 008: Skill invocation UI (/skill-name commands) - 009: Active skill context indicator - 010: Database state persistence - 011: Sample skills for demonstration The Agent Skills feature follows the open specification at agentskills.io and is compatible with skills from Cursor, Claude Code, OpenCode, and other adopters of the standard.
- Created spec 012 for skill script execution - Scripts discovered from skills' scripts/ directories - Auto-detect interpreter from file extension (.py, .sh, .js) - Leverages existing terminal toolset (mcp-desktopcommander) - Configurable allowed interpreters whitelist - Permission controls for script execution - Updated spec 001 with ISkillScript interface - Added script type definitions - Added allowedInterpreters to ISkillSettings - Added INTERPRETER_MAP constant - Updated implementation order (000) - Added spec 012 to Phase 2 (Execution) - Updated success criteria to include script execution
Verifies all type definitions from spec 001: - ISkillMetadata with required and optional fields - ISkillScript for executable scripts - ISkillLocation type - ISkill full skill object - ISkillState with invocation modes - ISkillSettings with all configuration options - INTERPRETER_MAP constant - DEFAULT_SKILL_SETTINGS constant Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements spec 002 - Skill Parser: - Parses YAML frontmatter from SKILL.md files - Validates required fields (name, description) - Validates name format (lowercase alphanumeric + hyphens, 1-64 chars) - Validates description length (max 1024 chars) - Handles optional fields (license, compatibility, metadata, allowed-tools) - Returns structured ParseResult with clear error messages Adds js-yaml dependency for YAML parsing. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements spec 003 - Skill Discovery System: - Discovers skills in project directories (.chorus/skills/, .claude/skills/) - Discovers skills in user directories (~/.chorus/skills/, ~/.claude/skills/) - Parses SKILL.md files using SkillParser - Project skills override user skills with same name - Discovers scripts in skill scripts/ directories - Discovers reference files in skill folders - Provides caching with refresh mechanism - Handles errors gracefully without blocking Uses Tauri file system APIs for cross-platform compatibility. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements spec 004 - Skill Manager: - Singleton pattern with getInstance() - Initializes skill discovery on startup - Tracks enabled/disabled state per skill - Tracks invocation mode (auto/manual) per skill - Persists states to Tauri store - Provides methods: getAllSkills, getEnabledSkills, getAutoSkills, getManualSkills - Provides getSkill(id), getSkillState(id) - Provides enableSkill, disableSkill, toggleSkill, setInvocationMode - Records skill usage timestamps - Emits 'skills-changed' event on state changes Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Initialize skill discovery on app startup - Verified end-to-end: skills in ~/.chorus/skills/ are discovered - Cleaned up verbose debug logging Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add ISkillStorageData with version field for future migrations - Add useCount tracking with getSkillUseCount() method - Implement debounced save (500ms) using lodash/debounce - Add migration from legacy skillStates format to versioned skillData - Add flushPersist() for immediate saves (e.g., before app close) - Update tests with 29 passing tests including migration and debounce Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create SkillExecution.ts with core execution logic - generateSkillsSystemPrompt() for AI context - executeSkill() to load skill instructions - handleSkillCommand() for /skill-name invocation - Create ToolsetSkills class with skills_use tool - Register skills toolset in ToolsetsManager - Add SKILLS_SYSTEM_PROMPT to prompts.ts - Add skills option to injectSystemPrompts() - 22 tests passing for skill execution The AI can now see available skills and invoke them to load detailed instructions for specific tasks. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add prepareScriptExecution() to validate and prepare scripts - Add getSkillScripts() to list available scripts - Add skills_run_script tool for preparing script commands - Add skills_list_scripts tool for listing skill scripts - Validate interpreter against allowed list (python3, bash, node) - Escape arguments to prevent command injection - 35 tests passing for skill execution (13 new tests) Scripts can be executed via the terminal toolset using the prepared command and working directory. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create SkillsAPI.ts with query hooks and mutations - useSkills() - get all discovered skills - useEnabledSkills() - get only enabled skills - useAutoSkills() / useManualSkills() - filter by mode - useSkillState(id) - get state for specific skill - useEnableSkill() / useDisableSkill() / useToggleSkill() - useSetSkillInvocationMode() - set auto/manual mode - useRefreshSkills() - re-discover from disk - useInitializeSkills() - initialize if needed - Fix TypeScript error in prepareScriptExecution Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create SkillCard component for displaying individual skills with enable/disable toggle and invocation mode selector - Create SkillsSettings component with skill list, empty state, and refresh button - Add Skills tab to Settings panel with Sparkles icon - Support for project, user, and global skill location badges Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create SkillAutocomplete component with dropdown for skill selection - Integrate skill autocomplete into ChatInput for both main and quick chat - Show autocomplete when user types "/" at start of input - Support keyboard navigation (arrow keys, Enter, Escape, Tab) - Show skill name, description, and location in suggestions - Execute skill on selection with toast confirmation - Filter skills as user types after "/" Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create ActiveSkillsStore (zustand) to track active skills per chat - Create ActiveSkillsIndicator component showing active skill badges - Add skill to active store when manually invoked via autocomplete - Show badges with dismiss button and details popover - Different styling for auto vs manual invocation types - Integrate indicator into both main chat and quick chat inputs Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create chorus-chat skill: Guidelines for multi-model chat usage - Create code-review skill: Systematic code review checklist - Create documentation skill: Technical writing best practices Each skill follows the Agent Skills specification with proper YAML frontmatter and useful instructions for immediate value. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Make Toolset._status protected so subclasses can set it - Set skills toolset status to "running" in ensureStart - Auto-start skills toolset without requiring DB config - Inject auto-invocation skills into system prompt - Fix infinite loop in ActiveSkillsStore with stable empty array reference Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Clean up development artifacts: - Remove .specify/ directory with implementation specs - Remove templates/ directory - Remove sample skills from .chorus/skills/ Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Explain what skills are and how they work - Document skill locations and discovery order - Show how to create a SKILL.md file - Cover settings, invocation modes, and slash commands - Include placeholders for screenshots - Link to agentskills.io specification Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove scripts/ralph-loop.sh - Remove AGENTS.md Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
|
@claude review this please 👀 Check for inconsistencies with upstream, check for possible implementation bugs, check for missing docs etc |
|
@bcongdon any interest in adding skills support? What would take for this PR to land in Chorus? |
- Add .agent/skills to user and project discovery paths - Follow symlinks when listing skill directories Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Summary
Implements support for Agent Skills - reusable prompt templates and scripts that extend AI capabilities for specific tasks. This follows the open Agent Skills specification.
Features
~/.chorus/skills/,~/.claude/skills/, and project-level.chorus/skills/or.claude/skills/directories/in chat to see and select available skillsskills_use,skills_run_script, andskills_list_scriptstools for AI to invoke skills and execute scriptsArchitecture
Documentation
See
docs/SKILLS.mdfor user-facing documentation.Test plan
Skill Discovery
~/.claude/skills/test-skill/SKILL.mdwith valid frontmatterEnable/Disable Skills
Auto Invocation Mode
Manual Invocation Mode
/skill-nameand press EnterSlash Command Autocomplete
/Skills Toolset
skills_useto load a skillScript Execution (requires Terminal toolset)
scripts/folder containing a scriptskills_run_scriptand then terminal to execute🤖 Generated with Claude Code