pub enum Environment {
ClaudeCode,
OpenCode,
Codex,
Cursor,
Generic,
}Expand description
The detected AI agent environment.
Variants§
ClaudeCode
Anthropic’s Claude Code CLI.
OpenCode
OpenCode CLI.
Codex
OpenAI’s Codex CLI.
Cursor
Cursor AI editor.
Generic
Unknown or generic environment.
Implementations§
Source§impl Environment
impl Environment
Sourcepub fn skill_rel_path(&self, name: &str) -> PathBuf
pub fn skill_rel_path(&self, name: &str) -> PathBuf
Return the skill file path pattern for this environment.
Given a skill name, returns the relative path where the skill file
should be installed. Each environment has its own convention:
| Environment | Path |
|---|---|
| Claude Code | .claude/skills/{name}/SKILL.md |
| OpenCode | .opencode/skills/{name}/SKILL.md |
| Codex | .codex/AGENTS.md |
| Cursor | .cursor/rules/{name}.md |
| Generic | AGENTS.md |
Sourcepub fn all_skill_rel_paths(name: &str) -> Vec<(Environment, PathBuf)>
pub fn all_skill_rel_paths(name: &str) -> Vec<(Environment, PathBuf)>
Return all skill file paths for installing across all environments.
Used by install --all to write skill files for every supported harness.
Trait Implementations§
Source§impl Clone for Environment
impl Clone for Environment
Source§fn clone(&self) -> Environment
fn clone(&self) -> Environment
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 moreSource§impl Debug for Environment
impl Debug for Environment
Source§impl Display for Environment
impl Display for Environment
Source§impl PartialEq for Environment
impl PartialEq for Environment
impl Copy for Environment
impl Eq for Environment
impl StructuralPartialEq for Environment
Auto Trait Implementations§
impl Freeze for Environment
impl RefUnwindSafe for Environment
impl Send for Environment
impl Sync for Environment
impl Unpin for Environment
impl UnsafeUnpin for Environment
impl UnwindSafe for Environment
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