Skip to main content

Crate agents_skills

Crate agents_skills 

Source
Expand description

agents-skills as a library: the high-level Manager facade over a private domain layer.

The library is pure data — it never prints to stdout/stderr and never calls process::exit. The CLI binary (see src/main.rs + src/commands) is responsible for rendering outcomes and deciding exit codes.

§Quick tour

use agents_skills::{ListRequest, Manager};

// Point the manager at a scratch environment (hermetic, no real home access).
let manager = Manager::builder()
    .home("/tmp/home")
    .config("/tmp/config")
    .cwd("/tmp/project")
    .build();

// Install every skill from a source (see [`Manager::add`] for a local example).
// List what's installed.
let skills = manager.list(&ListRequest::default())?;

§Layering

The crate root exposes only the high-level Manager facade, its request/outcome types, the few data types the outcomes carry (Env, Source, Skill), and the unified error types. All domain logic (source parsing, agent directories, SKILL.md discovery, install, agent links, lock) lives in the private core module — an implementation detail that may change without a breaking release.

Re-exports§

pub use manager::AddOutcome;
pub use manager::AddRequest;
pub use manager::AgentLinkResult;
pub use manager::AgentOutcome;
pub use manager::AgentRequest;
pub use manager::AgentStatus;
pub use manager::BackupStatus;
pub use manager::DisableOutcome;
pub use manager::DisableRequest;
pub use manager::EnableOutcome;
pub use manager::EnableRequest;
pub use manager::InstallFailure;
pub use manager::InstallSuccess;
pub use manager::ListRequest;
pub use manager::ListedSkill;
pub use manager::Manager;
pub use manager::ManagerBuilder;
pub use manager::RemoveOutcome;
pub use manager::RemoveRequest;
pub use manager::Scope;
pub use manager::UpdateOutcome;
pub use manager::UpdateRequest;
pub use error::Error;
pub use error::Result;
pub use error::SkillsError;

Modules§

error
Unified error types.
manager
High-level Manager facade: one-stop add/list/remove/update over an injectable Env.

Structs§

Env
Context for agent detection/dir resolution (owns data, easy to inject in tests).
Skill
A discovered skill.
Source
Parsed source.

Enums§

LinkOutcome
Outcome of linking one agent’s skills dir to the canonical dir.
SourceType
The kind of a parsed source.

Functions§

agent_names
Every known agent identifier, in table order (useful for rendering choices).