Implementation:AMAP ML SkillClaw verify skill candidate
| Knowledge Sources | |
|---|---|
| Domains | Quality_Evaluation, Publishing_Gate |
| Last Updated | 2026-10-22 00:00 GMT |
Overview
Concrete tool for verifying candidate skills before publishing them to shared storage, provided by the SkillClaw evolve server package.
Description
The verify_skill_candidate async function acts as a publication gate. It sends the candidate skill, current skill (if evolving), and session evidence to an LLM verifier. The verifier scores the candidate across multiple checks (grounded_in_evidence, preserves_existing_value, specificity_and_reusability, safe_to_publish) and returns an accept/reject decision. If the LLM score is below the `min_score` threshold (default 0.75), the candidate is rejected regardless of the LLM's decision. On verifier call failure, the candidate is safely rejected.
Usage
Import and use when you need to:
- Gate skill publication with LLM-based verification
- Understand the verification checks and scoring logic
- Set custom acceptance thresholds for skill publishing
Code Reference
Source Location
- Repository: SkillClaw
- File: `evolve_server/pipeline/skill_verifier.py:L154-241`
Signature
async def verify_skill_candidate(
llm: AsyncLLMClient,
skill: dict[str, Any],
sessions: list[dict[str, Any]],
action_type: str,
*,
current_skill: Optional[dict[str, Any]] = None,
min_score: float = 0.75,
) -> dict[str, Any]:
"""Verify a candidate skill before publishing it to shared storage.
Returns: {
"enabled": bool,
"accepted": bool,
"decision": "accept" | "reject",
"score": float | None,
"threshold": float,
"reason": str,
"checks": dict,
}
"""
Import
from evolve_server.pipeline.skill_verifier import verify_skill_candidate
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| llm | AsyncLLMClient | Yes | Async LLM client for verification |
| skill | dict | Yes | Candidate skill with name, description, content |
| sessions | list[dict] | Yes | Session evidence for grounding |
| action_type | str | Yes | "improve", "optimize_desc", or "create" |
| current_skill | None | No | Existing skill (if evolving) |
| min_score | float | No | Acceptance threshold (default 0.75) |
Outputs
| Name | Type | Description |
|---|---|---|
| Returns | dict | {enabled, accepted, decision, score, threshold, reason, checks} |
Usage Examples
Verify Before Publishing
import asyncio
from evolve_server.core.llm_client import AsyncLLMClient
from evolve_server.pipeline.skill_verifier import verify_skill_candidate
llm = AsyncLLMClient(api_key="sk-...", model="gpt-4o")
result = asyncio.run(verify_skill_candidate(
llm=llm,
skill={"name": "python_deployment", "description": "...", "content": "..."},
sessions=skill_sessions,
action_type="improve",
current_skill={"name": "python_deployment", "content": "old content"},
min_score=0.75,
))
if result["accepted"]:
print(f"Skill accepted (score={result['score']})")
# Proceed to upload
else:
print(f"Skill rejected: {result['reason']}")