### Onboarding Skill - SKILL.md Source: https://context7.com/sourcecraft/ai.git/llms.txt Defines the 'onboarding' AI assistant skill for new users. It guides users through six sequential steps, tracking progress and only showing incomplete steps. ```yaml # SKILL.md — объявление навыка name: onboarding description: > Интерактивный онбординг для новых пользователей SourceCraft. Активируется, когда пользователь просит начать обучение, пройти онбординг или спрашивает "с чего начать". metadata: title: Обучение user-invocable: false # Шаги онбординга и используемые функции: # 1. Заполнить профиль → introduce_yourself() # 2. Создать репозиторий → create_repository(name, description, visibility, ...) # 3. Сгенерировать код → commit_changes(...) # 4. Опубликовать сайт → configure_sites_config() + commit_changes() # 5. Подключить Yandex Cloud → create_service_connection(org_name) # 6. Задеплоить приложение → list_repo_template() + create_repository() + # commit_changes() + run_workflow("deploy-tg-bot-workflow") ``` -------------------------------- ### Configure Static Site Hosting (Sites) Source: https://context7.com/sourcecraft/ai.git/llms.txt This YAML configures the Sites static site hosting service. Specify the root directory for site files and the branch or tag to publish from. A minimal configuration is also shown. ```yaml # .sourcecraft/sites.yaml site: root: "public" # Путь к директории с файлами сайта (по умолчанию — корень) ref: "release" # Ветка или тег для публикации (по умолчанию — основная ветка) # Минимальная конфигурация (публикация из корня основной ветки): # site: {} # Структура репозитория для примера выше: # / # ├── public/ # │ ├── index.html ← главная страница ``` -------------------------------- ### Configure CI/CD - .sourcecraft/ci.yaml Source: https://context7.com/sourcecraft/ai.git/llms.txt Set up the built-in SourceCraft CI/CD mechanism. Supports triggering on pull requests, pushes, and schedules, with tasks composed of cubes running Docker images. ```yaml # .sourcecraft/ci.yaml on: pull_request: - workflows: [test-workflow] filter: source_branches: ["**", "!test**"] target_branches: "main" push: - workflows: [deploy-workflow] filter: branches: ["main"] schedule: - workflows: [nightly-workflow] cron: "0 2 * * *" description: "Ночной запуск тестов" workflows: test-workflow: tasks: - name: test-task cubes: - name: install-deps image: docker.io/library/python:3.11 script: - pip install -r requirements.txt - name: run-tests script: - python -m pytest --tb=short deploy-workflow: settings: max_cube_duration: 30m tasks: - name: build-task cubes: - name: build-image image: docker.io/library/docker:latest script: - docker build -t myapp:${{ github.sha }} . artifacts: docker: - myapp:${{ github.sha }} - name: deploy-task needs: [build-task] # Зависимость от предыдущей задачи cubes: - name: deploy script: - echo "Deploying ${{ github.sha }}" env: DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }} nightly-workflow: tasks: - name: nightly-task cubes: - name: full-test-suite image: docker.io/library/node:20 script: - npm ci - npm run test:full ``` -------------------------------- ### Define `configs-helper` Skill Source: https://context7.com/sourcecraft/ai.git/llms.txt This YAML defines the `configs-helper` skill, its description, and available input parameters. Use `config_type` to focus on specific configurations. ```yaml # SKILL.md — объявление навыка name: configs-helper description: Навык для настройки различных конфигураций репозитория. metadata: title: Помощник конфигураций репозитория inputs: config_type: type: choice required: false options: - "Правила для веток" - "Код-ревью" - "Статический хостинг Sites" - "Вебхуки" - "CI/CD" # Вызов навыка без параметра — анализ всех конфигураций # Вызов навыка с параметром — фокус на конкретной конфигурации # Пример: config_type = "CI/CD" ``` -------------------------------- ### Configure Webhooks - .sourcecraft/webhooks.yaml Source: https://context7.com/sourcecraft/ai.git/llms.txt Define webhooks to send repository event notifications to external services. Supports any event from the SourceCraft OpenAPI schema or a global '*' trigger. ```yaml # .sourcecraft/webhooks.yaml webhooks: hooks: - slug: wh_production # Уникальный идентификатор вебхука name: "Production webhook" description: "Triggers on main branch pushes" url: "https://ci.example.com/webhook/src-push" auth_header: X-Src-Auth-Header # Заголовок для передачи секрета ssl_verification: true active: true - slug: wh_staging name: "Staging webhook" description: "Staging environment notifications" url: "https://staging.example.com/webhook-test/src-push" auth_header: X-Src-Auth-Header ssl_verification: true active: false # Вебхук отключён on: push: # Любой push в репозиторий - hooks: ["wh_production", "wh_staging"] repository.push: # Событие в формате aggregate.event - hooks: ["wh_staging"] '*': # Все события - hooks: ["wh_production"] ``` -------------------------------- ### Пример кастомного формата описания Source: https://context7.com/sourcecraft/ai.git/llms.txt Пример использования кастомного формата для генерации описания предложения изменений, определяющий структуру с разделами 'Что сделано', 'Причина изменений' и 'Как проверить'. ```yaml description_format: | ## Что сделано <краткое описание> ## Причина изменений <обоснование> ## Как проверить <инструкция по тестированию> ``` -------------------------------- ### Configure Code Review Rules Source: https://context7.com/sourcecraft/ai.git/llms.txt This YAML defines code review policies, including the minimum number of approvals required, whether to ignore self-approvals, and automatic reviewer assignment. Rules can be applied based on file path patterns. ```yaml # .sourcecraft/review.yaml codereview: need_ships: 1 # Минимум одобрений для слияния ignore_self_ship: false # Не засчитывать одобрение автора PR ignore_non_reviewers_block: false auto_assign: true # Автоматически назначать ревьюеров rules: - patterns: - "src/**" # Правило для изменений в src/ reviewers: usernames: - "lead-developer" - "senior-dev" assign: 1 # Назначать 1 ревьюера автоматически need_ships: 1 ignore_self_ship: false - patterns: - "**" # Правило для всех остальных файлов reviewers: usernames: - "team-member" assign: 1 need_ships: 1 ``` -------------------------------- ### Configure Branch Protection Rules Source: https://context7.com/sourcecraft/ai.git/llms.txt This YAML file defines branch protection policies, including restrictions on force pushes, direct commits, and deletions for specific branches and tags. It also supports glob patterns for matching branch names. ```yaml # .sourcecraft/branches.yaml branch_protection: policies: # Защита основной ветки: запрет force push, прямых коммитов и удаления - target: default_branch message: "Direct push into main branch is forbidden, create PR first" rules: - prevent_force_push - prevent_non_pr_changes - prevent_deletion # Запрет создания веток с именами вне разрешённых шаблонов - target: branch matches: ["*", "!OO-*/**", "!hotfix/**", "!chore/**", "!release/**"] message: "Please use proper branch naming" rules: - prevent_creation # Запрет ручного создания тегов с определённым префиксом - target: tag matches: "gitcore-*" message: "Manual tag creation is forbidden, please use Releaser" rules: - prevent_creation ``` -------------------------------- ### PR Description Skill - SKILL.md Source: https://context7.com/sourcecraft/ai.git/llms.txt Defines the 'pr-description' AI assistant skill. This skill automatically analyzes pull request changes and generates a text description, supporting custom formats. ```yaml # SKILL.md — объявление навыка name: pr-description description: > Автоматически анализирует изменения в пулл-реквесте и генерирует его текстовое описание: что изменено, как и зачем. Поддерживает кастомный формат через параметр `description_format`. По умолчанию создаёт краткое описание (до 5 предложений) и маркированный список основных изменений. ``` -------------------------------- ### Объявление навыка pr-description Source: https://context7.com/sourcecraft/ai.git/llms.txt Объявление навыка с указанием имени, описания и метаданных, включая пользовательский вызов и входные параметры. ```yaml name: pr-description description: Генерация описания предложения изменений. metadata: title: Описание предложения изменений. user-invocable: false inputs: description_format: type: string description: Формат описания. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.