btca-local — скилл для Claude Code: поиск по Git-репозиториям
Скилл ищет ответы в Git-репозиториях, клонированных на компьютер, и помогает агенту ссылаться на найденный код. Пригодится, когда нужно изучить исходники проекта.
npx skills add davis7dotsh/better-context --skill btca-local -a claude-codeЧто делает btca-local
btca-local задаёт агенту порядок поиска по локальным Git-репозиториям. Для работы он использует каталог ~/.btca/agent/sandbox: если нужный репозиторий там уже есть, агент обновляет его; иначе клонирует основную ветку. Если вы указали конкретный репозиторий, скилл направляет поиск туда.
После поиска агент должен дать ответ с цитатами или ссылками на найденное и полными примерами кода, включая импорты. Скилл рассчитан на репозитории, доступные на этой машине, поэтому без локальной копии ему нечего искать; указанная основная ветка используется по умолчанию, если вы не попросили другую.
Какие задачи решает
- найти в репозитории реализацию нужной функции
- проверить, где вызывается метод или API
- сопоставить вопрос с кодом конкретного Git-репозитория
- получить ответ по исходникам с цитатами и полным примером кода
Примеры запросов агенту
- Используй btca и найди, где в репозитории обрабатывается авторизация.
- Используй btca, чтобы разобраться, как устроен этот метод, и приведи полный пример кода.
- Используй btca для поиска по указанному Git-репозиторию и укажи источники ответа.
Как установить btca-local
1Через Skills CLI (Vercel)
npx skills add davis7dotsh/better-context --skill btca-local -a claude-code2Вручную: положить файлы
~/.claude/skills/btca-local/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/btca-local/
1Через Skills CLI (Vercel)
npx skills add davis7dotsh/better-context --skill btca-local -a codex2Вручную: положить файлы
.agents/skills/btca-local/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add davis7dotsh/better-context --skill btca-local -a cursor2Вручную: положить файлы
.cursor/skills/btca-local/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install davis7dotsh/better-context btca-local2Вручную: положить файлы
.github/skills/btca-local/SKILL.md1Через Skills CLI (Vercel)
npx skills add davis7dotsh/better-context --skill btca-local -a gemini-cli2Командой платформы
gemini skills install https://github.com/davis7dotsh/better-context --path skills/btca-localВручную: положить файлы
.devin/skills/btca-local/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add davis7dotsh/better-context --skill btca-local -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о btca-local
Как установить btca-local в Claude Code?
Выполните npx skills add davis7dotsh/better-context --skill btca-local -a claude-code. Файл скилла появится по пути ~/.claude/skills/btca-local/SKILL.md.
Что делает btca-local?
Он направляет агента искать информацию в локальных Git-репозиториях, а затем отвечать со ссылками или цитатами и полными примерами кода.
Где btca-local ищет репозитории?
Рабочий каталог — ~/.btca/agent/sandbox. Скилл обновляет уже клонированные туда репозитории или клонирует нужные; основная ветка используется по умолчанию.
Исходный текст
SKILL.md · MIT
---
name: btca-local
description: Invoke this skill when the user says "use btca"
---
# BTCA Local
BTCA Local, aka "The Better Context App Local" is a simple app defined as a skill file. The purpose of this app is to search git repos cloned onto this machine.
## the BTCA Search Workflow
<guidelines>
<guideline>
if the user includes a direct like to a github repo, always load and reference that
</guideline>
<guideline>
if the user doesn't include any specific links/repos they want you to use, do your best to guess based on the context provided
</guideline>
<guideline>
always include links/citations in your answers explaining what you found
</guideline>
<guideline>
include very clear and complete code snippets. don't leave out stuff like imports, that's important context
</guideline>
<guideline>
when answering use lots of bulleted/numbered lists to keep things readable and clear
</guideline>
</guidelines>
<workflow>
<step name="work dir setup">
use ~/.btca/agent/sandbox as the place where you clone/search repos
</step>
<step name="load">
if the repo(s) are already in the work dir ~/.btca/agent/sandbox update them, otherwise clone them. clone the main branch by default, unless the user asks for something else
</step>
<step name="search">
search the repo for the information you need. make sure to follow the guidelines
</step>
<workflow>
<end_goal>
a clear, concise answer to the question with code examples
</end_goal>
## Startup Cases:
This skill can be invoked in a couple different ways, and your behavior should reflect that:
### user invoked without extra context/question
this is the "app startup" state, almost as if a terminal app was booted up.
Your job is to search the working directory ~/.btca/agent/sandbox at the top level, just to get a list of all the repos that have been previously cloned
Then you should simply output the following markdown (filling in the existing repos):
```md
# BTCA Local
_use your coding agent to search any git repo locally_
Previously searched:
- repo 1
- ...
Give me a question and the link to a git repo to get started!
(we can also clean out or pre-load some resources to this list...)
```
### you invoked because of user's prompt
in this case, your job is to answer/execute the users prompt faithfully, just while also using the btca search workflow when needed to better execute your task
### user invoked while also giving a prompt/questions
this one's simple, simply answer the users prompt with the btca search workflow
© davis7dotsh · MIT · davis7dotsh/better-context