Skip to content

Commit e409922

Browse files
gaoachaogithub-actions[bot]
authored andcommitted
chore: update README.md & CONTRIBUTING.md (#16)
* chore: update README.md * chore: update CONTRIBUTING.md * fix
1 parent bccec1c commit e409922

2 files changed

Lines changed: 195 additions & 2 deletions

File tree

CONTRIBUTING.md

Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
# Contributing to Lynx Agent Skills
2+
3+
Thank you for your interest in contributing! This guide will help you get started.
4+
5+
## Prerequisites
6+
7+
- Node.js 18+
8+
- pnpm 10+
9+
10+
```bash
11+
corepack enable
12+
corepack prepare pnpm@latest --activate
13+
```
14+
15+
## Getting Started
16+
17+
```bash
18+
# Clone the repository
19+
git clone <repository-url>
20+
cd skills
21+
22+
# Install dependencies
23+
pnpm install
24+
25+
# Build all packages
26+
pnpm build
27+
```
28+
29+
## Project Structure
30+
31+
```
32+
├── packages/
33+
│ ├── cmd/ # Build tools
34+
│ │ ├── build-plugin/
35+
│ │ └── build-marketplace/
36+
│ ├── tools/
37+
│ ├── skills/ # Skill packages
38+
│ └── plugins/ # Plugin packages
39+
├── package.json # Marketplace root
40+
└── pnpm-workspace.yaml
41+
```
42+
43+
## Creating a Skill
44+
45+
1. Create a directory under `packages/skills/`:
46+
47+
```bash
48+
mkdir -p packages/skills/my-skill
49+
```
50+
51+
2. Add `package.json`:
52+
53+
```json
54+
{
55+
"name": "@lynx-js/skill-my-skill",
56+
"version": "1.0.0",
57+
"type": "module",
58+
"files": [
59+
"SKILL.md",
60+
"scripts",
61+
"references",
62+
"examples",
63+
"reference.md",
64+
"examples.md"
65+
],
66+
"scripts": {
67+
"build": "rslib build"
68+
},
69+
"devDependencies": {
70+
"@rslib/core": "catalog:rstack"
71+
}
72+
}
73+
```
74+
75+
3. Create `SKILL.md` describing what the skill does.
76+
77+
4. (Optional) Add scripts in `src/` with `rslib.config.ts` for TypeScript compilation.
78+
79+
## Creating a Plugin
80+
81+
1. Create a directory under `packages/plugins/`:
82+
83+
```bash
84+
mkdir -p packages/plugins/my-plugin
85+
```
86+
87+
2. Add `package.json`:
88+
89+
```json
90+
{
91+
"name": "@lynx-js/ai-plugin-my-plugin",
92+
"private": true,
93+
"version": "0.1.0",
94+
"description": "My Plugin",
95+
"type": "module",
96+
"files": [
97+
".claude-plugin",
98+
"commands",
99+
"agents",
100+
"skills",
101+
"scripts",
102+
"hooks",
103+
".mcp.json",
104+
".lsp.json"
105+
],
106+
"scripts": {
107+
"build": "build-plugin"
108+
},
109+
"dependencies": {
110+
"@lynx-js/skill-my-skill": "workspace:*"
111+
},
112+
"devDependencies": {
113+
"build-plugin": "workspace:*"
114+
},
115+
"claudePlugin": {
116+
"category": "development"
117+
}
118+
}
119+
```
120+
121+
3. Add the plugin to root `package.json`:
122+
123+
```json
124+
{
125+
"dependencies": {
126+
"@lynx-js/ai-plugin-my-plugin": "workspace:*"
127+
}
128+
}
129+
```
130+
131+
## Build Commands
132+
133+
```bash
134+
# Build everything
135+
pnpm build
136+
137+
# Build a specific package
138+
pnpm -F @lynx-js/skill-reactlynx-best-practices build
139+
140+
# Run tests
141+
pnpm -F @lynx-js/skill-reactlynx-best-practices test
142+
```
143+
144+
## Naming Conventions
145+
146+
| Type | Pattern | Example |
147+
| ------ | ---------------------- | ----------------------------------------- |
148+
| Skill | `@lynx-js/skill-*` | `@lynx-js/skill-reactlynx-best-practices` |
149+
| Plugin | `@lynx-js/ai-plugin-*` | `@lynx-js/ai-plugin-reactlynx` |
150+
151+
## How It Works
152+
153+
This project uses pnpm workspaces to manage Skills and Plugins:
154+
155+
- **Skills** are reusable packages containing `SKILL.md` and optional scripts
156+
- **Plugins** depend on Skills and bundle them during build
157+
- **Build tools** (`build-plugin`, `build-marketplace`) handle metadata generation and file aggregation
158+
159+
The build process:
160+
161+
1. Compiles TypeScript scripts via rslib
162+
2. Copies dependent Skills into the plugin's `skills/` directory
163+
3. Generates `.claude-plugin/plugin.json` metadata
164+
165+
## Release Process
166+
167+
> [!IMPORTANT]
168+
> Pull requests must target the `main` branch, not the `release` branch.
169+
170+
When code is merged to `main`:
171+
172+
1. CI builds all packages
173+
2. Artifacts are pushed to the `release` branch
174+
3. Only `plugins/`, `skills/`, `.claude-plugin/`, and `README.md` are kept on `release`
175+
176+
## Escape Hatch
177+
178+
For simple cases without TypeScript, you can bypass the build system:
179+
180+
```bash
181+
# Force-add ignored build artifacts
182+
git add -f packages/plugins/my-plugin/.claude-plugin/
183+
git add -f packages/skills/my-skill/scripts/
184+
```
185+
186+
> **Note**: Don't mix manual and build-managed files in the same package.
187+
188+
## Questions?
189+
190+
Open an issue or reach out to the maintainers.

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,15 @@ Analyze Lynx performance traces (`.ptrace` files) to identify bottlenecks in ren
4747
## Installation
4848

4949
```bash
50-
npx skills add lynx-family/skills
50+
npx skills add lynx-community/skills
5151
```
5252

5353
## Contributing
5454

55-
See [CONTRIBUTING.md](https://github.com/lynx-family/skills/blob/main/CONTRIBUTING.md) for development setup, project structure, and guidelines on creating new skills and plugins.
55+
> [!IMPORTANT]
56+
> Pull requests must target the `main` branch, not the `release` branch.
57+
58+
See [CONTRIBUTING.md](./CONTRIBUTING.md) for development setup, project structure, and guidelines on creating new skills and plugins.
5659

5760
## Credits
5861

0 commit comments

Comments
 (0)