docs: standardize on ~/.agents/skills/ as canonical skill path (#8239)
Signed-off-by: Bradley Axen <baxen@squareup.com>
This commit is contained in:
@@ -154,11 +154,8 @@ impl Agent {
|
||||
if skills.is_empty() {
|
||||
output.push_str("No skills installed.\n\n");
|
||||
output.push_str("Skills are loaded from SKILL.md files in:\n");
|
||||
output.push_str(" - ~/.claude/skills/\n");
|
||||
output.push_str(" - ~/.config/agents/skills/\n");
|
||||
output.push_str(" - .goose/skills/ (in current directory)\n");
|
||||
output.push_str(" - .claude/skills/ (in current directory)\n");
|
||||
output.push_str(" - .agents/skills/ (in current directory)\n");
|
||||
output.push_str(" - ~/.agents/skills/ (global)\n");
|
||||
output.push_str(" - .agents/skills/ (in current project)\n");
|
||||
} else {
|
||||
output.push_str(&format!("**Installed skills ({}):**\n\n", skills.len()));
|
||||
for skill in &skills {
|
||||
|
||||
@@ -410,6 +410,7 @@ fn discover_filesystem_sources(working_dir: &Path) -> Vec<Source> {
|
||||
let local_recipe_dirs: Vec<PathBuf> = vec![
|
||||
working_dir.to_path_buf(),
|
||||
working_dir.join(".goose/recipes"),
|
||||
working_dir.join(".agents/recipes"),
|
||||
];
|
||||
|
||||
let global_recipe_dirs: Vec<PathBuf> = std::env::var("GOOSE_RECIPE_PATH")
|
||||
@@ -419,7 +420,14 @@ fn discover_filesystem_sources(working_dir: &Path) -> Vec<Source> {
|
||||
let sep = if cfg!(windows) { ';' } else { ':' };
|
||||
p.split(sep).map(PathBuf::from).collect::<Vec<_>>()
|
||||
})
|
||||
.chain([config.join("recipes")])
|
||||
.chain(
|
||||
[
|
||||
Some(config.join("recipes")),
|
||||
home.as_ref().map(|h| h.join(".agents/recipes")),
|
||||
]
|
||||
.into_iter()
|
||||
.flatten(),
|
||||
)
|
||||
.collect();
|
||||
|
||||
let local_skill_dirs: Vec<PathBuf> = vec![
|
||||
@@ -429,6 +437,7 @@ fn discover_filesystem_sources(working_dir: &Path) -> Vec<Source> {
|
||||
];
|
||||
|
||||
let global_skill_dirs: Vec<PathBuf> = [
|
||||
home.as_ref().map(|h| h.join(".agents/skills")),
|
||||
Some(config.join("skills")),
|
||||
home.as_ref().map(|h| h.join(".claude/skills")),
|
||||
home.as_ref().map(|h| h.join(".config/agents/skills")),
|
||||
@@ -440,9 +449,11 @@ fn discover_filesystem_sources(working_dir: &Path) -> Vec<Source> {
|
||||
let local_agent_dirs: Vec<PathBuf> = vec![
|
||||
working_dir.join(".goose/agents"),
|
||||
working_dir.join(".claude/agents"),
|
||||
working_dir.join(".agents/agents"),
|
||||
];
|
||||
|
||||
let global_agent_dirs: Vec<PathBuf> = [
|
||||
home.as_ref().map(|h| h.join(".agents/agents")),
|
||||
Some(config.join("agents")),
|
||||
home.as_ref().map(|h| h.join(".claude/agents")),
|
||||
]
|
||||
@@ -1108,8 +1119,8 @@ impl SummonClient {
|
||||
"No sources available for load/delegate.\n\n\
|
||||
Sources are discovered from:\n\
|
||||
• Current recipe's sub_recipes\n\
|
||||
• .goose/recipes/, .goose/skills/, .goose/agents/\n\
|
||||
• ~/.config/goose/recipes/, skills/, agents/\n\
|
||||
• .agents/skills/, .agents/recipes/, .agents/agents/ (project-level)\n\
|
||||
• ~/.agents/skills/, ~/.agents/agents/ (global)\n\
|
||||
• GOOSE_RECIPE_PATH directories\n\
|
||||
• Builtin skills",
|
||||
)]);
|
||||
|
||||
@@ -28,6 +28,14 @@ fn local_recipe_dirs() -> Vec<PathBuf> {
|
||||
local_dirs.push(get_recipe_library_dir(true));
|
||||
local_dirs.push(get_recipe_library_dir(false));
|
||||
|
||||
// Also scan .agents/recipes/ for consistency with the .agents/ convention
|
||||
if let Ok(cwd) = env::current_dir() {
|
||||
local_dirs.push(cwd.join(".agents/recipes"));
|
||||
}
|
||||
if let Some(home) = dirs::home_dir() {
|
||||
local_dirs.push(home.join(".agents/recipes"));
|
||||
}
|
||||
|
||||
let mut dirs: Vec<PathBuf> = local_dirs
|
||||
.into_iter()
|
||||
.map(|dir| dir.canonicalize().unwrap_or(dir))
|
||||
|
||||
Reference in New Issue
Block a user