dev_prune/commands/
skill.rs1use anyhow::Result;
20use std::fs;
21
22use crate::config::Registry;
23use crate::output;
24
25pub const EMBEDDED_SKILL_MD: &str = include_str!("../../.agents/skills/dev-prune/SKILL.md");
26
27pub fn run() -> Result<()> {
29 output::print_header("dev-prune AI Agent Skill Integration");
30
31 let skill_path = if let Ok(config_dir) = Registry::config_dir() {
32 if !config_dir.exists() {
33 let _ = fs::create_dir_all(&config_dir);
34 }
35 let target = config_dir.join("SKILL.md");
36 let _ = fs::write(&target, EMBEDDED_SKILL_MD);
37 output::clean_path(&target)
38 } else {
39 "~/.config/dev-prune/SKILL.md".to_string()
40 };
41
42 output::print_success(&format!("Bundled SKILL.md exported to `{skill_path}`"));
43 println!();
44 output::print_header("🤖 AI Agent Onboarding Prompts (Copy & Paste to your AI Assistant)");
45 println!();
46 output::print_info("Prompt 1: Initial Workspace Discovery & Onboarding");
47 println!("```markdown");
48 println!(
49 "Read the dev-prune AI skill at file://{skill_path} and run `devp init` to scan, register, and onboard all Git repositories in my workspace."
50 );
51 println!("```");
52 println!();
53 output::print_info(
54 "Prompt 2: Universal Skill Import (Antigravity, Claude Code, Cursor, Windsurf, Copilot, OpenClaw)",
55 );
56 println!("```markdown");
57 println!(
58 "I have installed `dev-prune` on my machine. Read the skill at file://{skill_path} and import it into your agent skills folder so you can autonomously maintain lockfiles and prune bloat directories."
59 );
60 println!("```");
61
62 Ok(())
63}