rulesync 6.8.1 โ 7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +187 -152
- package/dist/index.cjs +2403 -1525
- package/dist/index.js +2392 -1514
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -126,6 +126,8 @@ rulesync init
|
|
|
126
126
|
|
|
127
127
|
# Install official skills (recommended)
|
|
128
128
|
rulesync fetch dyoshikawa/rulesync --features skills
|
|
129
|
+
|
|
130
|
+
# Or add skill sources to rulesync.jsonc and run 'rulesync install' (see "Declarative Skill Sources")
|
|
129
131
|
```
|
|
130
132
|
|
|
131
133
|
On the other hand, if you already have AI tool configurations:
|
|
@@ -147,34 +149,33 @@ rulesync generate --targets "*" --features "*"
|
|
|
147
149
|
|
|
148
150
|
Rulesync supports both **generation** and **import** for All of the major AI coding tools:
|
|
149
151
|
|
|
150
|
-
| Tool | rules | ignore |
|
|
151
|
-
| ------------------ | :---: | :----: |
|
|
152
|
-
| AGENTS.md | โ
| |
|
|
153
|
-
| AgentsSkills | | |
|
|
154
|
-
| Claude Code | โ
๐ | โ
| โ
๐
|
|
155
|
-
| Codex CLI | โ
๐ | |
|
|
156
|
-
| Gemini CLI | โ
๐ | โ
|
|
|
157
|
-
| GitHub Copilot | โ
| |
|
|
158
|
-
| Cursor | โ
| โ
|
|
|
159
|
-
| Factory Droid | โ
๐ | |
|
|
160
|
-
| OpenCode | โ
| |
|
|
161
|
-
| Cline | โ
| โ
|
|
|
162
|
-
| Kilo Code | โ
๐ | โ
|
|
|
163
|
-
| Roo Code | โ
| โ
|
|
|
164
|
-
| Qwen Code | โ
| โ
|
|
|
165
|
-
| Kiro | โ
| โ
|
|
|
166
|
-
| Google Antigravity | โ
| |
|
|
167
|
-
| JetBrains Junie | โ
| โ
|
|
|
168
|
-
| AugmentCode | โ
| โ
|
|
|
169
|
-
| Windsurf | โ
| โ
|
|
|
170
|
-
| Warp | โ
| |
|
|
171
|
-
| Replit | โ
| |
|
|
172
|
-
| Zed | | โ
|
|
|
152
|
+
| Tool | rules | ignore | mcp | commands | subagents | skills | hooks |
|
|
153
|
+
| ------------------ | :---: | :----: | :---: | :------: | :-------: | :----: | :---: |
|
|
154
|
+
| AGENTS.md | โ
| | | ๐ฎ | ๐ฎ | ๐ฎ | |
|
|
155
|
+
| AgentsSkills | | | | | | โ
| |
|
|
156
|
+
| Claude Code | โ
๐ | โ
| โ
๐ | โ
๐ | โ
๐ | โ
๐ | โ
|
|
|
157
|
+
| Codex CLI | โ
๐ | | ๐ | ๐ | ๐ฎ | โ
๐ | |
|
|
158
|
+
| Gemini CLI | โ
๐ | โ
| โ
๐ | โ
๐ | ๐ฎ | โ
๐ | |
|
|
159
|
+
| GitHub Copilot | โ
| | โ
| โ
| โ
| โ
| |
|
|
160
|
+
| Cursor | โ
| โ
| โ
| โ
๐ | โ
๐ | โ
๐ | โ
|
|
|
161
|
+
| Factory Droid | โ
๐ | | โ
๐ | โ
๐ | โ
๐ | โ
๐ | |
|
|
162
|
+
| OpenCode | โ
| | โ
| โ
๐ | โ
๐ | โ
๐ | โ
๐ |
|
|
163
|
+
| Cline | โ
| โ
| โ
| โ
๐ | | | |
|
|
164
|
+
| Kilo Code | โ
๐ | โ
| โ
| โ
๐ | | โ
๐ | |
|
|
165
|
+
| Roo Code | โ
| โ
| โ
| โ
| ๐ฎ | โ
๐ | |
|
|
166
|
+
| Qwen Code | โ
| โ
| | | | | |
|
|
167
|
+
| Kiro | โ
| โ
| โ
| โ
| โ
| โ
| |
|
|
168
|
+
| Google Antigravity | โ
| | | โ
| | โ
๐ | |
|
|
169
|
+
| JetBrains Junie | โ
| โ
| โ
| | | | |
|
|
170
|
+
| AugmentCode | โ
| โ
| | | | | |
|
|
171
|
+
| Windsurf | โ
| โ
| | | | | |
|
|
172
|
+
| Warp | โ
| | | | | | |
|
|
173
|
+
| Replit | โ
| | | | | โ
| |
|
|
174
|
+
| Zed | | โ
| | | | | |
|
|
173
175
|
|
|
174
176
|
- โ
: Supports project mode
|
|
175
177
|
- ๐: Supports global mode
|
|
176
178
|
- ๐ฎ: Supports simulated commands/subagents/skills (Project mode only)
|
|
177
|
-
- ๐ฆ: Supports modular MCP (Experimental)
|
|
178
179
|
|
|
179
180
|
## Why Rulesync?
|
|
180
181
|
|
|
@@ -243,6 +244,18 @@ rulesync generate --dry-run --targets claudecode --features rules
|
|
|
243
244
|
# Check if files are up to date (for CI/CD pipelines)
|
|
244
245
|
rulesync generate --check --targets "*" --features "*"
|
|
245
246
|
|
|
247
|
+
# Install skills from declarative sources in rulesync.jsonc
|
|
248
|
+
rulesync install
|
|
249
|
+
|
|
250
|
+
# Force re-resolve all source refs (ignore lockfile)
|
|
251
|
+
rulesync install --update
|
|
252
|
+
|
|
253
|
+
# Fail if lockfile is missing or out of sync (for CI)
|
|
254
|
+
rulesync install --frozen
|
|
255
|
+
|
|
256
|
+
# Install then generate (typical workflow)
|
|
257
|
+
rulesync install && rulesync generate
|
|
258
|
+
|
|
246
259
|
# Add generated files to .gitignore
|
|
247
260
|
rulesync gitignore
|
|
248
261
|
|
|
@@ -400,7 +413,13 @@ Example:
|
|
|
400
413
|
"simulateCommands": false, // Generate simulated commands
|
|
401
414
|
"simulateSubagents": false, // Generate simulated subagents
|
|
402
415
|
"simulateSkills": false, // Generate simulated skills
|
|
403
|
-
|
|
416
|
+
|
|
417
|
+
// Declarative skill sources โ installed via 'rulesync install'
|
|
418
|
+
// See the "Declarative Skill Sources" section for details.
|
|
419
|
+
// "sources": [
|
|
420
|
+
// { "source": "owner/repo" },
|
|
421
|
+
// { "source": "org/repo", "skills": ["specific-skill"] },
|
|
422
|
+
// ],
|
|
404
423
|
}
|
|
405
424
|
```
|
|
406
425
|
|
|
@@ -495,15 +514,17 @@ This is Rulesync, a Node.js CLI tool that automatically generates configuration
|
|
|
495
514
|
|
|
496
515
|
### `.rulesync/hooks.json`
|
|
497
516
|
|
|
498
|
-
Hooks run scripts at lifecycle events (e.g. session start, before tool use). Events use **canonical camelCase** in this file; Cursor uses them as-is; Claude Code gets PascalCase in `.claude/settings.json`.
|
|
517
|
+
Hooks run scripts at lifecycle events (e.g. session start, before tool use). Events use **canonical camelCase** in this file; Cursor uses them as-is; Claude Code gets PascalCase in `.claude/settings.json`; OpenCode hooks are generated as a JavaScript plugin at `.opencode/plugins/rulesync-hooks.js`.
|
|
499
518
|
|
|
500
519
|
**Event support:**
|
|
501
520
|
|
|
502
|
-
- **
|
|
503
|
-
- **
|
|
504
|
-
- **
|
|
521
|
+
- **Cursor:** `sessionStart`, `preToolUse`, `postToolUse`, `stop`, `sessionEnd`, `beforeSubmitPrompt`, `subagentStop`, `preCompact`, `afterFileEdit`, `afterShellExecution`, `postToolUseFailure`, `subagentStart`, `beforeShellExecution`, `beforeMCPExecution`, `afterMCPExecution`, `beforeReadFile`, `afterAgentResponse`, `afterAgentThought`, `beforeTabFileRead`, `afterTabFileEdit`
|
|
522
|
+
- **Claude Code:** `sessionStart`, `preToolUse`, `postToolUse`, `stop`, `sessionEnd`, `beforeSubmitPrompt`, `subagentStop`, `preCompact`, `permissionRequest`, `notification`, `setup`
|
|
523
|
+
- **OpenCode:** `sessionStart`, `preToolUse`, `postToolUse`, `stop`, `afterFileEdit`, `afterShellExecution`, `permissionRequest`
|
|
505
524
|
|
|
506
|
-
|
|
525
|
+
> **Note:** Rulesync implements OpenCode hooks as a plugin, so importing from OpenCode to rulesync is not supported. OpenCode only supports command-type hooks (not prompt-type).
|
|
526
|
+
|
|
527
|
+
Use optional **override keys** so tool-specific events and config live in one file without leaking to others: `cursor.hooks` for Cursor-only events, `claudecode.hooks` for Claude-only, `opencode.hooks` for OpenCode-only. Events in shared `hooks` that a tool does not support are skipped for that tool (and a warning is logged at generate time).
|
|
507
528
|
|
|
508
529
|
Example:
|
|
509
530
|
|
|
@@ -526,6 +547,11 @@ Example:
|
|
|
526
547
|
{ "matcher": "permission_prompt", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/notify.sh" }
|
|
527
548
|
]
|
|
528
549
|
}
|
|
550
|
+
},
|
|
551
|
+
"opencode": {
|
|
552
|
+
"hooks": {
|
|
553
|
+
"afterShellExecution": [{ "command": ".rulesync/hooks/post-shell.sh" }]
|
|
554
|
+
}
|
|
529
555
|
}
|
|
530
556
|
}
|
|
531
557
|
```
|
|
@@ -692,20 +718,26 @@ You can use global mode via Rulesync by enabling `--global` option. It can also
|
|
|
692
718
|
Currently, supports rules and commands generation for Claude Code. Import for global files is supported for rules and commands.
|
|
693
719
|
|
|
694
720
|
1. Create an any name directory. For example, if you prefer `~/.aiglobal`, run the following command.
|
|
721
|
+
|
|
695
722
|
```bash
|
|
696
723
|
mkdir -p ~/.aiglobal
|
|
697
724
|
```
|
|
725
|
+
|
|
698
726
|
2. Initialize files for global files in the directory.
|
|
727
|
+
|
|
699
728
|
```bash
|
|
700
729
|
cd ~/.aiglobal
|
|
701
730
|
rulesync init
|
|
702
731
|
```
|
|
732
|
+
|
|
703
733
|
3. Edit `~/.aiglobal/rulesync.jsonc` to enable global mode.
|
|
734
|
+
|
|
704
735
|
```jsonc
|
|
705
736
|
{
|
|
706
737
|
"global": true,
|
|
707
738
|
}
|
|
708
739
|
```
|
|
740
|
+
|
|
709
741
|
4. Edit `~/.aiglobal/.rulesync/rules/overview.md` to your preferences.
|
|
710
742
|
|
|
711
743
|
```md
|
|
@@ -719,6 +751,7 @@ Currently, supports rules and commands generation for Claude Code. Import for gl
|
|
|
719
751
|
```
|
|
720
752
|
|
|
721
753
|
5. Generate rules for global settings.
|
|
754
|
+
|
|
722
755
|
```bash
|
|
723
756
|
# Run in the `~/.aiglobal` directory
|
|
724
757
|
rulesync generate
|
|
@@ -737,6 +770,7 @@ Simulated commands, subagents and skills allow you to generate simulated feature
|
|
|
737
770
|
|
|
738
771
|
1. Prepare `.rulesync/commands/*.md`, `.rulesync/subagents/*.md` and `.rulesync/skills/*/SKILL.md` for your purposes.
|
|
739
772
|
2. Generate simulated commands, subagents and skills for specific tools that are included in cursor, codexcli and etc.
|
|
773
|
+
|
|
740
774
|
```bash
|
|
741
775
|
rulesync generate \
|
|
742
776
|
--targets copilot,cursor,codexcli \
|
|
@@ -745,6 +779,7 @@ Simulated commands, subagents and skills allow you to generate simulated feature
|
|
|
745
779
|
--simulate-subagents \
|
|
746
780
|
--simulate-skills
|
|
747
781
|
```
|
|
782
|
+
|
|
748
783
|
3. Use simulated commands, subagents and skills in your prompts.
|
|
749
784
|
- Prompt examples:
|
|
750
785
|
|
|
@@ -759,160 +794,138 @@ Simulated commands, subagents and skills allow you to generate simulated feature
|
|
|
759
794
|
Use the skill your-skill to achieve something.
|
|
760
795
|
```
|
|
761
796
|
|
|
762
|
-
##
|
|
797
|
+
## Official Skills
|
|
763
798
|
|
|
764
|
-
Rulesync
|
|
799
|
+
Rulesync provides official skills that you can install using the fetch command or declarative sources:
|
|
765
800
|
|
|
766
801
|
```bash
|
|
767
|
-
#
|
|
768
|
-
rulesync
|
|
802
|
+
# One-time fetch
|
|
803
|
+
rulesync fetch dyoshikawa/rulesync --features skills
|
|
769
804
|
|
|
770
|
-
# Or
|
|
771
|
-
{
|
|
772
|
-
"modularMcp": true
|
|
773
|
-
}
|
|
805
|
+
# Or declare in rulesync.jsonc and run 'rulesync install'
|
|
774
806
|
```
|
|
775
807
|
|
|
776
|
-
|
|
808
|
+
This will install the Rulesync documentation skill to your project.
|
|
777
809
|
|
|
778
|
-
|
|
779
|
-
// .rulesync/mcp.json
|
|
780
|
-
{
|
|
781
|
-
"mcpServers": {
|
|
782
|
-
"context7": {
|
|
783
|
-
+ "description": "Up-to-date documentation and code examples for libraries",
|
|
784
|
-
"type": "stdio",
|
|
785
|
-
"command": "npx",
|
|
786
|
-
"args": [
|
|
787
|
-
"-y",
|
|
788
|
-
"@upstash/context7-mcp"
|
|
789
|
-
],
|
|
790
|
-
"env": {}
|
|
791
|
-
}
|
|
792
|
-
}
|
|
793
|
-
```
|
|
810
|
+
## Declarative Skill Sources
|
|
794
811
|
|
|
795
|
-
|
|
812
|
+
Rulesync can fetch skills from external GitHub repositories using the `install` command. Instead of manually running `fetch` for each skill source, declare them in your `rulesync.jsonc` and run `rulesync install` to resolve and fetch them. Then `rulesync generate` picks them up as local curated skills. Typical workflow: `rulesync install && rulesync generate`.
|
|
796
813
|
|
|
797
|
-
|
|
798
|
-
|
|
814
|
+
### Configuration
|
|
815
|
+
|
|
816
|
+
Add a `sources` array to your `rulesync.jsonc`:
|
|
817
|
+
|
|
818
|
+
```jsonc
|
|
799
819
|
{
|
|
800
|
-
"
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
820
|
+
"$schema": "https://raw.githubusercontent.com/dyoshikawa/rulesync/refs/heads/main/config-schema.json",
|
|
821
|
+
"targets": ["copilot", "claudecode"],
|
|
822
|
+
"features": ["rules", "skills"],
|
|
823
|
+
"sources": [
|
|
824
|
+
// Fetch all skills from a repository
|
|
825
|
+
{ "source": "owner/repo" },
|
|
826
|
+
|
|
827
|
+
// Fetch only specific skills by name
|
|
828
|
+
{ "source": "anthropics/skills", "skills": ["skill-creator"] },
|
|
829
|
+
|
|
830
|
+
// With ref pinning and subdirectory path (same syntax as fetch command)
|
|
831
|
+
{ "source": "owner/repo@v1.0.0:path/to/skills" },
|
|
832
|
+
],
|
|
811
833
|
}
|
|
812
834
|
```
|
|
813
835
|
|
|
814
|
-
|
|
836
|
+
Each entry in `sources` accepts:
|
|
815
837
|
|
|
816
|
-
|
|
817
|
-
|
|
838
|
+
| Property | Type | Description |
|
|
839
|
+
| -------- | ---------- | ----------------------------------------------------------------------------------------------------------- |
|
|
840
|
+
| `source` | `string` | Repository source using the same format as the `fetch` command (`owner/repo`, `owner/repo@ref:path`, etc.). |
|
|
841
|
+
| `skills` | `string[]` | Optional list of skill names to fetch. If omitted, all skills are fetched. |
|
|
818
842
|
|
|
819
|
-
|
|
843
|
+
### How It Works
|
|
820
844
|
|
|
821
|
-
When
|
|
845
|
+
When `rulesync install` runs and `sources` is configured:
|
|
822
846
|
|
|
823
|
-
|
|
824
|
-
|
|
847
|
+
1. **Lockfile resolution** โ Each source's ref is resolved to a commit SHA and stored in `rulesync.lock` (at the project root). On subsequent runs the locked SHA is reused for deterministic builds.
|
|
848
|
+
2. **Remote skill listing** โ The `skills/` directory (or the path specified in the source URL) is listed from the remote repository.
|
|
849
|
+
3. **Filtering** โ If `skills` is specified, only matching skill directories are fetched.
|
|
850
|
+
4. **Precedence rules**:
|
|
851
|
+
- **Local skills always win** โ Skills in `.rulesync/skills/` (not in `.curated/`) take precedence; a remote skill with the same name is skipped.
|
|
852
|
+
- **First-declared source wins** โ If two sources provide a skill with the same name, the one declared first in the `sources` array is used.
|
|
853
|
+
5. **Output** โ Fetched skills are written to `.rulesync/skills/.curated/<skill-name>/`. This directory is automatically added to `.gitignore` by `rulesync gitignore`.
|
|
825
854
|
|
|
826
|
-
|
|
827
|
-
"mcpServers": {
|
|
828
|
-
"serena": {
|
|
829
|
-
"description": "Semantic coding tools for intelligent codebase exploration and manipulation",
|
|
830
|
-
"type": "stdio",
|
|
831
|
-
"command": "uvx",
|
|
832
|
-
"args": [
|
|
833
|
-
"--from",
|
|
834
|
-
"git+https://github.com/oraios/serena",
|
|
835
|
-
"serena",
|
|
836
|
-
"start-mcp-server",
|
|
837
|
-
"--context",
|
|
838
|
-
"ide-assistant",
|
|
839
|
-
"--enable-web-dashboard",
|
|
840
|
-
"false",
|
|
841
|
-
"--project",
|
|
842
|
-
"."
|
|
843
|
-
],
|
|
844
|
-
"env": {}
|
|
845
|
-
},
|
|
846
|
-
"context7": {
|
|
847
|
-
"description": "Up-to-date documentation and code examples for libraries",
|
|
848
|
-
"type": "stdio",
|
|
849
|
-
"command": "npx",
|
|
850
|
-
"args": ["-y", "@upstash/context7-mcp"],
|
|
851
|
-
"env": {}
|
|
852
|
-
},
|
|
853
|
-
"fetch": {
|
|
854
|
-
"description": "This server enables LLMs to retrieve and process content from web pages, converting HTML to markdown for easier consumption.",
|
|
855
|
-
"type": "stdio",
|
|
856
|
-
"command": "uvx",
|
|
857
|
-
"args": ["mcp-server-fetch"],
|
|
858
|
-
"env": {}
|
|
859
|
-
}
|
|
860
|
-
}
|
|
861
|
-
}
|
|
862
|
-
```
|
|
855
|
+
### CLI Options
|
|
863
856
|
|
|
864
|
-
|
|
857
|
+
The `install` command accepts these flags:
|
|
865
858
|
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
โถ โถ โถ โถ โถ โถ โถ โถ โถ โถ โ System tools: 13.9k tokens (6.9%)
|
|
872
|
-
โถ โถ โถ โถ โถ โถ โถ โถ โถ โถ โ MCP tools: 15.7k tokens (7.9%)
|
|
873
|
-
โถ โถ โถ โถ โถ โถ โถ โถ โถ โถ โ Memory files: 5.2k tokens (2.6%)
|
|
874
|
-
โถ โถ โถ โถ โถ โถ โถ โถ โถ โถ โ Messages: 8 tokens (0.0%)
|
|
875
|
-
โถ โถ โถ โถ โถ โถ โถ โ โ โ โถ Free space: 118k (58.8%)
|
|
876
|
-
โ โ โ โ โ โ โ โ โ โ โ Autocompact buffer: 45.0k tokens (22.5%)
|
|
877
|
-
โ โ โ โ โ โ โ โ โ โ
|
|
878
|
-
```
|
|
859
|
+
| Flag | Description |
|
|
860
|
+
| ----------------- | ------------------------------------------------------------------------------------- |
|
|
861
|
+
| `--update` | Force re-resolve all source refs, ignoring the lockfile (useful to pull new updates). |
|
|
862
|
+
| `--frozen` | Fail if lockfile is missing or out of sync. Useful for CI to ensure reproducibility. |
|
|
863
|
+
| `--token <token>` | GitHub token for private repositories. |
|
|
879
864
|
|
|
880
|
-
|
|
865
|
+
```bash
|
|
866
|
+
# Install skills using locked refs
|
|
867
|
+
rulesync install
|
|
881
868
|
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
โ โ โ โ โ โ โ โ โ โ
|
|
869
|
+
# Force update to latest refs
|
|
870
|
+
rulesync install --update
|
|
871
|
+
|
|
872
|
+
# Strict CI mode โ fail if lockfile doesn't cover all sources
|
|
873
|
+
rulesync install --frozen
|
|
874
|
+
|
|
875
|
+
# Install then generate
|
|
876
|
+
rulesync install && rulesync generate
|
|
877
|
+
|
|
878
|
+
# Skip source installation โ just don't run install
|
|
879
|
+
rulesync generate
|
|
894
880
|
```
|
|
895
881
|
|
|
896
|
-
|
|
882
|
+
### Lockfile
|
|
897
883
|
|
|
898
|
-
|
|
899
|
-
| -------------------- | ------------------- |
|
|
900
|
-
| Disabled Modular MCP | 15.7k tokens (7.9%) |
|
|
901
|
-
| Enabled Modular MCP | 1.3k tokens (0.6%) |
|
|
884
|
+
The lockfile at `rulesync.lock` (at the project root) records the resolved commit SHA and per-skill integrity hashes for each source so that builds are reproducible. It is safe to commit this file. An example:
|
|
902
885
|
|
|
903
|
-
|
|
886
|
+
```json
|
|
887
|
+
{
|
|
888
|
+
"lockfileVersion": 1,
|
|
889
|
+
"sources": {
|
|
890
|
+
"owner/skill-repo": {
|
|
891
|
+
"requestedRef": "main",
|
|
892
|
+
"resolvedRef": "abc123def456...",
|
|
893
|
+
"resolvedAt": "2025-01-15T12:00:00.000Z",
|
|
894
|
+
"skills": {
|
|
895
|
+
"my-skill": { "integrity": "sha256-abcdef..." },
|
|
896
|
+
"another-skill": { "integrity": "sha256-123456..." }
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
```
|
|
904
902
|
|
|
905
|
-
|
|
903
|
+
To update locked refs, run `rulesync install --update`.
|
|
906
904
|
|
|
907
|
-
|
|
905
|
+
### Authentication
|
|
908
906
|
|
|
909
|
-
|
|
907
|
+
Source fetching uses the `GITHUB_TOKEN` or `GH_TOKEN` environment variable for authentication. This is required for private repositories and recommended for better rate limits.
|
|
910
908
|
|
|
911
909
|
```bash
|
|
912
|
-
|
|
910
|
+
# Using environment variable
|
|
911
|
+
export GITHUB_TOKEN=ghp_xxxx
|
|
912
|
+
npx rulesync install
|
|
913
|
+
|
|
914
|
+
# Or using GitHub CLI
|
|
915
|
+
GITHUB_TOKEN=$(gh auth token) npx rulesync install
|
|
913
916
|
```
|
|
914
917
|
|
|
915
|
-
|
|
918
|
+
> [!TIP]
|
|
919
|
+
> The `install` command also accepts a `--token` flag for explicit authentication: `rulesync install --token ghp_xxxx`.
|
|
920
|
+
|
|
921
|
+
### Curated vs Local Skills
|
|
922
|
+
|
|
923
|
+
| Location | Type | Precedence | Committed to Git |
|
|
924
|
+
| ----------------------------------- | ------- | ---------- | ---------------- |
|
|
925
|
+
| `.rulesync/skills/<name>/` | Local | Highest | Yes |
|
|
926
|
+
| `.rulesync/skills/.curated/<name>/` | Curated | Lower | No (gitignored) |
|
|
927
|
+
|
|
928
|
+
When both a local and a curated skill share the same name, the local skill is used and the remote one is not fetched.
|
|
916
929
|
|
|
917
930
|
## Rulesync MCP Server
|
|
918
931
|
|
|
@@ -950,7 +963,7 @@ Add the Rulesync MCP server to your `.rulesync/mcp.json`:
|
|
|
950
963
|
|
|
951
964
|
## FAQ
|
|
952
965
|
|
|
953
|
-
### Q. The generated `.mcp.json` doesn't work properly in Claude Code
|
|
966
|
+
### Q. The generated `.mcp.json` doesn't work properly in Claude Code
|
|
954
967
|
|
|
955
968
|
You can try adding the following to `.claude/settings.json` or `.claude/settings.local.json`:
|
|
956
969
|
|
|
@@ -964,6 +977,28 @@ According to [the documentation](https://code.claude.com/docs/en/settings), this
|
|
|
964
977
|
|
|
965
978
|
> Automatically approve all MCP servers defined in project .mcp.json files
|
|
966
979
|
|
|
980
|
+
### Q. Google Antigravity doesn't load rules when `.agent` directories are in `.gitignore`
|
|
981
|
+
|
|
982
|
+
Google Antigravity has a known limitation where it won't load rules, workflows, and skills if the `.agent/rules/`, `.agent/workflows/`, and `.agent/skills/` directories are listed in `.gitignore`, even with "Agent Gitignore Access" enabled.
|
|
983
|
+
|
|
984
|
+
**Workaround:** Instead of adding these directories to `.gitignore`, add them to `.git/info/exclude`:
|
|
985
|
+
|
|
986
|
+
```bash
|
|
987
|
+
# Remove from .gitignore (if present)
|
|
988
|
+
# **/.agent/rules/
|
|
989
|
+
# **/.agent/workflows/
|
|
990
|
+
# **/.agent/skills/
|
|
991
|
+
|
|
992
|
+
# Add to .git/info/exclude
|
|
993
|
+
echo "**/.agent/rules/" >> .git/info/exclude
|
|
994
|
+
echo "**/.agent/workflows/" >> .git/info/exclude
|
|
995
|
+
echo "**/.agent/skills/" >> .git/info/exclude
|
|
996
|
+
```
|
|
997
|
+
|
|
998
|
+
`.git/info/exclude` works like `.gitignore` but is local-only, so it won't affect Antigravity's ability to load the rules while still excluding these directories from Git.
|
|
999
|
+
|
|
1000
|
+
Note: `.git/info/exclude` can't be shared with your team since it's not committed to the repository.
|
|
1001
|
+
|
|
967
1002
|
## License
|
|
968
1003
|
|
|
969
1004
|
MIT License
|