opencode-skillful  by zenobi-us

Agent skills for on-demand prompt injection

Created 4 months ago
268 stars

Top 95.6% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

This plugin enhances OpenCode agents by enabling lazy loading of skills on demand, significantly reducing memory overhead and token consumption. It targets users managing extensive skill libraries, offering efficient, context-aware skill discovery and utilization through intuitive command-line tools.

How It Works

The core mechanism employs lazy loading: skills are discovered during initialization but only injected into the agent's context when explicitly invoked via skill_use. This minimizes token usage, crucial for workflows with numerous skills. It supports flexible prompt rendering (XML, JSON, Markdown) configurable per LLM model, optimizing interaction. Resource access is secured via pre-indexing, preventing path traversal vulnerabilities.

Quick Start & Requirements

Installation involves adding "@zenobius/opencode-skillful" to the plugins array in your ~/.config/opencode/config.json. No specific hardware or software prerequisites beyond an OpenCode environment are detailed. Key commands include skill_find "keyword" for discovery, skill_use "skill_name" for loading, and skill_resource "skill_name" relative_path="path" for accessing specific files.

Highlighted Details

  • Lazy Skill Loading: Skills are only loaded and consume tokens when actively used, drastically improving efficiency for large skill sets.
  • Model-Specific Prompt Rendering: Configure output formats (XML, JSON, Markdown) per LLM model to optimize prompt injection and parsing.
  • Secure Resource Access: All skill resources are pre-indexed at parse time, preventing insecure direct filesystem access and path traversal attacks.
  • Advanced Skill Discovery: Supports natural language queries with keywords, negation, exact phrases, and path prefix matching for finding relevant skills.
  • Executable Scripts: Skills can include executable scripts that agents can discover and run based on instructions.

Maintenance & Community

Contributions are welcomed via GitHub issues and pull requests. The README does not specify dedicated community channels (e.g., Discord, Slack) or list notable contributors or sponsorships.

Licensing & Compatibility

The project is released under the MIT License, permitting broad use and modification. Its configurable prompt rendering supports diverse LLM providers, enhancing compatibility.

Limitations & Caveats

Skills require a plugin restart to reload after changes. Duplicate skill names are logged and the latter entry is ignored. The README does not indicate alpha/beta status, suggesting a stable implementation.

Health Check
Last Commit

1 month ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
45 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.