Create, Evaluate, and Connect AI Skills
Python ai-agentsai-skillsartificial-intelligenceknowledge-graphlarge-language-modelsnatural-language-processingopenkgskillnetskills
update creator
Jiang Chenf6ba2cdef4c8
diff --git a/skillnet-ai/pyproject.toml b/skillnet-ai/pyproject.tomlindex 3f830ad..b4163bd 100644--- a/skillnet-ai/pyproject.toml+++ b/skillnet-ai/pyproject.toml@@ -19,7 +19,21 @@ dependencies = ["requests>=2.25.0","openai>=1.0.0","pydantic>=2.0.0",- "tqdm>=4.0.0" # Added for progress bars during download+ "tqdm>=4.0.0",+ "typer>=0.9.0",+ "rich>=13.0.0"+]++[project.optional-dependencies]+office = [+ "PyPDF2>=3.0.0",+ "python-docx>=0.8.11",+ "python-pptx>=0.6.21"+]+all = [+ "PyPDF2>=3.0.0",+ "python-docx>=0.8.11",+ "python-pptx>=0.6.21"][project.urls]diff --git a/skillnet-ai/src/skillnet_ai/cli.py b/skillnet-ai/src/skillnet_ai/cli.pyindex 83b0d89..001dc84 100644--- a/skillnet-ai/src/skillnet_ai/cli.py+++ b/skillnet-ai/src/skillnet_ai/cli.py@@ -148,18 +148,25 @@ def download(@app.command()def create(- trajectory_file: Path = typer.Argument(None, exists=True, readable=True, help="Path to the text file containing the execution trajectory/logs. Not required if using --github."),- output_dir: Path = typer.Option(Path("./generated_skills"), help="Directory where the new skills will be saved."),- model: str = typer.Option("gpt-4o", help="The LLM model to use (e.g., gpt-4o, gpt-3.5-turbo)."),- github: str = typer.Option(None, "--github", "-g", help="GitHub repository URL to create skill from (e.g., https://github.com/owner/repo)."),- max_files: int = typer.Option(20, "--max-files", help="Maximum Python files to analyze when using --github."),+ # Input sources (mutually exclusive)+ trajectory_file: Path = typer.Argument(None, exists=True, readable=True, help="Path to trajectory/log file."),+ github: str = typer.Option(None, "--github", "-g", help="GitHub repository URL (e.g., https://github.com/owner/repo)."),+ office: Path = typer.Option(None, "--office", "-o", exists=True, readable=True, help="Path to office document (PDF, PPT, Word)."),+ prompt: str = typer.Option(None, "--prompt", "-p", help="Direct description to generate skill from."),+ # Output options+ output_dir: Path = typer.Option(Path("./generated_skills"), "--output-dir", "-d", help="Directory to save generated skills."),+ # Model options+ model: str = typer.Option("gpt-4o", "--model", "-m", help="LLM model to use (e.g., gpt-4o, gpt-3.5-turbo)."),+ max_files: int = typer.Option(20, "--max-files", help="Max Python files to analyze (--github only)."),):"""Create executable Skill packages using AI.- Supports two modes:+ Supports four modes:- From trajectory: skillnet create trajectory.txt- From GitHub: skillnet create --github https://github.com/owner/repo+ - From Office doc: skillnet create --office document.pdf+ - From prompt: skillnet create --prompt "Create a skill for...""""# 1. Validate Environmentif not API_KEY:@@ -167,19 +174,36 @@ def create(console.print("Please export API_KEY or set it in your environment.")raise typer.Exit(code=1)- # 2. Determine mode: GitHub or Trajectory- if github:- # GitHub mode- _create_from_github(github, output_dir, model, max_files)- elif trajectory_file:- # Trajectory mode- _create_from_trajectory(trajectory_file, output_dir, model)- else:- console.print("[bold red]Error:[/bold red] Either provide a trajectory file or use --github option.")+ # 2. Determine mode based on provided options+ mode_count = sum([+ bool(github),+ bool(trajectory_file),+ bool(office),+ bool(prompt)+ ])++ if mode_count == 0:+ console.print("[bold red]Error:[/bold red] Must specify one input source.")console.print("\nUsage examples:")console.print(" skillnet create trajectory.txt")console.print(" skillnet create --github https://github.com/owner/repo")+ console.print(" skillnet create --office document.pdf")+ console.print(' skillnet create --prompt "Create a skill for web scraping"')raise typer.Exit(code=1)++ if mode_count > 1:+ console.print("[bold red]Error:[/bold red] Only one input source can be specified at a time.")+ raise typer.Exit(code=1)++ # 3. Route to appropriate handler+ if github:+ _create_from_github(github, output_dir, model, max_files)+ elif trajectory_file:+ _create_from_trajectory(trajectory_file, output_dir, model)+ elif office:+ _create_from_office(office, output_dir, model)+ elif prompt:+ _create_from_prompt(prompt, output_dir, model)def _create_from_trajectory(trajectory_file: Path, output_dir: Path, model: str):@@ -274,6 +298,95 @@ def _create_from_github(github_url: str, output_dir: Path, model: str, max_filesraise typer.Exit(code=1)+def _create_from_office(office_file: Path, output_dir: Path, model: str):+ """Internal function to create skill from office document."""+ try:+ console.print(f"[dim]Creating skill from office document: {office_file}[/dim]")++ # Initialize Creator+ creator = SkillCreator(+ api_key=API_KEY,+ base_url=BASE_URL,+ model=model+ )++ # Run Generation with Spinner+ with console.status("[bold green]Extracting content and generating skill...[/bold green]", spinner="dots"):+ created_paths = creator.create_from_office(+ file_path=str(office_file),+ output_dir=str(output_dir)+ )++ # Report Results+ if created_paths:+ console.print(f"\n[bold green]Success! Generated {len(created_paths)} skill(s) from document:[/bold green]")++ table = Table(show_header=True, header_style="bold magenta")+ table.add_column("Skill Name", style="cyan")+ table.add_column("Location", style="white")++ for path in created_paths:+ skill_name = os.path.basename(path)+ table.add_row(skill_name, str(path))++ console.print(table)+ console.print(f"\n[dim]Files saved to: {os.path.abspath(output_dir)}[/dim]")+ console.print("\n[dim]Tip: Use 'skillnet evaluate <skill_path>' to evaluate the generated skill.[/dim]")+ else:+ console.print("\n[yellow]Failed to generate skill from the document.[/yellow]")++ except ImportError as e:+ console.print(f"\n[bold red]Missing Dependency:[/bold red] {str(e)}")+ console.print("\n[dim]Install office document support with:[/dim]")+ console.print(" pip install PyPDF2 python-docx python-pptx")+ raise typer.Exit(code=1)+ except Exception as e:+ console.print(f"\n[bold red]Office Skill Creation Failed:[/bold red] {str(e)}")+ raise typer.Exit(code=1)+++def _create_from_prompt(user_prompt: str, output_dir: Path, model: str):+ """Internal function to create skill from user's prompt description."""+ try:+ console.print(f"[dim]Creating skill from user prompt...[/dim]")++ # Initialize Creator+ creator = SkillCreator(+ api_key=API_KEY,+ base_url=BASE_URL,+ model=model+ )++ # Run Generation with Spinner+ with console.status("[bold green]AI is generating your custom skill...[/bold green]", spinner="dots"):+ created_paths = creator.create_from_prompt(+ user_input=user_prompt,+ output_dir=str(output_dir)+ )++ # Report Results+ if created_paths:+ console.print(f"\n[bold green]Success! Generated {len(created_paths)} skill(s) from your description:[/bold green]")++ table = Table(show_header=True, header_style="bold magenta")+ table.add_column("Skill Name", style="cyan")+ table.add_column("Location", style="white")++ for path in created_paths:+ skill_name = os.path.basename(path)+ table.add_row(skill_name, str(path))++ console.print(table)+ console.print(f"\n[dim]Files saved to: {os.path.abspath(output_dir)}[/dim]")+ console.print("\n[dim]Tip: Use 'skillnet evaluate <skill_path>' to evaluate the generated skill.[/dim]")+ else:+ console.print("\n[yellow]Failed to generate skill from your description.[/yellow]")++ except Exception as e:+ console.print(f"\n[bold red]Prompt-based Skill Creation Failed:[/bold red] {str(e)}")+ raise typer.Exit(code=1)++@app.command()def evaluate(target: str = typer.Argument(..., help="Path to a local skill directory OR a GitHub URL."),diff --git a/skillnet-ai/src/skillnet_ai/client.py b/skillnet-ai/src/skillnet_ai/client.pyindex 3945f18..ee548d1 100644--- a/skillnet-ai/src/skillnet_ai/client.py+++ b/skillnet-ai/src/skillnet_ai/client.py@@ -115,36 +115,59 @@ class SkillNetClient:def create(self,+ input_type: str = "auto",trajectory_content: Optional[str] = None,github_url: Optional[str] = None,+ office_file: Optional[str] = None,+ prompt: Optional[str] = None,output_dir: Union[str, Path] = "./generated_skills",model: str = "gpt-4o",max_files: int = 20) -> List[str]:"""- Generate executable skills from a trajectory log or GitHub repository.+ Generate executable skills from various input sources.Args:+ input_type: Input source type. One of:+ - "auto": Auto-detect based on provided parameters (default)+ - "github": Create from GitHub repository+ - "trajectory": Create from execution log/trajectory+ - "office": Create from PDF/PPT/Word document+ - "prompt": Create from user's direct descriptiontrajectory_content: The text content of the execution log/trajectory.- github_url: Full URL to GitHub repository (e.g., https://github.com/owner/repo).+ github_url: Full URL to GitHub repository.+ office_file: Path to office document (PDF, PPT, Word).+ prompt: User's description for prompt-based skill creation.output_dir: Directory where new skills will be saved.model: The LLM model to use.- max_files: Maximum number of Python files to analyze (GitHub mode only).+ max_files: Maximum Python files to analyze (GitHub mode only).Returns:List[str]: A list of paths to the generated skill folders.-- Note:- Provide either trajectory_content OR github_url, not both."""if not self.api_key:raise SkillNetError("API_KEY is required for skill creation.")- if trajectory_content and github_url:- raise SkillNetError("Provide either trajectory_content OR github_url, not both.")-- if not trajectory_content and not github_url:- raise SkillNetError("Must provide trajectory_content or github_url.")+ # Auto-detect input type if not specified+ if input_type == "auto":+ if github_url:+ input_type = "github"+ elif trajectory_content:+ input_type = "trajectory"+ elif office_file:+ input_type = "office"+ elif prompt:+ input_type = "prompt"+ else:+ raise SkillNetError(+ "Must provide one of: trajectory_content, github_url, "+ "office_file, or diy_prompt."+ )++ # Validate input_type+ valid_types = {"github", "trajectory", "office", "prompt", "auto"}+ if input_type not in valid_types:+ raise SkillNetError(f"Invalid input_type: {input_type}. Must be one of {valid_types}")try:creator = SkillCreator(@@ -153,18 +176,38 @@ class SkillNetClient:model=model)- if github_url:+ if input_type == "github":+ if not github_url:+ raise SkillNetError("github_url is required for github input type.")created_paths = creator.create_from_github(github_url=github_url,output_dir=str(output_dir),api_token=self.github_token,max_files=max_files)- else:+ elif input_type == "trajectory":+ if not trajectory_content:+ raise SkillNetError("trajectory_content is required for trajectory input type.")created_paths = creator.create_from_trajectory(trajectory=trajectory_content,output_dir=str(output_dir))+ elif input_type == "office":+ if not office_file:+ raise SkillNetError("office_file is required for office input type.")+ created_paths = creator.create_from_office(+ file_path=office_file,+ output_dir=str(output_dir)+ )+ elif input_type == "prompt":+ if not prompt:+ raise SkillNetError("prompt is required for prompt input type.")+ created_paths = creator.create_from_prompt(+ user_input=prompt,+ output_dir=str(output_dir)+ )+ else:+ raise SkillNetError(f"Unknown input_type: {input_type}")return created_paths if created_paths else []except Exception as e:diff --git a/skillnet-ai/src/skillnet_ai/creator.py b/skillnet-ai/src/skillnet_ai/creator.pyindex 3a759c8..f219ff2 100644--- a/skillnet-ai/src/skillnet_ai/creator.py+++ b/skillnet-ai/src/skillnet_ai/creator.py@@ -13,7 +13,11 @@ from skillnet_ai.prompts import (SKILL_CONTENT_SYSTEM_PROMPT,SKILL_CONTENT_USER_PROMPT_TEMPLATE,GITHUB_SKILL_SYSTEM_PROMPT,- GITHUB_SKILL_USER_PROMPT_TEMPLATE+ GITHUB_SKILL_USER_PROMPT_TEMPLATE,+ OFFICE_SKILL_SYSTEM_PROMPT,+ OFFICE_SKILL_USER_PROMPT_TEMPLATE,+ PROMPT_SKILL_SYSTEM_PROMPT,+ PROMPT_SKILL_USER_PROMPT_TEMPLATE)logger = logging.getLogger(__name__)@@ -141,6 +145,118 @@ class SkillCreator:return created_files+ def create_from_office(+ self,+ file_path: str,+ output_dir: str = "./generated_skills"+ ) -> List[str]:+ """+ Create a skill package from an Office document (PDF, PPT, Word).++ Args:+ file_path: Path to the office document+ output_dir: Directory where new skills will be saved++ Returns:+ List of paths to created skill directories+ """+ logger.info(f"Creating skill from office document: {file_path}")++ if not os.path.exists(file_path):+ raise FileNotFoundError(f"File not found: {file_path}")++ if not _OfficeReader.is_supported(file_path):+ raise ValueError(+ f"Unsupported file type. Supported: {_OfficeReader.SUPPORTED_EXTENSIONS}"+ )++ # Extract text content+ document_content = _OfficeReader.extract_text(file_path)+ if not document_content.strip():+ logger.warning("No text content extracted from document")+ return []++ filename = os.path.basename(file_path)+ file_type = _OfficeReader.get_file_type(file_path)++ # Generate skill using LLM+ user_prompt = OFFICE_SKILL_USER_PROMPT_TEMPLATE.format(+ filename=filename,+ file_type=file_type,+ document_content=document_content+ )++ messages = [+ {"role": "system", "content": OFFICE_SKILL_SYSTEM_PROMPT},+ {"role": "user", "content": user_prompt}+ ]++ try:+ response = self._get_llm_response(messages, max_tokens=8192)+ created_files = self._save_github_skill_files(response, output_dir)++ # Extract unique skill directories+ skill_dirs = set()+ for created_file in created_files:+ rel_path = os.path.relpath(created_file, output_dir)+ skill_dir = rel_path.split(os.sep)[0]+ skill_dirs.add(os.path.join(output_dir, skill_dir))++ logger.info(f"Skill created from office document: {file_path}")+ return list(skill_dirs)++ except Exception as e:+ logger.error(f"Failed to create skill from office document: {e}")+ return []++ def create_from_prompt(+ self,+ user_input: str,+ output_dir: str = "./generated_skills"+ ) -> List[str]:+ """+ Create a skill package from user's direct description.++ Args:+ user_input: User's description of the skill to create+ output_dir: Directory where new skills will be saved++ Returns:+ List of paths to created skill directories+ """+ logger.info("Creating skill from user prompt")++ if not user_input or not user_input.strip():+ raise ValueError("User input cannot be empty")++ # Generate skill using LLM+ user_prompt = PROMPT_SKILL_USER_PROMPT_TEMPLATE.format(+ user_input=user_input+ )++ messages = [+ {"role": "system", "content": PROMPT_SKILL_SYSTEM_PROMPT},+ {"role": "user", "content": user_prompt}+ ]++ try:+ response = self._get_llm_response(messages, max_tokens=8192)+ created_files = self._save_github_skill_files(response, output_dir)++ # Extract unique skill directories+ skill_dirs = set()+ for created_file in created_files:+ rel_path = os.path.relpath(created_file, output_dir)+ skill_dir = rel_path.split(os.sep)[0]+ skill_dirs.add(os.path.join(output_dir, skill_dir))++ logger.info("Skill created from user input")+ return list(skill_dirs)++ except Exception as e:+ logger.error(f"Failed to create skill from user input: {e}")+ return []+def create_from_github(self,github_url: str,@@ -742,4 +858,169 @@ class _PythonCodeAnalyzer:"docstring": docstring[:200] if docstring else None,"is_async": isinstance(node, ast.AsyncFunctionDef),"decorators": decorators- }\ No newline at end of file+ }+++class _OfficeReader:+ """Extract text content from Office documents (PDF, PPT, Word)."""++ SUPPORTED_EXTENSIONS = {'.pdf', '.docx', '.doc', '.pptx', '.ppt'}++ @staticmethod+ def is_supported(file_path: str) -> bool:+ """Check if file type is supported."""+ ext = os.path.splitext(file_path)[1].lower()+ return ext in _OfficeReader.SUPPORTED_EXTENSIONS++ @staticmethod+ def get_file_type(file_path: str) -> str:+ """Get human-readable file type."""+ ext = os.path.splitext(file_path)[1].lower()+ type_map = {+ '.pdf': 'PDF Document',+ '.docx': 'Word Document',+ '.doc': 'Word Document (Legacy)',+ '.pptx': 'PowerPoint Presentation',+ '.ppt': 'PowerPoint Presentation (Legacy)'+ }+ return type_map.get(ext, 'Unknown')++ @staticmethod+ def extract_text(file_path: str, max_chars: int = 50000) -> str:+ """+ Extract text content from supported office documents.++ Args:+ file_path: Path to the office document+ max_chars: Maximum characters to extract++ Returns:+ Extracted text content++ Raises:+ ValueError: If file type not supported+ ImportError: If required library not installed+ """+ ext = os.path.splitext(file_path)[1].lower()++ if ext == '.pdf':+ return _OfficeReader._extract_pdf(file_path, max_chars)+ elif ext in ('.docx', '.doc'):+ return _OfficeReader._extract_word(file_path, max_chars)+ elif ext in ('.pptx', '.ppt'):+ return _OfficeReader._extract_ppt(file_path, max_chars)+ else:+ raise ValueError(f"Unsupported file type: {ext}")++ @staticmethod+ def _extract_pdf(file_path: str, max_chars: int) -> str:+ """Extract text from PDF file."""+ try:+ from PyPDF2 import PdfReader+ except ImportError:+ raise ImportError(+ "PyPDF2 is required for PDF extraction. "+ "Install with: pip install PyPDF2"+ )++ try:+ reader = PdfReader(file_path)+ text_parts = []+ total_chars = 0++ for page in reader.pages:+ page_text = page.extract_text() or ""+ if total_chars + len(page_text) > max_chars:+ remaining = max_chars - total_chars+ text_parts.append(page_text[:remaining])+ break+ text_parts.append(page_text)+ total_chars += len(page_text)++ return "\n\n".join(text_parts)+ except Exception as e:+ logger.error(f"Failed to extract PDF text: {e}")+ raise++ @staticmethod+ def _extract_word(file_path: str, max_chars: int) -> str:+ """Extract text from Word document."""+ try:+ from docx import Document+ except ImportError:+ raise ImportError(+ "python-docx is required for Word extraction. "+ "Install with: pip install python-docx"+ )++ try:+ doc = Document(file_path)+ text_parts = []+ total_chars = 0++ for para in doc.paragraphs:+ para_text = para.text.strip()+ if not para_text:+ continue+ if total_chars + len(para_text) > max_chars:+ remaining = max_chars - total_chars+ text_parts.append(para_text[:remaining])+ break+ text_parts.append(para_text)+ total_chars += len(para_text)++ # Also extract text from tables+ for table in doc.tables:+ if total_chars >= max_chars:+ break+ for row in table.rows:+ row_text = " | ".join(cell.text.strip() for cell in row.cells)+ if total_chars + len(row_text) > max_chars:+ break+ text_parts.append(row_text)+ total_chars += len(row_text)++ return "\n\n".join(text_parts)+ except Exception as e:+ logger.error(f"Failed to extract Word text: {e}")+ raise++ @staticmethod+ def _extract_ppt(file_path: str, max_chars: int) -> str:+ """Extract text from PowerPoint presentation."""+ try:+ from pptx import Presentation+ except ImportError:+ raise ImportError(+ "python-pptx is required for PowerPoint extraction. "+ "Install with: pip install python-pptx"+ )++ try:+ prs = Presentation(file_path)+ text_parts = []+ total_chars = 0++ for slide_num, slide in enumerate(prs.slides, 1):+ slide_texts = [f"--- Slide {slide_num} ---"]++ for shape in slide.shapes:+ if not shape.has_text_frame:+ continue+ for paragraph in shape.text_frame.paragraphs:+ para_text = paragraph.text.strip()+ if para_text:+ slide_texts.append(para_text)++ slide_content = "\n".join(slide_texts)+ if total_chars + len(slide_content) > max_chars:+ remaining = max_chars - total_chars+ text_parts.append(slide_content[:remaining])+ break+ text_parts.append(slide_content)+ total_chars += len(slide_content)++ return "\n\n".join(text_parts)+ except Exception as e:+ logger.error(f"Failed to extract PowerPoint text: {e}")+ raise\ No newline at end of filediff --git a/skillnet-ai/src/skillnet_ai/prompts.py b/skillnet-ai/src/skillnet_ai/prompts.pyindex 806a77b..2a0ad40 100644--- a/skillnet-ai/src/skillnet_ai/prompts.py+++ b/skillnet-ai/src/skillnet_ai/prompts.py@@ -602,4 +602,165 @@ Now, generate the complete skill package based on the provided GitHub repositoryFocus on creating a practical, comprehensive skill that an AI agent can use to work with this repository.DO NOT truncate content - include all relevant information from the README.SCRIPTS must demonstrate actual Python API usage, not shell command wrappers.-REFERENCES must include actual function signatures and parameters."""\ No newline at end of file+REFERENCES must include actual function signatures and parameters."""+++# ==========================================================================+# Office Document to Skill Prompts (PDF/PPT/Word)+# ==========================================================================++OFFICE_SKILL_SYSTEM_PROMPT = """You are an expert Technical Writer specializing in creating Skills for AI agents.+Your task is to analyze text content extracted from an office document (PDF, PPT, or Word) and convert it into a structured skill package.++CRITICAL REQUIREMENTS:+1. Identify the core knowledge, procedures, or guidelines from the document+2. Structure the content as a reusable AI skill+3. Extract actionable instructions that an AI agent can follow+4. Preserve key information while organizing it into the skill format+5. Generate appropriate scripts if the document describes code procedures+6. Create reference files for supplementary information++Output files in parseable format with ## FILE: markers."""++OFFICE_SKILL_USER_PROMPT_TEMPLATE = """+Your task is to convert the following document content into a structured skill package.++# Input: Document Content++**Source File:** {filename}+**File Type:** {file_type}++## Extracted Text Content:+{document_content}++# Skill Structure Standard+You must output the skill using the following directory structure:++```text+skill-name/+├── SKILL.md (required)+│ ├── YAML frontmatter metadata (required)+│ │ ├── name: (required)+│ │ └── description: (required)+│ └── Markdown instructions (required)+└── Bundled Resources (optional but recommended)+ ├── scripts/ - Executable code if applicable+ └── references/ - Additional documentation or data+```++# Content Analysis Guidelines++1. **Identify the Skill Name**: Derive from document title or main topic+2. **Create Description**: Write a "when-to-use" trigger statement+3. **Extract Procedures**: Convert step-by-step instructions into actionable format+4. **Identify Code/Commands**: If the document contains code, create scripts/+5. **Supplementary Info**: Move detailed references to references/++# SKILL.md Requirements++## YAML Frontmatter (REQUIRED)+```yaml+---+name: skill-name-in-kebab-case+description: When-to-use trigger statement explaining when this skill should be activated+---+```++## Content Sections to Include:+- **Overview**: Brief summary of what this skill covers+- **When to Use**: Clear triggers for skill activation+- **Prerequisites**: Any required knowledge, tools, or setup+- **Instructions/Procedures**: Main actionable content from document+- **Examples**: Practical examples if available in source+- **References**: Links to additional resources mentioned++# Output Format (STRICT)+For every file, use this exact pattern:++## FILE: <skill-name>/<path_to_file>+```<language_tag>+<file_content_here>+```++Generate a complete, practical skill package from this document content.+Focus on making the knowledge actionable for an AI agent."""+++# ==========================================================================+# Prompt-based Skill Generation (Direct User Description)+# ==========================================================================++PROMPT_SKILL_SYSTEM_PROMPT = """You are an expert Technical Writer specializing in creating Skills for AI agents.+Your task is to generate a complete skill package based on the user's description and requirements.++CRITICAL REQUIREMENTS:+1. Generate a comprehensive skill based on user's input+2. Create practical, actionable instructions+3. Include example scripts if the skill involves code+4. Add reference documentation where helpful+5. Make the skill reusable and well-structured++Think creatively about what resources would make this skill most useful.+Output files in parseable format with ## FILE: markers."""++PROMPT_SKILL_USER_PROMPT_TEMPLATE = """+Your task is to generate a complete skill package based on the following user description.++# User's Skill Request:+{user_input}++# Skill Structure Standard+You must output the skill using the following directory structure:++```text+skill-name/+├── SKILL.md (required)+│ ├── YAML frontmatter metadata (required)+│ │ ├── name: (required)+│ │ └── description: (required)+│ └── Markdown instructions (required)+└── Bundled Resources (optional but recommended)+ ├── scripts/ - Executable code demonstrating the skill+ └── references/ - API docs, templates, or reference material+```++# Generation Guidelines++Based on the user's description, you should:++1. **Determine Skill Name**: Create a kebab-case name reflecting the skill's purpose+2. **Write Description**: Create a "when-to-use" trigger statement+3. **Design Instructions**: Write clear, step-by-step procedures+4. **Add Scripts**: If applicable, create Python scripts demonstrating the skill+5. **Include References**: Add any helpful reference documentation++# SKILL.md Requirements++## YAML Frontmatter (REQUIRED)+```yaml+---+name: skill-name-in-kebab-case+description: When-to-use trigger statement explaining when this skill should be activated+---+```++## Recommended Sections:+- **Overview**: What this skill does+- **When to Use**: Clear triggers for skill activation+- **Prerequisites**: Required tools, libraries, or knowledge+- **Quick Start**: Fastest way to use this skill+- **Detailed Instructions**: Comprehensive step-by-step guide+- **Examples**: Practical usage examples+- **Tips & Best Practices**: Common pitfalls and recommendations+- **Troubleshooting**: Common issues and solutions++# Output Format (STRICT)+For every file, use this exact pattern:++## FILE: <skill-name>/<path_to_file>+```<language_tag>+<file_content_here>+```++Now, generate a complete, high-quality skill package based on the user's request.+Be comprehensive and practical - create a skill that an AI agent would find genuinely useful."""\ No newline at end of file