pub struct SkillsExtractor { /* private fields */ }Expand description
Extractor for Composio Skills content
Implementations§
Source§impl SkillsExtractor
impl SkillsExtractor
Sourcepub fn new(skills_path: impl Into<PathBuf>) -> Self
pub fn new(skills_path: impl Into<PathBuf>) -> Self
Create a new skills extractor
§Arguments
skills_path- Path to the bundled Skills directory (e.g., “composio-sdk/skills”)
§Example
use composio_sdk::wizard::SkillsExtractor;
// Skills are bundled within the SDK
let skills_path = concat!(env!("CARGO_MANIFEST_DIR"), "/skills");
let extractor = SkillsExtractor::new(skills_path);Sourcepub fn verify_path(&self) -> Result<(), SkillsError>
pub fn verify_path(&self) -> Result<(), SkillsError>
Verify that the skills path exists
Sourcepub fn get_tool_router_rules(&self) -> Result<Vec<Rule>, SkillsError>
pub fn get_tool_router_rules(&self) -> Result<Vec<Rule>, SkillsError>
Extract Tool Router rules (tr-*.md files)
§Returns
A vector of rules extracted from files matching the pattern tr-*.md
§Example
use composio_sdk::wizard::SkillsExtractor;
let skills_path = concat!(env!("CARGO_MANIFEST_DIR"), "/skills");
let extractor = SkillsExtractor::new(skills_path);
let rules = extractor.get_tool_router_rules().unwrap();
println!("Found {} Tool Router rules", rules.len());Sourcepub fn get_trigger_rules(&self) -> Result<Vec<Rule>, SkillsError>
pub fn get_trigger_rules(&self) -> Result<Vec<Rule>, SkillsError>
Extract Trigger rules (triggers-*.md files)
§Returns
A vector of rules extracted from files matching the pattern triggers-*.md
§Example
use composio_sdk::wizard::SkillsExtractor;
let skills_path = concat!(env!("CARGO_MANIFEST_DIR"), "/skills");
let extractor = SkillsExtractor::new(skills_path);
let rules = extractor.get_trigger_rules().unwrap();
println!("Found {} Trigger rules", rules.len());Sourcepub fn get_rules_by_tag(&self, tag: &str) -> Result<Vec<Rule>, SkillsError>
pub fn get_rules_by_tag(&self, tag: &str) -> Result<Vec<Rule>, SkillsError>
Extract rules filtered by tag
§Arguments
tag- The tag to filter by (e.g., “sessions”, “authentication”)
§Returns
A vector of rules that contain the specified tag
§Example
use composio_sdk::wizard::SkillsExtractor;
let skills_path = concat!(env!("CARGO_MANIFEST_DIR"), "/skills");
let extractor = SkillsExtractor::new(skills_path);
let session_rules = extractor.get_rules_by_tag("sessions").unwrap();Sourcepub fn get_all_rules(&self) -> Result<Vec<Rule>, SkillsError>
pub fn get_all_rules(&self) -> Result<Vec<Rule>, SkillsError>
Get all rules from the rules directory
Sourcepub fn get_consolidated_content(&self) -> Result<String, SkillsError>
pub fn get_consolidated_content(&self) -> Result<String, SkillsError>
Get consolidated AGENTS.md content
§Returns
The full content of the AGENTS.md file (150+ KB consolidated reference)
§Example
use composio_sdk::wizard::SkillsExtractor;
let skills_path = concat!(env!("CARGO_MANIFEST_DIR"), "/skills");
let extractor = SkillsExtractor::new(skills_path);
let content = extractor.get_consolidated_content().unwrap();
println!("AGENTS.md size: {} bytes", content.len());Trait Implementations§
Source§impl Clone for SkillsExtractor
impl Clone for SkillsExtractor
Source§fn clone(&self) -> SkillsExtractor
fn clone(&self) -> SkillsExtractor
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SkillsExtractor
impl RefUnwindSafe for SkillsExtractor
impl Send for SkillsExtractor
impl Sync for SkillsExtractor
impl Unpin for SkillsExtractor
impl UnsafeUnpin for SkillsExtractor
impl UnwindSafe for SkillsExtractor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more