116 lines
4.0 KiB
Markdown
116 lines
4.0 KiB
Markdown
# AI Assets
|
|
|
|
One script installs everything. No cloning or manual copy/paste required.
|
|
|
|
## Quick Start
|
|
|
|
> For more on discovering and installing skills, see [docs/ai/skills.md](../docs/ai/skills.md).
|
|
|
|
### Cloned Repo
|
|
|
|
```bash
|
|
# Install everything for iOS
|
|
./assets/setup.sh all ios
|
|
|
|
# Or pick what you need
|
|
./assets/setup.sh skills ios
|
|
./assets/setup.sh agents
|
|
./assets/setup.sh instructions
|
|
```
|
|
|
|
### No Clone (Run Remotely)
|
|
|
|
Point the script at the repo and run. Nothing to download first.
|
|
|
|
```bash
|
|
# Set the base URL once (get this from your team lead)
|
|
export ASSETS_BASE_URL="https://gitlab.com/<org>/mobile-ai-docs/-/raw/develop/assets"
|
|
|
|
# Install everything for iOS — one command
|
|
bash <(curl -fsSL "$ASSETS_BASE_URL/setup.sh") all ios
|
|
|
|
# Or pick what you need
|
|
bash <(curl -fsSL "$ASSETS_BASE_URL/setup.sh") skills ios
|
|
bash <(curl -fsSL "$ASSETS_BASE_URL/setup.sh") agents
|
|
bash <(curl -fsSL "$ASSETS_BASE_URL/setup.sh") instructions
|
|
```
|
|
|
|
That's it.
|
|
|
|
---
|
|
|
|
## Commands
|
|
|
|
| Command | What It Does |
|
|
|---------|-------------|
|
|
| `setup.sh skills [platform]` | Install registry skills + custom skills (auto-discovered) |
|
|
| `setup.sh agents` | Install all agent prompt files (auto-discovered) |
|
|
| `setup.sh instructions` | Install all instruction rule files (auto-discovered) |
|
|
| `setup.sh all [platform]` | All of the above in one shot |
|
|
| `setup.sh help` | Print usage |
|
|
|
|
### Platforms (for skills)
|
|
|
|
| Platform | List File |
|
|
|----------|-----------|
|
|
| `ios` | ios-skills.txt |
|
|
| `android` | android-skills.txt |
|
|
| `shared` (default) | shared-skills.txt |
|
|
|
|
## Where Things Get Installed
|
|
|
|
| Asset | Default Location | Override |
|
|
|-------|-----------------|----------|
|
|
| Registry skills | Managed by `npx skills` CLI | — |
|
|
| Custom skills | `~/.agents/skills/` | `SKILLS_DIR` |
|
|
| Agents | `~/.agents/agents/` | `AGENTS_DIR` |
|
|
| Instructions | `./instructions/` | `INSTRUCTIONS_DIR` |
|
|
|
|
> The `~/.agents/` directory is tool-agnostic. Copilot, Claude, Cursor, and others all read from it. If you need a tool-specific path, override with the env var.
|
|
|
|
## Adding New Assets
|
|
|
|
- **Agents or instructions** — Drop the file into `assets/agents/` or `assets/instructions/` and push. Auto-discovered.
|
|
- **Custom skills** — Add a folder with a `SKILL.md` to `assets/skills/` and push. Auto-discovered.
|
|
- **Registry skills** — Add the install entry to the appropriate `.txt` file (e.g., `ios-skills.txt`). One per line.
|
|
|
|
## How It Works
|
|
|
|
| Mode | Agents / Instructions / Custom Skills | Registry Skills |
|
|
|------|---------------------------------------|----------------|
|
|
| **Local** (cloned repo) | `find` scans the directory | Reads the `.txt` file |
|
|
| **Remote** (no clone) | Queries GitLab/GitHub API to list files | Downloads the `.txt` file |
|
|
|
|
## Folder Structure
|
|
|
|
```
|
|
assets/
|
|
setup.sh ← the installer
|
|
ios-skills.txt ← curated iOS skills (one per line)
|
|
android-skills.txt ← curated Android skills
|
|
shared-skills.txt ← curated cross-platform skills
|
|
skills/ ← custom skill folders (auto-discovered)
|
|
my-skill/
|
|
SKILL.md
|
|
agents/ ← agent prompt files (auto-discovered)
|
|
instructions/ ← instruction rule files (auto-discovered)
|
|
```
|
|
|
|
## Environment Variables
|
|
|
|
| Variable | Purpose | Required? |
|
|
|----------|---------|-----------|
|
|
| `ASSETS_BASE_URL` | Base URL for remote downloads | Only without a clone |
|
|
| `AGENTS_DIR` | Custom agents install path | No || `SKILLS_DIR` | Custom skills install path | No || `INSTRUCTIONS_DIR` | Custom instructions install path | No |
|
|
| `REPO_TOKEN` | Auth token for private repos | Only if API rejects |
|
|
|
|
---
|
|
|
|
## VS Code Agent Selector Integration
|
|
To make your global agents available in the VS Code Agents selector, symlink your agent files from the global `~/.agents/agents/` directory to VS Code's prompts folder:
|
|
|
|
```bash
|
|
ln -s ~/.agents/agents/* "$HOME/Library/Application Support/Code/User/prompts/"
|
|
```
|
|
|
|
This ensures all your agents appear in the selector for easy access. The `$HOME` variable automatically uses your user directory, so the command works for any account. |