Установка
SKILL.md
Manage Serverless Project
Perform day-2 operations on Elastic Cloud Serverless projects using the Serverless REST API.
Prerequisites and permissions
- Ensure
EC_API_KEYis configured. If not, runcloud-setupskill first. - Updating project settings requires Admin or Editor role on the target project.
- This skill does not perform a separate role pre-check. Attempt the requested operation and let the API enforce
authorization. If the API returns an authorization error (for example,
403 Forbidden), stop and ask the user to verify the provided API key permissions.
Manual setup fallback (when cloud-setup is unavailable)
If this skill is installed standalone and cloud-setup is not available, instruct the user to configure Cloud
environment variables manually before running commands. Never ask the user to paste API keys in chat.
| Variable | Required | Description |
|---|---|---|
EC_API_KEY | Yes | Elastic Cloud API key used for project management operations. |
EC_BASE_URL | No | Cloud API base URL (default: https://api.elastic-cloud.com). |
Note: If
EC_API_KEYis missing, or the user does not have a Cloud API key yet, direct the user to generate one at Elastic Cloud API keys, then configure it locally using the steps below.
Preferred method (agent-friendly): create a .env file in the project root:
EC_API_KEY=your-api-key
EC_BASE_URL=https://api.elastic-cloud.com
All cloud/* scripts auto-load .env from the working directory.
Alternative: export directly in the terminal:
export EC_API_KEY="<your-cloud-api-key>"
export EC_BASE_URL="https://api.elastic-cloud.com"
Terminal exports may not be visible to sandboxed agents running in separate shell sessions, so prefer .env when using
an agent.
Critical principles
- Never display secrets in chat. Do not echo, log, or repeat API keys, passwords, or credentials in conversation
messages or agent thinking. Direct the user to the
.elastic-credentialsfile instead. The admin password must never appear in chat history, thinking traces, or agent output — even when using it to create an API key, pass it directly via shell variable substitution without echoing. - Confirm before destructive actions. Always ask the user to confirm before deleting a project or resetting credentials.
- Credentials are saved to file. After a credential reset, the script writes the new password to
.elastic-credentialsautomatically. The password is redacted from stdout. Never read or display the contents of.elastic-credentialsin chat. - Admin credentials are for API key creation only. The
adminpassword saved bycreate-projectandreset-credentialsexists solely to bootstrap a scoped API key — never use it for direct Elasticsearch operations.load-credentialsexcludes admin credentials by default; pass--include-adminonly for key creation. - Always prefer API keys. Do not proceed with Elasticsearch operations until an
ELASTICSEARCH_API_KEYis set. If only admin credentials are available, create a scoped API key viaelasticsearch-authn. If that skill is not installed, ask the user to install it or create the key manually in Kibana > Stack Management > API keys. - Identify projects by type and ID. Every command requires both
--typeand--id(exceptlist, which only needs--type). - Two kinds of API keys. This skill uses the Cloud API key (
EC_API_KEY) for project management operations (list, get, update, delete). Elasticsearch operations require a separate Elasticsearch API key (ELASTICSEARCH_API_KEY) that authenticates against the project's Elasticsearch endpoint. Do not confuse the two.
Workflow: Connect to an existing project
Use this workflow when the user asks to query or manage a project the agent did not create in the current session. It resolves the project, saves its endpoints, and ensures working Elasticsearch credentials before proceeding.
This workflow only applies to Elastic Cloud Serverless projects. If the user's Elasticsearch instance is self-managed or Elastic Cloud Hosted, this skill does not apply — skip it and proceed with the relevant skill directly. If unsure, ask the user: "Is your Elasticsearch instance an Elastic Cloud Serverless project?"
Connect to Existing Project:
- [ ] Step 1: Resolve the project
- [ ] Step 2: Get project details and load credentials
- [ ] Step 3: Acquire Elasticsearch credentials
Step 1: Resolve the project
Ask the user for the project name if not already provided. Infer the project type from the user's request:
| User says | --type |
|---|---|
| "search project", "elasticsearch project", vector search | elasticsearch |
| "observability project", "o11y", logs, metrics, traces, APM | observability |
| "security project", "SIEM", detections, endpoint protection | security |
If the type is ambiguous, list all three types to find the project.
python3 skills/cloud/manage-project/scripts/manage-project.py list \
--type elasticsearch
Match the user's reference (name, partial name, or alias) against the list results. If multiple projects match or none match, present the candidates and ask the user to pick.
Step 2: Get project details and load credentials
Once a single project is identified, check whether .elastic-credentials already has entries for this project (from a
previous session). If so, load them with load-credentials:
eval $(python3 skills/cloud/manage-project/scripts/manage-project.py load-credentials \
--name "<project-name>")
This sets all saved environment variables for the project — endpoints and any previously created Elasticsearch API keys
— in a single command. Admin credentials (ELASTICSEARCH_USERNAME/ELASTICSEARCH_PASSWORD) are intentionally excluded.
Later sections for the same project automatically overwrite earlier values, so the most recent credentials always win.
If load-credentials reports no matching entries, fetch the project details from the API and export endpoints manually:
python3 skills/cloud/manage-project/scripts/manage-project.py get \
--type elasticsearch \
--id <project-id>
Then export the endpoint URLs from the response. The available endpoints depend on the project type.
All project types:
export ELASTICSEARCH_URL="<elasticsearch_endpoint>"
export KIBANA_URL="<kibana_endpoint>"
Observability projects (additional):
export APM_URL="<apm_endpoint>"
export INGEST_URL="<ingest_endpoint>"
Security projects (additional):
export INGEST_URL="<ingest_endpoint>"
Step 3: Acquire Elasticsearch credentials
If load-credentials set ELASTICSEARCH_API_KEY, verify the credentials work:
curl -H "Authorization: ApiKey ${ELASTICSEARCH_API_KEY}" \
"${ELASTICSEARCH_URL}/_security/_authenticate"
Confirm the response contains a valid username and "authentication_type": "api_key" before proceeding. If
verification succeeds, skip the rest of this step.
If no credentials were loaded, or verification fails, ask the user: "Do you have an existing Elasticsearch API key for this project?"
If yes — have the user add it to .elastic-credentials (see "Credential file format"). Do not accept keys in chat.
Reload and verify:
eval $(python3 skills/cloud/manage-project/scripts/manage-project.py load-credentials \
--name "<project-name>")
curl -H "Authorization: ApiKey ${ELASTICSEARCH_API_KEY}" \
"${ELASTICSEARCH_URL}/_security/_authenticate"
If no — follow this recovery path:
-
Confirm with the user, then reset the admin bootstrap credentials:
python3 skills/cloud/manage-project/scripts/manage-project.py reset-credentials \ --type elasticsearch \ --id <project-id>The new password is saved to
.elastic-credentialswith the project name in the header. Direct the user to that file — do not display its contents. -
Load credentials with
--include-adminso the admin password is available for API key creation:eval $(python3 skills/cloud/manage-project/scripts/manage-project.py load-credentials \ --name "<project-name>" --include-admin)Use the admin credentials to create a scoped Elasticsearch API key via
elasticsearch-authnif available. If that skill is not installed, ask the user to install it or create the key manually in Kibana > Stack Management > API keys. Scope the key to only the privileges the user needs. -
After creating the API key, save it to
.elastic-credentialsusing the project-specific header format (see "Credential file format" below). Then reload without--include-adminto drop admin credentials from the environment and verify:eval $(python3 skills/cloud/manage-project/scripts/manage-project.py load-credentials \ --name "<project-name>") curl -H "Authorization: ApiKey ${ELASTICSEARCH_API_KEY}" \ "${ELASTICSEARCH_URL}/_security/_authenticate"Confirm the response shows a valid
usernameand"authentication_type": "api_key"before proceeding.
Credential file format
See references/credential-file-format.md for the full format specification.
Workflow: Load project credentials
eval $(python3 skills/cloud/manage-project/scripts/manage-project.py load-credentials \
--name "<project-name>")
Or by project ID:
eval $(python3 skills/cloud/manage-project/scripts/manage-project.py load-credentials \
--id <project-id>)
Parses .elastic-credentials, merges all sections for the matching project, and prints export statements. Admin
credentials (ELASTICSEARCH_USERNAME/ELASTICSEARCH_PASSWORD) are excluded by default — only endpoints and API keys
are exported. Add --include-admin when you need admin credentials to create an API key.
Workflow: List projects
python3 skills/cloud/manage-project/scripts/manage-project.py list \
--type elasticsearch
Use --type observability or --type security to list other project types.
Workflow: Get project details
python3 skills/cloud/manage-project/scripts/manage-project.py get \
--type elasticsearch \
--id <project-id>
Workflow: Update a project
python3 skills/cloud/manage-project/scripts/manage-project.py update \
--type elasticsearch \
--id <project-id> \
--name "new-project-name"
Only the fields provided are updated (PATCH semantics). Supported fields: --name, --alias, --tag,
--search-power, --boost-window, --max-retention-days, --default-retention-days.
Alias
The alias is an RFC-1035 domain label (lowercase alphanumeric and hyphens, max 50 chars) that becomes part of the project's endpoint URLs. Changing the alias changes all endpoint URLs, which breaks existing clients pointing to the old URLs. Warn the user about this before applying.
python3 skills/cloud/manage-project/scripts/manage-project.py update \
--type elasticsearch \
--id <project-id> \
--alias "prod-search"
Tags
Tags are key-value metadata pairs for team tracking, cost attribution, and organization. Pass --tag KEY:VALUE for each
tag. Multiple tags can be set in a single update.
python3 skills/cloud/manage-project/scripts/manage-project.py update \
--type elasticsearch \
--id <project-id> \
--tag env:prod \
--tag team:search
Tags are sent as metadata.tags in the API request. Setting tags replaces all existing tags on the project — include
any existing tags the user wants to keep.
Elasticsearch search_lake settings
For Elasticsearch projects, two fields control query performance and data caching in the Search AI Lake. Ingested data is stored in cost-efficient general storage. A cache layer on top provides faster search speed for recent and frequently queried data — this cached data is considered search-ready.
| Flag | Range | Description |
|---|---|---|
--search-power | 28–3000 | Query performance level. Higher values improve performance but increase cost |
--boost-window | 1–180 | Days of data eligible for boosted caching (default: 7) |
Search Power
Search Power controls the speed of searches by provisioning more or fewer query resources. Common presets (matching the Cloud UI):
| Value | Preset | Behavior |
|---|---|---|
| 28 | On-demand | Autoscales with lower baseline. More variable latency, reduced max throughput |
| 100 | Performant | Consistently low latency, autoscales for moderately high throughput |
| 250 | High availability | Optimized for high-throughput scenarios, maintains low latency at high volumes |
When the user asks for a preset by name, map it to the corresponding value. Custom values within 28–3000 are also valid.
Warn the user about cost implications before updating search_power. Higher values increase VCU consumption and may
result in higher bills. Confirm the new value with the user before applying.
Search Boost Window
Non-time-series data is always search-ready. The boost window determines how much time-series data (documents with a
@timestamp field) is also kept in the fast cache layer. Increasing the window means a larger portion of time-series
data becomes search-ready, which improves query speed for recent data but increases the search-ready data volume.
Security data retention settings
For security projects, two fields control how long data is retained in the Search AI Lake. Retention is configured per data stream, but these project-level settings enforce global boundaries.
| Flag | Unit | Description |
|---|---|---|
--max-retention-days | days | Maximum retention period for any data stream in the project |
--default-retention-days | days | Default retention applied to data streams without a custom one |
- Maximum retention — enforces an upper bound across all data streams. When lowered, it replaces the retention for any stream that currently has a longer period. Data older than the new maximum is permanently deleted.
- Default retention — automatically applied to data streams that do not have a custom retention period set. Does not affect streams with an existing custom retention.
Warn the user before reducing max-retention-days. Lowering the maximum permanently deletes data older than the new
limit. Confirm the new value with the user before applying.
Workflow: Reset project credentials
Always confirm with the user before resetting.
python3 skills/cloud/manage-project/scripts/manage-project.py reset-credentials \
--type elasticsearch \
--id <project-id>
The new password is saved to .elastic-credentials automatically. Tell the user to open that file — do not display its
contents in chat.
Workflow: Delete a project
Always confirm with the user before deleting.
python3 skills/cloud/manage-project/scripts/manage-project.py delete \
--type elasticsearch \
--id <project-id>
Workflow: Resume a suspended project
Projects can be automatically suspended after their trial period expires. Resume with:
python3 skills/cloud/manage-project/scripts/manage-project.py resume \
--type elasticsearch \
--id <project-id>
After resuming, poll the project status until the phase changes from initializing to initialized.
Examples
List all security projects
python3 skills/cloud/manage-project/scripts/manage-project.py list --type security
Update search power on an Elasticsearch project
python3 skills/cloud/manage-project/scripts/manage-project.py update \
--type elasticsearch \
--id abc123def456abc123def456abc12345 \
--search-power 500
Set data retention on a security project
python3 skills/cloud/manage-project/scripts/manage-project.py update \
--type security \
--id abc123def456abc123def456abc12345 \
--max-retention-days 396 \
--default-retention-days 396
Change project alias
python3 skills/cloud/manage-project/scripts/manage-project.py update \
--type elasticsearch \
--id abc123def456abc123def456abc12345 \
--alias "prod-search"
Tag a project for cost tracking
python3 skills/cloud/manage-project/scripts/manage-project.py update \
--type observability \
--id abc123def456abc123def456abc12345 \
--tag env:prod \
--tag team:platform
Rename an observability project
python3 skills/cloud/manage-project/scripts/manage-project.py update \
--type observability \
--id abc123def456abc123def456abc12345 \
--name "production-logs"
Connect to an existing project (credentials on file)
User: I want to run a query against my search project "prod-search"
Agent: Let me find that project.
[runs: list --type elasticsearch]
I found "prod-search" (ID: abc123...). Loading saved credentials...
[runs: eval $(load-credentials --name prod-search)]
Credentials loaded. Verifying...
[runs: curl -H "Authorization: ApiKey ..." "${ELASTICSEARCH_URL}/_security/_authenticate"]
Verified — authenticated as user "my-service" via API key. You're all set.
Connect to a project (no saved credentials)
User: let's ingest some logs into my o11y project "siem-prod"
Agent: Let me find that project.
[runs: list --type observability]
Found "siem-prod" (ID: def456...). No saved credentials found for this project.
[runs: get --type observability --id def456...]
Endpoints set. Since there are no Elasticsearch credentials on file, I can reset the
admin bootstrap password to get initial access. Shall I proceed?
User: yes
Agent: [runs: reset-credentials --type observability --id def456...]
Credentials saved to .elastic-credentials — open that file to retrieve the password.
[runs: eval $(load-credentials --name siem-prod --include-admin)]
Admin credentials loaded for API key creation. Creating a scoped Elasticsearch API key
now — what access does it need?
User: read-only on logs-*
Agent: [creates scoped API key via elasticsearch-authn using admin credentials]
[appends API key to .elastic-credentials with project header]
[runs: eval $(load-credentials --name siem-prod)]
[verifies against ELASTICSEARCH_URL]
API key created and verified. Admin credentials removed from environment.
Delete a project after confirmation
User: delete my elasticsearch project abc123...
Agent: Are you sure you want to delete project abc123...? This cannot be undone.
User: yes
python3 skills/cloud/manage-project/scripts/manage-project.py delete \
--type elasticsearch \
--id abc123def456abc123def456abc12345
Guidelines
- Run the
cloud-setupskill first ifEC_API_KEYis not set. - Use the
cloud-create-projectskill to create new projects — this skill handles existing projects only. - When the user refers to a project the agent did not create, follow the "Connect to an existing project" workflow.
- Deletion is permanent. Always confirm with the user before proceeding.
- После сброса учётных данных напомните пользователю обновить сохранённые пароли или переменные окружения.
- Предупредите о финансовых последствиях перед увеличением
search_power. Сначала подтвердите новое значение у пользователя. - Предупредите о потере данных перед уменьшением
max-retention-days. Данные старше нового максимального значения удаляются безвозвратно. - Предупредите пользователей, что изменение псевдонима проекта меняет все URL-адреса эндпоинтов, что нарушает работу существующих клиентов.
- Установка тегов заменяет все существующие теги. Получите текущие теги с помощью
getсначала и включите те, которые пользователь хочет сохранить.
Справочник по скрипту
| Команда | Описание |
|---|---|
list | Список проектов по типу |
get | Получить сведения о проекте по ID |
update | Обновить имя проекта, псевдоним, теги или настройки search_lake |
reset-credentials | Сбросить учётные данные проекта (новый пароль) |
delete | Удалить проект |
resume | Возобновить приостановленный проект |
load-credentials | Загрузить сохранённые учётные данные проекта из .elastic-credentials |
| Флаг | Команды | Описание |
|---|---|---|
--type | list, get, update, reset-credentials, delete, resume | Тип проекта: elasticsearch, observability, security |
--id | get, update, reset-credentials, delete, resume, load-credentials | ID проекта |
--name | update, load-credentials | Имя проекта (update: новое имя; load-credentials: поиск) |
--alias | update | Новый псевдоним проекта |
--tag | update | Тег в формате KEY:VALUE (можно повторять, заменяет все теги) |
--search-power | update | Мощность поиска 28–3000 (только elasticsearch) |
--boost-window | update | Окно буста 1–180 дней (только elasticsearch) |
--max-retention-days | update | Максимальный срок хранения данных в днях (только security) |
--default-retention-days | update | Срок хранения данных по умолчанию в днях (только security) |
--include-admin | load-credentials | Включить имя администратора/пароль (только для начальной настройки API-ключа) |
--wait-seconds | reset-credentials | Секунды ожидания распространения учётных данных (0 — пропустить) |
Переменные окружения
| Переменная | Обязательно | Описание |
|---|---|---|
EC_API_KEY | Да | API-ключ Elastic Cloud (операции управления проектами) |
EC_BASE_URL | No | Базовый URL Cloud API (по умолчанию: https://api.elastic-cloud.com) |
ELASTICSEARCH_URL | Вывод | URL Elasticsearch (устанавливается после выбора проекта для последующих навыков) |
KIBANA_URL | Вывод | URL Kibana (устанавливается после выбора проекта для последующих навыков) |
APM_URL | Вывод | Эндпоинт APM (только для проектов observability) |
INGEST_URL | Вывод | Эндпоинт приёма OTLP (проекты observability и security) |
ELASTICSEARCH_API_KEY | Вывод | API-ключ Elasticsearch (для операций на уровне стека) |
Дополнительные ресурсы
- Полные сведения об API, схемы запросов/ответов и параметры типов проектов см. в Serverless Projects API
- Официальную документацию по настройкам Search AI Lake, хранению данных и функциям проектов см. в разделе Project settings
Вставить в README
Ссылка на карточку для вашего README — без картинок и счётчиков.
[DarkPlay: cloud-manage-project](https://darkplay.ru/ai/skills/elastic-agent-skills-cloud-manage-project)
Из того же репозитория
Похожие скиллы и другие разделы каталога
Самые востребованные скиллов раздела по установкам и звёздам.
find-skillsvercel-labs · Помогает находить и устанавливать навыки агентов по запросам вроде «как сделать X»…
grill-memattpocock · Настойчивое интервью для доработки плана или дизайна.
hyperframesheygen-com · Обязательная точка входа для любых задач по видео, анимации и motion-графике в…
hyperframes-cliheygen-com · Цикл разработки HyperFrames CLI: init, add, render, preview, publish и другие команды.
agent-browservercel-labs · CLI для автоматизации браузера для ИИ-агентов: навигация по страницам, заполнение форм…
media-useheygen-com · Agent Media OS: единый навык для медиа в HyperFrames — BGM, SFX, изображения, голос, LUT.
hyperframes-registryheygen-com · Установка и подключение блоков реестра в композиции HyperFrames через add и catalog.
grill-with-docsmattpocock · Настойчивое интервью для доработки плана или дизайна, попутно создающее документацию (ADR…
improve-codebase-architecturemattpocock · Поиск в кодовой базе возможностей для углубления, визуальный HTML-отчёт о них и детальный…
tddmattpocock · Разработка через тестирование (TDD): red-green-refactor и интеграционные тесты.Соседние разделы каталога: возможно, нужный инструмент живёт там.
Cpp Revieweraffaan-m · Ревьюер C++: безопасность памяти, современные идиомы, конкурентность, производительность.
Csharp Revieweraffaan-m · Ревьюер C#: конвенции .NET, async, безопасность, nullable-типы, производительность.
Django Revieweraffaan-m · Ревьюер Django: ORM, DRF, миграции, безопасность и production-практики.
E2e Runneraffaan-m · Специалист по E2E-тестам на Vercel Agent Browser и Playwright: генерация, запуск и…
Flutter Revieweraffaan-m · Ревьюер кода Flutter и Dart: виджеты, управление состоянием, идиомы и архитектура.
Fsharp Revieweraffaan-m · Ревьюер кода F#: функциональные идиомы, типы, сопоставление с образцом и…
Go Revieweraffaan-m · Ревьюер кода Go: идиоматичность, конкурентность, обработка ошибок и производительность.
Harmonyos App Resolveraffaan-m · Эксперт по HarmonyOS на ArkTS и ArkUI: состояние V2, навигация, API и производительность.
Instinct Exportaffaan-m · Экспортирует инстинкты из области проекта или глобальной области в файл.
Instinct Importaffaan-m · Импортирует инстинкты из файла или URL в область проекта или глобальную область.Лучшие ИИ-инструменты для генерации видео
Подборка нейросетей для генерации и монтажа видео. Инструменты, которые превращают текст в готовые ролики, экономят часы на съемках и постпродакшне. Подходит для SMM-специалистов,
VEED.IOVeed
MootionMootion
Sora (OpenAI)OpenAI
viralpulse.appViralpulse
Viral Maker AIViral-makerЛучшие ИИ-инструменты для генерации текста и копирайтинга
Подборка нейросетей для генерации текстов и копирайтинга. Сервисы, которые помогают создавать статьи, посты и рекламные объявления с нуля или по черновику, экономя часы рутинной ра
NeuroscribeNeuroscribe
GoGPTGogpt
НейроТекстерNeuro-texter
ChatGPTOpenAI
Cosmo ScribeCosmoscribe
Memo HelperCopilot33
LibraChatLibrachatЛучшие ИИ-инструменты для генерации изображений
Подборка нейросетей для генерации изображений от фотореализма до концепт-арта. Сервисы, которые экономят часы ручной работы, создавая визуал для блогов, рекламы и дизайна за минуты
MagviMagvi
DALL-E 3OpenAI
SupaLabSupalab
Freestyling.aiFreestyling
ArtGeneration.meArtgeneration
BigjpgBigjpg
Художник от VKVK
Avato AI12ai
Virton AIVirton