Skill Purpose
Use CLI commands or API interfaces provided by the skill4agent platform to implement a complete workflow for searching skills, reading skill details, and installing skills.
Usage Options
This skill provides two mutually exclusive usage options:
- CLI Option: Requires Node.js environment, uses
npx skill4agentcommands - API Option: No external dependencies, uses direct HTTPS requests to skill4agent.com
Choose one option based on the available environment. If Node.js is available, prefer the CLI option for convenience. If Node.js is not available, use the API option.
Three Core Operations
1. Search Skills (search)
Purpose: Find relevant skills using Chinese, English, or mixed Chinese-English keywords
CLI Command (requires Node.js environment)
# Basic search (recommended to use -j for JSON format output)
npx skill4agent search <keyword> -j
# Control the number of returned results (recommended to use -j for JSON format output)
npx skill4agent search <keyword> -j -l <number>
API Interface
https://skill4agent.com/api/search?keyword=<keyword>
Parameter Description:
keyword(required): Search keyword (supports Chinese, English, or mixed Chinese-English)limit(optional): Number of returned results, default 10, maximum 50
Important Return Fields:
skillId: Skill IDsource: Skill source repositoryskill_name: Skill namedescription: Skill descriptiontags: Skill tagstotalInstalls: Number of installationsread_skill_url: Skill detail URLdownload_zip_url: Skill download URLtranslation: Translation information (original language, whether translation is available, translated language)script: Script check information (whether scripts are included, whether sensitive code exists, specific locations of sensitive code)
2. Read Skills (read)
Purpose: View detailed information and complete content of skill (SKILL.md)
CLI Command (requires Node.js environment)
# Read original content (recommended to use -j for JSON format output)
npx skill4agent read <source> <skill_name> -j
# Read translated content (recommended to use -j for JSON format output)
npx skill4agent read <source> <skill_name> --type translated -j
API Interface
https://skill4agent.com/api/skills/info?source=<source>&skill_name=<skill_name>
Parameter Description:
source(required): Skill source repository (obtained from search results)skill_name(required): Skill name (obtained from search results)type(optional): Content type (original/translated), defaultoriginal
Important Return Fields:
skillId: Skill IDsource: Skill source repositoryskill_name: Skill namedownload_zip_url: Skill download URLtranslation: Translation information (original language, whether translation is available, translated language)script: Script check information (whether scripts are included, whether sensitive code exists, specific locations of sensitive code)content: Detailed skill content (complete content of SKILL.md)
3. Install Skills (install)
Purpose: Install skills to local projects
CLI Command (requires Node.js environment)
# Install original skill
npx skill4agent install <source> <skill_name>
# Install translated skill
npx skill4agent install <source> <skill_name> --type translated
API Interface
https://skill4agent.com/api/download/<skillId>?type=<type>
Parameter Description:
skillId(required): Skill ID (obtained from search results or skill detail information)type(optional): Content type (original/translated), defaultoriginal
Installation Instructions
- CLI command: Installs to
.agents/skills/<skill_name>directory under the current directory - API interface: Download ZIP file and extract to get
<skill_name>directory - To install the skill to other paths (e.g., user-specified or application-required paths), move the skill directory to the target location manually
Script Security Check
Use the returned script field to check whether the skill contains scripts and whether sensitive code exists.
has_script:truemeans the skill contains scriptsscript_check_result:safe: Script is safeneed attention: Contains sensitive code
script_check_notes: Specific locations of sensitive code, need to recheck after installation
Note: For skills that contain scripts with sensitive code, you must obtain user consent before installation. After installation, recheck the sensitive code locations listed in script_check_notes along with the code context to ensure there are no risks of malicious programs, unauthorized access to user private information, modification or deletion of local files, or changes to system configurations.
Scenario-based Workflows
Scenario 1: Only understand related skills
- Action: Use keywords to search for relevant skills
- Output: Summarize search results and wait for user's further instructions
Scenario 2: Find suitable skills to complete tasks
- Search: Use keywords to search for relevant skills
- Filter: Preliminary filtering based on
description,tags, andtotalInstalls - Read: View detailed information about candidate skills, analyze whether the skill meets the task requirements
- Recommend: Recommend the most suitable skills to users (if the skill contains scripts with sensitive code, you must inform the user)
Scenario 3: Search and install skills
- Search: Use keywords to search for relevant skills
- Filter: Filter suitable skills based on search results
- Read (if needed): Further understand skill details, analyze whether the skill meets the task requirements
- Install: Install the skill to the required directory (for skills containing scripts with sensitive code, do NOT install without user consent - you must obtain user consent before installing)
- Script Security Recheck: If the skill contains scripts with sensitive code, recheck the sensitive code locations listed in
script_check_notesalong with the code context after installation to ensure there are no risks of malicious programs, unauthorized access to user private information, modification or deletion of local files, or changes to system configurations.
Search Optimization Suggestions
When no results are found:
- Optimize keywords: Use more general or concise keywords
- Switch language:
- If English search returns no results → Try Chinese or mixed Chinese-English keywords
- If Chinese search returns no results → Try English or mixed Chinese-English keywords
Best Practices
- JSON Format: Always add
-jparameter to search and read commands to return JSON format output for easier parsing - Language Version Selection: Choose appropriate version based on user's preferred language (check original and translated languages via
translationfield)