fork-project

Fork and set up open source projects under Lionad's GitHub account. Use when user wants to create a new project based on an existing repository that is not owned by Lionad. Triggers when git remote origin is not a Lionad repository and user wants to create their own version.

Best use case

fork-project is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Fork and set up open source projects under Lionad's GitHub account. Use when user wants to create a new project based on an existing repository that is not owned by Lionad. Triggers when git remote origin is not a Lionad repository and user wants to create their own version.

Teams using fork-project should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/fork-project/SKILL.md --create-dirs "https://raw.githubusercontent.com/Lionad-Morotar/local-tools/main/local-link/skills/fork-project/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/fork-project/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How fork-project Compares

Feature / Agentfork-projectStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Fork and set up open source projects under Lionad's GitHub account. Use when user wants to create a new project based on an existing repository that is not owned by Lionad. Triggers when git remote origin is not a Lionad repository and user wants to create their own version.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Create Project

## Overview

This skill handles the workflow of forking or creating new GitHub projects under Lionad's account when working with third-party repositories. It manages repository setup, remote configuration, and documentation updates.

## Workflow

### Step 1: Check Current Repository Ownership

Run the following command to check if the current project belongs to Lionad:

```bash
git remote get-url origin
```

**Decision:**
- If URL contains `github.com/Lionad-Morotar/` or `github.com/lionad/` → **Stop**, this is already Lionad's project
- If URL contains other usernames → **Continue to Step 2**

### Step 2: Determine Project Name

**Must consult user for the new project name.**

Ask the user:
> "This project is owned by [original-owner]. What would you like to name your fork under Lionad's account?"

**Naming conventions:**
- Keep it descriptive and related to the original project
- Consider prefixing with `my-` or domain-specific prefix if it's a personal variant
- Use kebab-case (lowercase with hyphens)

### Step 3: Create GitHub Repository

Use GitHub CLI to create the new repository:

```bash
gh repo create Lionad-Morotar/<new-name> --public --description "Fork of [original-repo]: [original-description]"
```

**Flags:**
- `--public` or `--private` based on user preference (default to public for open source)
- `--description` should reference the original project

### Step 4: Update Project Configuration

Before pushing to the new repository, update the following files:

#### package.json
- Update `name` field to the new package name
- Update `author` field to Lionad
- Update `repository.url` to the new GitHub URL
- Update `homepage` if applicable

#### Other configuration files to check:
- `README.md` - Add fork attribution section
- `LICENSE` - Update copyright holder if changing license
- Any CI/CD configs (`.github/workflows/`, etc.)

### Step 5: Commit Changes

Commit all configuration updates:

```bash
git add -A
git commit -m "chore: update package metadata for fork"
```

### Step 6: Configure Remotes

Update Git remotes to point to the new repository:

```bash
# Rename current origin to upstream
git remote rename origin upstream

# Add new origin (Lionad's repo)
git remote add origin https://github.com/Lionad-Morotar/<new-name>.git

# Push to new origin
git push -u origin main
```

### Step 7: Update README.md

Add a section at the top of README.md (after the badges, before the main content) documenting the fork relationship:

```markdown
> **About This Repo**
>
> This is a fork of [<upstream-owner>/<upstream-repo>](<upstream-repo-url>).(这句话格式要严格一致)
>
> This fork maintains the core functionality while publishing under the `<package-scope>` npm scope for personal use.(这句话可以适当改描述)
```

**Dynamic values to extract:**

| Placeholder | Source | Command/Field |
|-------------|--------|---------------|
| `<upstream-owner>` | `git remote get-url upstream` | Extract owner from `https://github.com/<owner>/<repo>.git` |
| `<upstream-repo>` | `git remote get-url upstream` | Extract repo name from upstream URL |
| `<upstream-repo-url>` | `git remote get-url upstream` | Use the full HTTPS URL (without `.git` suffix) |
| `<package-scope>` | `package.json` | Read `name` field (e.g., `@lionad/openapi-to-skills` → `@lionad`) |

**Example extraction commands:**

```bash
# Get upstream owner and repo
upstream_url=$(git remote get-url upstream)
# Parse: https://github.com/neutree-ai/openapi-to-skills.git
# Owner: neutree-ai, Repo: openapi-to-skills

# Get package scope from package.json
package_name=$(cat package.json | grep '"name"' | head -1 | sed 's/.*: "\([^"]*\)".*/\1/')
# Extract scope: @lionad/openapi-to-skills → @lionad
scope=$(echo "$package_name" | cut -d'/' -f1)
```

Commit this change:
```bash
git add README.md
git commit -m "docs: add fork attribution to README"
git push origin main
```

## Resources

### scripts/

- `check-ownership.sh` - Check if current repo belongs to Lionad
- `setup-remotes.sh` - Configure origin and upstream remotes

## Example Usage

**Scenario:** User is working on `https://github.com/SomeAuthor/cool-lib.git`

1. Check ownership → Not Lionad's project
2. Ask user for name → User chooses "my-cool-lib"
3. Create repo → `gh repo create Lionad-Morotar/my-cool-lib`
4. Update package.json → Change name, author, repository URL
5. Commit changes
6. Configure remotes → origin=Lionad's repo, upstream=original
7. Update README → Add fork attribution

Related Skills

release-project

7
from Lionad-Morotar/local-tools

项目版本发布流程指导,帮助用户完成版本规划、Changelog 管理、版本号升级、Git 标签创建和 npm 首次发布准备。Use when: (1) 用户需要发布新版本 (2) 需要创建版本发布流程 (3) 需要管理版本号和 Changelog (4) 需要自动化版本发布 (5) 需要检查 release 分支同步 (6) 首次 npm 发布准备

create-skill-project

7
from Lionad-Morotar/local-tools

创建新的 Claude Skill 项目,初始化 GitHub 仓库、本地 submodule 和软链接。用于将现有 skill 或新 skill 按照标准项目结构组织,支持 Git 版本管理和本地开发。使用场景:(1) 创建新的 skill 项目并推送到 GitHub (2) 将现有 skill 重构为标准项目结构 (3) 初始化 submodule 和软链接以便本地开发。

open-u-dashboard

7
from Lionad-Morotar/local-tools

open understand dashboard for user

sync-template-skill

7
from Lionad-Morotar/local-tools

这是一个技能文件的模板,展示了技能的基本结构和内容组织方式。

talk-humanize

7
from Lionad-Morotar/local-tools

Be direct and informative. No filler, no fluff, but give enough to be useful.

search-web

7
from Lionad-Morotar/local-tools

使用 Evaluator-optimizer 模式进行系统性多轮网络搜索,采用结构化 Ask 流程在搜索前澄清研究目标。基于 YC Office Hours 的提问方法论,确保搜索方向清晰、结果可验证。当用户需要深入调查复杂主题、验证假设或全面收集信息时使用。

save-to-eagle

7
from Lionad-Morotar/local-tools

归档网络内容到 Eagle 素材库。支持:(1) Behance/Pixiv 图片归档,(2) 网页视频录制(页面动画、滚动录制)。使用方式:'归档 [URL]' 归档图片;'录制网页视频 [URL]' 录制页面动画;'滚动录制 [URL]' 自动滚动截图。支持评分如 '归档 [URL], 3/5'。

save-ob-chaos

7
from Lionad-Morotar/local-tools

将对话内容快速存档到 Obsidian Chaos 文件夹。触发词:"存档到 Obsidian"、"保存到 Chaos"、"ob 存档"、"记下这个"、"保存这段内容"、"存到 chaos"。

save-ob-chaos-mermaid

7
from Lionad-Morotar/local-tools

将 Mermaid 图表保存到 Obsidian Chaos 文件夹。触发词:"保存 mermaid 到 chaos"、"mermaid 存档"。

save-ob-chaos-excalidraw

7
from Lionad-Morotar/local-tools

绘制 Excalidraw 图表并存档到 Obsidian Chaos 文件夹。触发词:"画个图存到 Obsidian"、"excalidraw 存档"、"画个流程图保存"、"画图存到 chaos"、"创建图表并存档"、"画架构图到 ob"。

recognize-codebase-branch-flow

7
from Lionad-Morotar/local-tools

识别并记忆项目 git 分支模型

rebase-commits

7
from Lionad-Morotar/local-tools

将零散的 commits 整合为清晰的逻辑提交,使 Git 历史更易读。 Use when: (1) 用户说 "rebase commits"、"整理提交历史"、"让历史更干净" (2) 用户想将多个相关 commits 合并为逻辑单元 (3) 完成一个功能后需要清理 commit 历史 (4) 提交历史混乱,需要重新组织