synwire_agent_skills/lib.rs
1//! Agent skills runtime for Synwire.
2//!
3//! This crate implements the [agentskills.io](https://agentskills.io)
4//! specification for discoverable, composable agent skills, extended with
5//! Synwire-specific runtime hints.
6//!
7//! # Overview
8//!
9//! A skill is a directory containing:
10//! - `SKILL.md` — manifest (YAML frontmatter) + instructions body
11//! - `scripts/` — optional runtime scripts
12//! - `references/` — optional reference material
13//! - `assets/` — optional static assets
14//!
15//! Skills are discovered from two locations:
16//! - Global: `$DATA/<product>/skills/`
17//! - Project-local: `.<product>/skills/`
18//!
19//! # Quick start
20//!
21//! ```no_run
22//! use std::path::Path;
23//! use synwire_agent_skills::{loader::SkillLoader, registry::SkillRegistry};
24//!
25//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
26//! let loader = SkillLoader::new();
27//! let entries = loader.scan(Path::new("/path/to/skills")).await?;
28//!
29//! let mut registry = SkillRegistry::new();
30//! for entry in entries {
31//! registry.register(entry);
32//! }
33//!
34//! for (name, desc) in registry.list_names_and_descriptions() {
35//! println!("{name}: {desc}");
36//! }
37//! # Ok(())
38//! # }
39//! ```
40
41#![forbid(unsafe_code)]
42
43pub mod error;
44pub mod loader;
45pub mod manifest;
46pub mod registry;
47pub mod runtime;