بنقرة واحدة
kibel-agentic-search
Use this skill for high-precision Kibela note retrieval via ambiguity-planner-first workflows.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Use this skill for high-precision Kibela note retrieval via ambiguity-planner-first workflows.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Use this skill for evidence-first RAG over Kibela using kibel CLI (retrieve -> verify -> cite).
Use this skill when an agent needs broad operational coverage of the official kibel CLI, including safe GraphQL query execution.
| name | kibel-agentic-search |
| description | Use this skill for high-precision Kibela note retrieval via ambiguity-planner-first workflows. |
| allowed-tools | Bash(kibel:auth status),Bash(kibel:auth login),Bash(kibel:search note),Bash(kibel:search user),Bash(kibel:note get),Bash(kibel:note get-many),Bash(kibel:note get-from-path),Bash(rg:*),Bash(python3:*) |
KBIN="${KIBEL_BIN:-kibel}"
if [[ "${KBIN}" == */* ]]; then
[[ -x "${KBIN}" ]] || { echo "kibel binary not executable: ${KBIN}" >&2; exit 127; }
elif ! command -v "${KBIN}" >/dev/null 2>&1; then
echo "kibel not found in PATH (or set KIBEL_BIN)" >&2
exit 127
fi
if ! command -v python3 >/dev/null 2>&1; then
echo "python3 not found in PATH" >&2
exit 127
fi
AUTH_JSON="$("${KBIN}" auth status 2>/dev/null)" || {
echo "auth status command failed" >&2
exit 3
}
python3 -c 'import json,sys; d=json.load(sys.stdin); sys.exit(0 if d.get("ok") is True else 1)' <<<"${AUTH_JSON}" || {
echo "auth is not ready; run auth login first" >&2
exit 3
}
python3 -c 'import json,sys; d=json.load(sys.stdin); sys.exit(0 if d.get("data", {}).get("logged_in") is True else 1)' <<<"${AUTH_JSON}" || {
echo "auth is not ready; run auth login first" >&2
exit 3
}
SMOKE_JSON="$("${KBIN}" search note --query "test" --first 1 2>/dev/null)" || {
echo "search note smoke failed" >&2
exit 3
}
python3 -c 'import json,sys; d=json.load(sys.stdin); sys.exit(0 if d.get("ok") is True else 1)' <<<"${SMOKE_JSON}" || {
echo "search note smoke returned not ok" >&2
exit 3
}
python3 -c 'import json,sys; d=json.load(sys.stdin); sys.exit(0 if isinstance(d.get("data", {}).get("results"), list) else 1)' <<<"${SMOKE_JSON}" || {
echo "search note output shape mismatch: .data.results[] expected" >&2
exit 3
}
Proceed only if ok: true.
If auth is not ready, recover with one of these before continuing:
# interactive (recommended for local)
"${KBIN}" auth login --origin "https://<tenant>.kibe.la" --team "<tenant>"
# non-interactive token pipe (CI/temporary, `--with-token` reads stdin)
printf '%s' "${KIBELA_ACCESS_TOKEN}" | \
"${KBIN}" auth login --origin "https://<tenant>.kibe.la" --team "<tenant>" --with-token
Token issue page:
https://<tenant>.kibe.la/settings/access_tokens
Tenant placeholder rule:
https://<tenant>.kibe.la の <tenant> を使う。https://example.kibe.la -> team=exampleSecurity note:
KIBELA_ACCESS_TOKEN / --with-token は CI・一時実行向け。常用しない。search note items: .data.results[]search note page cursor: .data.page_info.endCursorsearch user items: .data.users[]auth status: .data.logged_in, .data.team, .data.originDefault mode is ambiguity-planner-first retrieval. Single-query search is a fast-path fallback.
"${KBIN}" search note --mine --first 10
Use this when user intent is "my latest docs", "what I wrote recently", or "my notes list".
Before retrieval, decompose the user question:
intent: what answer is neededtarget: team/project/system/personartifact: guide/spec/runbook/postmortem/policytime: latest/current/specific periodscope: org-wide or local team scopeGenerate candidate queries from these facets (not single fixed keywords).
Candidate budget:
fast: up to 2 candidatesbalanced: up to 4 candidatesdeep: up to 7 candidatesCorrective thresholds by profile:
| profile | min_top5_relevance | min_must_have_evidence_hits |
|---|---|---|
| fast | 0.60 | 1 |
| balanced | 0.75 | 2 |
| deep | 0.85 | 2 |
declare -a CANDIDATES=(
"<anchor_query>"
"<artifact_query>"
"<scope_or_time_query>"
)
for q in "${CANDIDATES[@]}"; do
"${KBIN}" search note --query "${q}" --first 16
done
Cursor pagination per candidate:
"${KBIN}" search note --query "<candidate_query>" --after "<cursor>" --first 16
Optional reusable preset:
"${KBIN}" search note --query "<query>" --save-preset "<name>"
"${KBIN}" search note --preset "<name>"
"${KBIN}" search note \
--query "<candidate_query>" \
--user-id "<USER_ID>" \
--group-id "<GROUP_ID>" \
--folder-id "<FOLDER_ID>" \
--first 16
Notes:
--query can be empty for filter-first retrieval.--resource is omitted, NOTE is used by default.--mine is exclusive and cannot be combined with other search filters (INPUT_INVALID).--user-id is optional. Do not block on unknown user IDs."${KBIN}" search user --query "<query>" --group-id "<GROUP_ID>" --folder-id "<FOLDER_ID>" --first 10
Trigger when:
top5_relevance < min_top5_relevance(profile)must_have_evidence_hits < min_must_have_evidence_hits(profile)artifact / target) are missingActions:
group-id / folder-id / optional user-idUse only when query is explicit and low-latency is priority.
"${KBIN}" search note --query "<exact_query>" --first 16
Use result id or path to validate top hits:
"${KBIN}" note get --id "<NOTE_ID>"
"${KBIN}" note get-many --id "<NOTE_ID_1>" --id "<NOTE_ID_2>"
"${KBIN}" note get-from-path --path "/notes/<number>"
High-precision rule:
note get/get-many/get-from-path evidence source.Unknowns and do not present it as confirmed.Always return:
Example format:
Search basis:
- candidates: ["オンボーディング資料", "受け入れマニュアル", "入社手順"]
- filters: user-id=U1, group-id=G1
Top matches:
1. <title> (<url>) - <why relevant>
2. <title> (<url>) - <why relevant>
Unknowns:
- <missing context or ambiguous terms>
references/commands.md: compact command cookbook.templates/recall_precision_loop.sh: recall runner (single query / candidate list).