habitat-usage
БесплатноЗапускает вложенные скриптыНе проверенGuidance on using Habitat to manage multi-repo source and asset dependencies via .habitat/DEPS and hab sync, plus troubleshooting common sync failures.
от lynx-community★ 28 звёзд на GitHubОб этом скилле
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 syncfailures related to config, auth, network, or integrity checks
Troubleshooting Inputs
When sync fails (fetch errors, permission issues, timeouts), collect:
- Habitat version and distribution (
./habwrapper 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:
.habitatDEPS(or the file pointed to bydeps_filein.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.
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:
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:
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:
./hab config <repo remote uri>
.habitat describes one or more solutions. Minimal example:
solutions = [
{
"name": ".",
"deps_file": "DEPS",
"url": "[email protected]:namespace/repo.git",
}
]
Fields:
name: solution name, typically"."for the main repodeps_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)
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:
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:
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:
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:
./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:
git add hab .habitat DEPS && git commit -m "Add habitat to manage dependencies."
FAQ / Common Failures
1) git permission/
Установить habitat-usage в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл habitat-usage?
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?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл habitat-usage запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic