Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions skillnet-ai/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,6 @@ skillnet = "skillnet_ai.cli:app"

[tool.setuptools.packages.find]
where = ["src"]

[tool.setuptools.package-data]
"skillnet_ai.prompts" = ["templates/*.md"]
893 changes: 0 additions & 893 deletions skillnet-ai/src/skillnet_ai/prompts.py

This file was deleted.

52 changes: 52 additions & 0 deletions skillnet-ai/src/skillnet_ai/prompts/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
from pathlib import Path

_TEMPLATE_DIR = Path(__file__).parent / "templates"


def _load_template(filename: str) -> str:
return (_TEMPLATE_DIR / filename).read_text(encoding="utf-8")


CANDIDATE_METADATA_SYSTEM_PROMPT = "You are a helpful assistant."

SKILL_CONTENT_SYSTEM_PROMPT = "You are an expert Technical Writer specializing in creating SKILL for AI agents."

RELATIONSHIP_ANALYSIS_SYSTEM_PROMPT = """
You are the SkillNet Architect.
"""

CANDIDATE_METADATA_USER_PROMPT_TEMPLATE = _load_template("candidate_metadata_user.md")

SKILL_CONTENT_USER_PROMPT_TEMPLATE = _load_template("skill_content_user.md")

SKILL_EVALUATION_PROMPT = _load_template("skill_evaluation.md")

GITHUB_SKILL_SYSTEM_PROMPT = _load_template("github_skill_system.md")

GITHUB_SKILL_USER_PROMPT_TEMPLATE = _load_template("github_skill_user.md")

OFFICE_SKILL_SYSTEM_PROMPT = _load_template("office_skill_system.md")

OFFICE_SKILL_USER_PROMPT_TEMPLATE = _load_template("office_skill_user.md")

PROMPT_SKILL_SYSTEM_PROMPT = _load_template("prompt_skill_system.md")

PROMPT_SKILL_USER_PROMPT_TEMPLATE = _load_template("prompt_skill_user.md")

RELATIONSHIP_ANALYSIS_USER_PROMPT_TEMPLATE = _load_template("relationship_analysis_user.md")

__all__ = [
"CANDIDATE_METADATA_SYSTEM_PROMPT",
"CANDIDATE_METADATA_USER_PROMPT_TEMPLATE",
"SKILL_CONTENT_SYSTEM_PROMPT",
"SKILL_CONTENT_USER_PROMPT_TEMPLATE",
"SKILL_EVALUATION_PROMPT",
"GITHUB_SKILL_SYSTEM_PROMPT",
"GITHUB_SKILL_USER_PROMPT_TEMPLATE",
"OFFICE_SKILL_SYSTEM_PROMPT",
"OFFICE_SKILL_USER_PROMPT_TEMPLATE",
"PROMPT_SKILL_SYSTEM_PROMPT",
"PROMPT_SKILL_USER_PROMPT_TEMPLATE",
"RELATIONSHIP_ANALYSIS_SYSTEM_PROMPT",
"RELATIONSHIP_ANALYSIS_USER_PROMPT_TEMPLATE",
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
Your goal is to analyze an interaction trajectory and extract **reusable Skills**.

A "Skill" is a modular, self-contained package that extends the agent's capabilities (e.g., "PDF Processor", "Market Analyzer", "Code Reviewer").

# Core Objective
1. Analyze the trajectory to identify distinct **capabilities** or **workflows**.
2. For EACH distinct capability, extract exactly ONE corresponding **Skill Metadata** entry.

*Note: Avoid over-fragmentation. If the trajectory is a coherent workflow (e.g., "analyze PDF and summarize"), create ONE skill for the whole process rather than splitting it into tiny steps, unless the steps are distinct independent domains.*

# Input Data
**Execution Trajectory:**
{trajectory}

# Step 1: Skill Identification
Identify skills that are:
- **Reusable**: Useful for future, similar requests.
- **Modular**: Self-contained with clear inputs and outputs.
- **Domain Specific**: Provides specialized knowledge or workflow logic.

# Step 2: Metadata Extraction Rules
For EACH identified skill, generate metadata with:

### `name` requirements:
- **kebab-case** (e.g., `financial-report-generator`, `code-refactor-tool`).
- Concise but descriptive.

### `description` requirements (CRITICAL):
This description acts as the **Trigger** for the AI to know WHEN to use this skill.
It must be a **When-To-Use** statement containing:
1. **Context**: The specific situation or user intent (e.g., "When the user asks to analyze a PDF...").
2. **Capabilities**: What the skill provides (e.g., "...extracts text and summarizes financial metrics").
3. **Triggers**: Specific keywords or file types associated with this skill.

# Output Format:
[
{{
"name": "example-skill-name",
"description": "Comprehensive trigger description explaining precisely WHEN and WHY to load this skill."
}},
...
]
Comment on lines +35 to +42
Copy link
Author

@shenxiangzhuang shenxiangzhuang Mar 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Take this block for example, the markdown render result is worser than the python string. So if we want to use markdown as the prompt file, some modifications to adress these format issues should be done firstly.

Image


Keep your output in the format below:
<Skill_Candidate_Metadata>
your generated candidate metadata list in JSON format here
</Skill_Candidate_Metadata>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
You are an expert Technical Writer specializing in creating Skills for AI agents.
Your task is to analyze a GitHub repository and generate a comprehensive skill package that captures the repository's functionality and usage patterns.

CRITICAL REQUIREMENTS:
1. Generate COMPLETE content - do not truncate or abbreviate sections
2. Include ALL installation steps with actual commands from README
3. Extract CONCRETE code examples from README - copy them exactly, don't invent new ones
4. List specific models, APIs, or tools mentioned in the repository
5. For scripts/: Generate REAL, RUNNABLE Python code that demonstrates library usage
6. For references/: Generate DETAILED API documentation with actual function signatures
7. Follow the SkillNet skill structure standard exactly
8. Output files in parseable format with ## FILE: markers

SCRIPT QUALITY REQUIREMENTS:
- Scripts must be self-contained and runnable (no os.system('conda activate'))
- Scripts should demonstrate actual library API usage, not shell command wrappers
- Include proper imports, error handling, and docstrings
- If the library requires specific data, use placeholder paths with clear comments

REFERENCE QUALITY REQUIREMENTS:
- API references must include actual function signatures from code analysis
- Include parameter types, return types, and brief descriptions
- Organize by module/class hierarchy
- Reference the source file locations

Your output will be parsed by a script, so maintain strict formatting.
Loading