用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/microsoft-foundry/build-2026-demos --skill azure-search-ops命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Microsoft Agent Framework + Foundry Toolbox MCP integration specialist
Operate the Foundry Toolbox and Foundry-hosted agents for the Fibey project: inspect, version, recreate, and smoke-test.
React + TypeScript + Tailwind CSS chat interface specialist for this project's streaming chat UI
正在显示 SKILL.md
基于 SOC 职业分类
| name | Azure Search Ops |
| description | Operate the Azure AI Search index and knowledge base behind FoundryIQ for Fibey field ops. |
| tags | ["azure","ai-search","knowledge-base","foundryiq","rag","ops"] |
You are a specialist for operating the Azure AI Search index and the Knowledge Base (KB) that the Fibey agent uses via Foundry Toolbox / FoundryIQ. You don't manage the agent or its prompts — that's the Agent Developer skill. You focus on content freshness, schema correctness, and retrieval quality.
services/foundry-iq-docs/docs/*.md
│
▼ Blob container "foundry-iq-docs"
│
▼ AI Search indexer "foundry-iq-docs-indexer"
│
▼ AI Search index "foundry-iq-docs-index"
│ └─ semantic config "default"
│
▼ Knowledge Source "fibey-field-ops-ks" (kind=searchIndex)
│
▼ Knowledge Base "fibey-field-ops-kb"
│
▼ Foundry connection "fibey-search" (CognitiveSearch + ApiKey)
│
▼ Foundry Toolbox → agent retrieves via azure_ai_search tool
2024-07-01.2026-04-01 (GA). The KB/KS endpoints use
OData function syntax: knowledgebases('<name>'),
knowledgebases('<name>')/retrieve. Path-style /knowledgebases/<name>
returns HTTP 405.{ kind: "searchIndex", searchIndexParameters: { searchIndexName, sourceDataFields, ... } }.{ intents: [ { search: "<query>", type: "semantic" } ], knowledgeSourceParams: [ ... ] }.CognitiveSearch + ApiKey + Foundry
tool type azure_ai_search. RemoteTool + ProjectManagedIdentity ->
KB MCP endpoint returns HTTP 403.reset is NOT terminal — it represents the prior reset
request, not the in-flight run. Poll past it.scripts/setup-knowledge-base.sh (kept). Day-to-day
ops are the inline az/curl commands below.| Var | Used for |
|---|---|
AZURE_RESOURCE_GROUP | Resolves search service / storage |
AZURE_SEARCH_ENDPOINT | Override; otherwise https://<svc>.search.windows.net |
AZURE_SEARCH_ADMIN_KEY | Override; otherwise fetched via az search admin-key show |
STORAGE_ACCOUNT | Override; otherwise from azd outputs |
Get an admin key:
SVC=fibey-apps-search # or your env's search service
RG=rg-fibey-westus2
KEY=$(az search admin-key show --service-name "$SVC" --resource-group "$RG" --query primaryKey -o tsv)
These replace the previous wrapper scripts. Run from repo root with .env
exported (set -a && . .env && set +a).
SVC=fibey-apps-search
INDEX=foundry-iq-docs-index
INDEXER=foundry-iq-docs-indexer
EP="https://$SVC.search.windows.net"
KEY=$(az search admin-key show --service-name "$SVC" -g "$AZURE_RESOURCE_GROUP" --query primaryKey -o tsv)
# Doc count
curl -fsS -H "api-key: $KEY" \
"$EP/indexes/$INDEX/docs/\$count?api-version=2024-07-01"
# Latest indexer run
curl -fsS -H "api-key: $KEY" \
"$EP/indexers/$INDEXER/status?api-version=2024-07-01" \
| jq '.lastResult | {status, itemsProcessed, itemsFailed, errors, startTime, endTime}'
# Schema
curl -fsS -H "api-key: $KEY" \
"$EP/indexes/$INDEX?api-version=2024-07-01" \
| jq '{fields: [.fields[] | {name, type, key, retrievable, searchable}], semantic, vectorSearch}'
# Plain search (sanity check)
curl -fsS -H "api-key: $KEY" \
"$EP/indexes/$INDEX/docs?api-version=2024-07-01&search=*&\$top=3" | jq
ACCT=<your storage account>
CONT=foundry-iq-docs
KEY=$(az storage account keys list -g "$AZURE_RESOURCE_GROUP" -n "$ACCT" --query "[0].value" -o tsv)
# Upload (overwrites)
az storage blob upload-batch --account-name "$ACCT" --account-key "$KEY" \
--destination "$CONT" --source services/foundry-iq-docs/docs --pattern "*.md" --overwrite
# Run the indexer
SVC_KEY=$(az search admin-key show --service-name "$SVC" -g "$AZURE_RESOURCE_GROUP" --query primaryKey -o tsv)
curl -fsS -X POST -H "api-key: $SVC_KEY" \
"$EP/indexers/$INDEXER/run?api-version=2024-07-01"
# Poll until terminal (success / transientFailure / persistentFailure).
# IMPORTANT: ignore status "reset" (not terminal) and empty bodies.
for i in {1..60}; do
STATUS=$(curl -fsS -H "api-key: $SVC_KEY" \
"$EP/indexers/$INDEXER/status?api-version=2024-07-01" \
| jq -r '.lastResult.status // "running"')
echo "[$i] $STATUS"
case "$STATUS" in
success|transientFailure|persistentFailure) break ;;
esac
sleep 5
For a full rebuild, call POST .../indexers/$INDEXER/reset first, then run
the indexer. Don't bail on the first reset status while polling.
# KB config
curl -fsS -H "api-key: $SVC_KEY" \
"$EP/knowledgebases('fibey-field-ops-kb')?api-version=2026-04-01" | jq
# Retrieve
curl -fsS -X POST -H "api-key: $SVC_KEY" -H "Content-Type: application/json" \
"$EP/knowledgebases('fibey-field-ops-kb')/retrieve?api-version=2026-04-01" \
-d '{
"intents": [{ "search": "how do I splice single-mode fiber", "type": "semantic" }],
"knowledgeSourceParams": [{
"kind": "searchIndex",
"knowledgeSourceName": "fibey-field-ops-ks"
}]
}' | jq
lastResult.status == success and doc count matches expectations.success? Schema as expected?sourceDataFields.api-version=2024-07-01). Some changes require recreating
the index — non-breaking field additions are OK in place.scripts/setup-knowledge-base.sh so future bootstraps match.sourceDataFields or semantic config changed, also update the KS body
inside setup-knowledge-base.sh (and PUT to the KS endpoint).lastResult.status == persistentFailure repeatedly with the same error.search=* results.Recovery: POST /indexers/$INDEXER/reset, then re-run. If that doesn't
help, DELETE + recreate the index and re-run setup-knowledge-base.sh.
az search admin-key show./knowledgebases/<name>) — they return 405.
Use OData function syntax: knowledgebases('<name>').reset as terminal in your polling loop..env.example.