К основному содержанию
скилл CX Codex

habitat-usage — скилл для Claude Code: что делает и как установить

Скилл habitat-usage для Claude Code, Codex, Cursor и других платформ помогает настроить Habitat — инструмент синхронизации зависимостей из нескольких репозиториев и внешних файлов через .habitat/DEPS и hab sync.

Apache-2.0 253 установок ★ 28 обновлён 2026-10-24

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add lynx-community/skills --skill habitat-usage -a claude-code
Открыть на GitHub

Что делает habitat-usage

Скилл объясняет, как устроен Habitat: конфиг .habitat описывает решения (solutions), манифест DEPS перечисляет зависимости — git-репозитории, вложенные решения, HTTP-архивы или кастомные действия на Python. После ./hab sync . зависимости материализуются в указанные пути.

Скилл даёт готовые сниппеты для каждого типа зависимостей и чек-лист распространённых сбоев: ошибки авторизации в git, несовпадение sha256 при скачивании HTTP-ресурсов, таймауты сети. Habitat скачивается как исполняемый файл hab; для воспроизводимости рекомендуется закреплять версию в CI и коммитить обёртку в репозиторий. Без привязки к конкретной версии hab sync может тянуть разный код на разных машинах.

Какие задачи решает

  • настроить multi-repo проект с общим корнем и синхронизацией зависимостей
  • добавить в DEPS git-репозиторий, HTTP-архив или вложенное решение
  • исправить ошибку авторизации git или несовпадение sha256 при hab sync
  • закрепить версию Habitat в CI для воспроизводимых сборок

Примеры запросов агенту

  • Создай .habitat и DEPS для синхронизации библиотеки из [email protected]:namespace/lib.git в lib/example
  • Добавь в DEPS HTTP-зависимость для скачивания tooling.zip с проверкой sha256
  • Почини ошибку Permission denied при hab sync — проверь SSH-ключи и URL в DEPS

Как установить habitat-usage

1Через Skills CLI (Vercel)

npx skills add lynx-community/skills --skill habitat-usage -a claude-code

2Вручную: положить файлы

~/.claude/skills/habitat-usage/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/habitat-usage/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о habitat-usage

Как установить habitat-usage в Claude Code?

Выполни npx skills add lynx-community/skills --skill habitat-usage -a claude-code, скилл появится в ~/.claude/skills/habitat-usage/SKILL.md.

Что делает habitat-usage?

Помогает настроить Habitat для синхронизации зависимостей из нескольких репозиториев, HTTP-ресурсов и кастомных действий через .habitat/DEPS и команду hab sync, а также чинит типовые ошибки авторизации, sha256 и таймауты.

Как закрепить версию Habitat в CI?

Вместо releases/latest скачивай конкретный релиз: HABITAT_VERSION="0.3.145"; curl -L -o hab "https://github.com/lynx-family/habitat/releases/download/${HABITAT_VERSION}/hab", затем chmod +x hab и закоммить hab в репозиторий.

Исходный текст

SKILL.md · Apache-2.0
---
name: habitat-usage
description: Guidance on using Habitat to manage multi-repo source and asset dependencies via .habitat/DEPS and hab sync, plus troubleshooting common sync failures.
---

# Habitat Usage Guide

Habitat is a dependency-sync tool for mono-repo-like layouts built from multiple Git repos and asset downloads. This skill provides setup guidance, copy-pastable config snippets, and a troubleshooting checklist for common sync failures.

## When to Apply

- Setting up a “main repo + dependency repos/assets” workspace using `.habitat` + `DEPS`
- Adding or changing dependency types: git repos, nested solutions, HTTP downloads, or custom actions
- Debugging `hab sync` failures related to config, auth, network, or integrity checks

## Troubleshooting Inputs

When sync fails (fetch errors, permission issues, timeouts), collect:

- Habitat version and distribution (`./hab` wrapper in repo, `hab.pex`, etc.)
- OS and architecture (darwin/windows/linux + arm64/x86_64)
- The exact command and full error output (do not paste any secrets)
- Relevant config snippets:
  - `.habitat`
  - `DEPS` (or the file pointed to by `deps_file` in `.habitat`)

## Installation and Versioning

Prefer committing the Habitat wrapper (`hab`) and config files (`.habitat`, `DEPS`) into the repository so developers and CI use the same version and configuration.

Avoid downloading `releases/latest` in automation, because it is not reproducible. Instead, pin to a specific release version (tag) and keep that pinned version consistent across developers and CI.

```bash
HABITAT_VERSION="0.3.145"
curl -L -o hab "https://github.com/lynx-family/habitat/releases/download/${HABITAT_VERSION}/hab"
chmod +x hab
```

If you just want to try Habitat locally (not recommended for CI), you can download the latest release:

```bash
curl -L -o hab "https://github.com/lynx-family/habitat/releases/latest/download/hab"
chmod +x hab
```

If you need integrity verification, pin an expected SHA-256 for `hab` in your repo/CI and verify after download:

```bash
EXPECTED_SHA256="<fill-me>"

if command -v shasum >/dev/null 2>&1; then
  echo "${EXPECTED_SHA256}  hab" | shasum -a 256 -c -
else
  echo "${EXPECTED_SHA256}  hab" | sha256sum -c -
fi
```

## Multi-Repo Setup (solutions + deps)

### 1) Generate `.habitat` (solution config)

Generate the Habitat config at the main repo root:

```bash
./hab config <repo remote uri>
```

`.habitat` describes one or more solutions. Minimal example:

```python
solutions = [
    {
        "name": ".",
        "deps_file": "DEPS",
        "url": "[email protected]:namespace/repo.git",
    }
]
```

Fields:

- `name`: solution name, typically `"."` for the main repo
- `deps_file`: dependency manifest path (relative to the main repo root)
- `url`: the main repo remote URL (used by the tool/CI)

### 2) Write `DEPS` (dependency manifest)

In `DEPS`, define `deps = { ... }`. The key is the destination path in the main repo, and the value describes the dependency type and parameters.

#### 2.1 git deps (source repositories)

```python
deps = {
    "lib/example": {
        "type": "git",
        "url": "[email protected]:namespace/lib.git",
        "branch": "dev",
    }
}
```

Notes:

- Prefer stable refs (e.g., commit) for reproducibility; use branches when you want rolling updates.
- If the destination directory already exists and contains local changes, decide whether overwriting is acceptable before syncing.

#### 2.2 solution deps (nested solutions)

If a dependency has its own dependency tree, you can bring it in as a solution and sync recursively:

```python
deps = {
    "third_party/some_solution": {
        "type": "solution",
        "url": "[email protected]:namespace/solution_repo.git",
        "branch": "main",
        "deps_file": "DEPS",
    }
}
```

#### 2.3 http deps (assets/archives/binaries)

Use this to download archives, toolchains, model files, etc. Prefer providing integrity checks for verifiability and reproducibility:

```python
deps = {
    "third_party/tooling": {
        "type": "http",
        "url": "https://example.com/tooling.zip",
        "sha256": "SHA256_HEX",
    }
}
```

#### 2.4 action deps (custom sync actions)

Use this to run extra steps during sync (generate files, copy assets, apply patches, etc.). Example:

```python
def example_function():
    from pathlib import Path
    import shutil

    dest_dir = Path("scripts/sync_something")
    dest_dir.mkdir(parents=True, exist_ok=True)
    src = dest_dir / "input.txt"
    dst = dest_dir / "output.txt"
    src.write_text("example\n", encoding="utf-8")
    shutil.copyfile(src, dst)


deps = {
    "scripts/sync_something": {
        "type": "action",
        "function": example_function,
    }
}
```

## Sync Dependencies (hab sync)

Run at the main repo root:

```bash
./hab sync .
```

After sync, dependencies are materialized into the paths specified by the keys in `DEPS`.

## Track Config in Version Control

Commit the wrapper and config files to enable one-command bootstrapping for developers and CI:

```bash
git add hab .habitat DEPS && git commit -m "Add habitat to manage dependencies."
```

## FAQ / Common Failures

### 1) git permission/auth failures

Symptoms:

- Errors like `Permission denied`, `Authentication failed`, or `Could not read from remote repository`

Fix:

- Ensure the dependency `url` protocol matches your environment (SSH/HTTPS).
- For SSH, confirm your SSH key is configured and has access to the target repo.
- In CI, confirm the runner is provisioned with the right credentials.

### 2) http integrity check failures (sha256 mismatch)

Symptoms:

- Download succeeds but integrity verification fails

Fix:

- Check whether `url` content changed or redirects to different content.
- Recompute sha256 for the actual artifact and update `sha256` in `DEPS`.
- If the URL is rolling (e.g., “latest”), prefer an immutable, versioned URL.

### 3) Sync hangs/timeouts

Fix:

- Identify which dependency is slow (temporarily comment out others and bisect).
- Check proxy settings, DNS, and network reachability.
- For large git deps, consider pinning to a commit and reducing unnecessary history (if supported by your setup).

## Response Format (when assisting users)

When a user asks for help configuring deps, fixing errors, or speeding up sync, respond in this order:

1) Conclusion first (root cause + fix)
2) Minimal copy-pastable commands/snippets (`.habitat` / `DEPS` / `./hab sync .`)
3) Call out risky operations (overwriting local dirs, rolling deps harming reproducibility, etc.)
4) If it can still fail, list the next required inputs (version, full error log, relevant config snippets)

© lynx-community · Apache-2.0 · lynx-community/skills

Похожие скиллы

Все скиллы по теме «Git и GitHub» →
Atlarium Habitat Database MCP ilgrafico79 MCP-сервер Atlarium Habitat Database MCP со справочными данными по аквариумам, террариумам и палюдариумам. Помогает агенту подбирать гидробионтов, проверять совместимость и рассчитывать внесение удобрений. CX Codex +1 2 022установок workspace SethGammon Скилл workspace координирует изменения в нескольких репозиториях в рамках одной задачи. Разбивает работу на волны, запускает кампании по репозиториям, проверяет контракты между ними. CX Codex +1 ★ 937звёзд репо multi-repo-git-ops bmad-labs Скилл multi-repo-git-ops для Claude Code управляет Git в проектах с родительским репозиторием и подмодулями. Создаёт ветки, коммитит изменения и синхронизирует указатели подмодулей между репозиториями. CX Codex +1 104установок release tobi Агентов, который управляет релизами проекта: проверяет CHANGELOG.md, обновляет зависимости, ставит git-хуки и режет релиз по команде. Запускается по /release 1.0.5 или /release patch. CX Codex +1 2 200установок gh-issue-sync mitsuhiko Синхронизирует GitHub Issues с локальными Markdown-файлами. Агент работает с задачами прямо в репозитории — создаёт, редактирует, закрывает и пушит изменения через gh-issue-sync push. CX Codex +1 28 500установок chezmoi-workflows terrylica Скилл chezmoi-workflows для Claude Code ведёт dotfiles через chezmoi: добавляет конфиги в Git-репозиторий, синхронизирует между машинами и разворачивает шаблоны. CX Codex +1 308установок

Из того же набора14

Весь набор →
lynx-trace-analysis Скилл lynx-trace-analysis для Claude Code, Cursor, Codex и других агентов, специализированный на анализе трейс-данных Lynx. Диагностирует метрики загрузки (FCP, FMP, TTI), просадки кадров, утечки памяти и узкие места рендер-пайплайна. CX Codex +1 400установок lynx-trace-record Скилл lynx-trace-record для Claude Code записывает трейсы производительности приложений на Lynx и собирает метрики первого кадра и памяти. CX Codex +1 388установок lynx-ui Скилл по lynx-ui: помогает агенту выбрать компонент, сверить его публичный API и собрать экран без выдуманных пропсов. CX Codex +1 326установок lynx-debug-info-remapping Скилл lynx-debug-info-remapping сопоставляет позиции function_id:pc_index из ошибок Lynx с исходными строками через debug-info.json. Нужен при разборе ошибок main thread. CX Codex +1 325установок lynx-check-css-support Скилл lynx-check-css-support проверяет поддержку CSS-свойств и значений в движке Lynx по встроенной базе @lynx-js/css-defines без вызовов внешних API. CX Codex +1 201установок vanilla-lynx Скилл vanilla-lynx для Claude Code помогает писать код на чистом Vanilla Lynx через Element PAPI без ReactLynx и JSX. Генерирует файлы .lynxml без сборки или настраивает проект на Rspeedy. CX Codex +1 201установок lynx-api-docs Скилл lynx-api-docs для Claude Code и Codex подтягивает документацию движка Lynx при верстке и отладке страниц на TSX или TTML. Помогает учесть отличия от веба. CX Codex +1 183установок lynx-a2ui Скилл lynx-a2ui для Claude Code переводит текстовые описания интерфейса в сообщения протокола A2UI v1.0. Превращает словесные пожелания к экрану в чистый массив JSON для рендерера. CX Codex +1 170установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой