Loading...
Loading...
A 'skill for creating skills'. This tool automates the entire process of converting any GitHub repository into a standardized Trae skill, and is a core tool for expanding AI Agent capabilities.
npx skill4agent add yujunzhixue/github-skill-forge github-skill-forge# Basic dependencies
Python 3.7+
Git# Syntax: python scripts/forge.py <URL> [SKILL_NAME]
python3 .trae/skills/github-skill-forge/scripts/forge.py "https://github.com/username/repo".trae/skills# Basic usage
python3 .trae/skills/github-skill-forge/scripts/forge.py "https://github.com/username/repo"
# Specify skill name
python3 .trae/skills/github-skill-forge/scripts/forge.py "https://github.com/username/repo" "my-custom-skill"context_bundle.mdcontext_bundle.mdpip install -r src/requirements.txtsrc/....trae/skills/<new_skill>/scripts/python3 .trae/skills/<new_skill>/src/<main_script>.py --helppython3 .trae/skills/github-skill-forge/scripts/forge.py https://github.com/sqlmapproject/sqlmapread .trae/skills/sqlmap/context_bundle.mdedit .trae/skills/sqlmap/SKILL.mdpython3 .trae/skills/sqlmap/src/sqlmap.py --helppython3 .trae/skills/github-skill-forge/scripts/forge.py "https://github.com/requests/requests" "http-requests-lib"http-requests-libcontext_bundle.mdscripts/scripts/fuzzy-search.pyscripts/history-search.py## Usage
### Basic File Search
```bash
python3 scripts/fuzzy-search.pypython3 scripts/history-search.py# macOS
brew install fzf
# Linux
sudo apt install fzf
# Windows
choco install fzfundefinedscripts/json-format.pyscripts/json-query.py## Usage Examples
### Format JSON
```bash
cat data.json | python3 scripts/json-format.pypython3 scripts/json-query.py "data.json" ".users[0].name"undefinedfrom forge import create_context_bundle
create_context_bundle("./src", "./context_bundle.md")limitforge.pydef get_file_tree(start_path, limit=100): # Increase limit to 100 files
...# Create a batch installation script
for url in "https://github.com/fzf" "https://github.com/jqlang/jq" "https://github.com/sharkdp/bat"; do
python3 .trae/skills/github-skill-forge/scripts/forge.py "$url"
done# Custom default skill name
export SKILL_FORCE_NAME="custom-skill"
# Custom file limit
export SKILL_FILE_LIMIT=100
# Custom document truncation size
export SKILL_DOC_TRUNCATE=20000❌ Git clone failed: fatal: Could not read from remote repository.git config --global credential.helper store⚠️ Warning: Skill directory 'xxx' already exists.
❌ Aborting: Directory exists.python3 forge.py <URL> new_skill_namerm -rf .trae/skills/xxxModuleNotFoundError: No module named 'xxx'context_bundle.mdPermission denied: '.trae/skills/xxx'ls -la .trae/skills/chmod -R 755 .trae/skills/Git LFS: (1 of 1 files) 0 B / 100.00 MBgit lfs installgit lfs pullcontext_bundle.md-h/--help.trae/skills/
└── <skill-name>/
├── SKILL.md # Skill documentation
├── context_bundle.md # Context aggregation (auto-generated)
├── requirements.txt # Dependencies (optional)
├── src/ # Source code
│ └── <main-script>
├── scripts/ # Wrapper scripts (optional)
│ └── <helper-scripts>
└── references/ # Reference documents (optional)
└── <documentation>---
name: <skill-name>
description: <brief description>
---
# <Skill Name>
## Features
- <Feature 1>
- <Feature 2>
## Requirements
- <Dependency 1>
- <Dependency 2>
## Installation
```bash
<installation command><basic command><advanced command>
## Performance Optimization
### 1. Reduce Clone Depth
```bash
# Use shallow clone
git clone --depth 1 <url># Add in forge.py
SKIP_DIRS = ['.git', '.github', 'docs', 'test']
SKIP_FILES = ['*.md', '*.txt']# Use multi-threading for multiple tasks
import concurrent.futures
with concurrent.futures.ThreadPoolExecutor() as executor:
executor.submit(process_file, file1)
executor.submit(process_file, file2)# .github/workflows/skill-test.yml
name: Test Skills
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: pip install -r requirements.txt
- name: Test skill
run: python3 src/main.py --help# Regularly update skill scripts
0 0 * * 0 cd /path/to/skills && python3 github-skill-forge/scripts/forge.py <url>.git