Five-Axis Evaluation and Baseline Validation for Agent Skill Management
A practical framework for evaluating how agent skills are formatted, discovered, selected, distributed, and constrained, plus guidance for writing portable skills and a local baseline checker that validates simple SKILL.md metadata without claiming safety or successful execution.
1. Consistent formatting is only the starting point
An agent skill can be understood as a reusable task package. It describes when the skill applies, which steps to follow, and what input and output constraints apply. It may also include reference material or helper scripts when needed. A common layout places SKILL.md in the skill directory. The runtime reads its metadata and loads the body when the task matches.
The value of this approach is not merely “saving a prompt as a file.” It gives task experience explicit boundaries so it can be versioned, reviewed, tested, distributed, and moved between runtimes.
A file that parses successfully is not the same as a skill that runs reliably. At least three further thresholds remain:
- Discovery: Can the runtime find the skill, and how are multiple skills with the same name handled?
- Selection: When a task arrives, can the agent recognize the skill’s scope?
- Execution: Are the required files, tools, and permissions available, and are dangerous operations controlled?
Comparing file-format compatibility alone is therefore less useful than asking how a skill enters the system, how it is selected, how it executes, and how it leaves the system.
This article discusses general engineering mechanisms. It does not rank specific implementations, and it does not treat extension fields from one runtime as a universal specification.
2. A five-axis evaluation framework
A skill management system can be assessed along five dimensions: format, context budget, discovery layers, distribution, and security.
| Axis | Questions to answer | Suggested checks | Common risks |
|---|---|---|---|
| Format and portability | Are the base fields explicit? How are extension fields handled? Does the body depend on runtime-specific semantics? | Parse and load a minimal skill package | The file is readable, but execution behavior differs |
| Context budget | When are the summary, body, and attachments loaded? Is content truncated? | Record load stages, content size, and actual context use | Missing summaries, or the body crowding out the task |
| Discovery layers | How are user, project, and organization directories merged? How are same-name items handled? | Create same-name skills across different directory combinations | Silent overrides, or the wrong skill being selected |
| Distribution and lifecycle | How is a skill installed, pinned, updated, rolled back, and revoked? | Rehearse upgrade, rollback, and offline recovery | The same task behaving differently on different machines |
| Security and trust | Is the source trustworthy? Are execution permissions controlled separately? | Test privilege escalation, prompt injection, and external access | Skill text being treated as a high-priority instruction |
This table is an acceptance framework, not a feature checklist. Supporting many fields does not make a system more mature if it cannot explain how those fields affect execution, how conflicts are resolved, and how permissions are limited.
2.1 Format compatibility has three layers
The first layer is parse compatibility: directory structure, file encoding, and metadata can be recognized.
The second is semantic compatibility: names, descriptions, steps, and output requirements have similar meanings across environments.
The third is execution compatibility: the tools, paths, network capabilities, and approval flows the skill needs can actually be satisfied.
Migration failures often occur at the third layer. A skill may depend on a specific working directory and preinstalled commands. Even if its body can be read completely, it may still be unable to run.
A more stable design splits content into two parts:
- A portable core: goal, applicability conditions, processing steps, and acceptance requirements.
- Environment adaptation: directory mapping, execution entry points, tool dependencies, and permission policy.
Do not scatter environment-specific details throughout the body. Otherwise, it is hard to tell what must change during migration.
2.2 Context budgets depend on when content is loaded
As the number of skills grows, keeping every full body resident in context is usually uneconomical. Progressive loading is a practical alternative:
- During discovery, read only the name and a short description.
- After a skill is selected, read its core operating steps.
- Load the relevant reference material only when execution reaches that stage.
- Call helper scripts when they are actually needed, rather than treating the full script text as resident instructions.
Progressive loading reduces irrelevant content, but it adds requirements: summaries must be accurate enough, and the body must state clearly when an attachment should be loaded.
A description should include both the task object and the trigger conditions. For example:
Reviews relational database schema changes, with emphasis on compatibility, lock-wait risk, and rollback conditions.
Compared with “database expert,” this kind of description expresses a boundary more clearly and is easier to test with positive and negative cases.
Character count is not the same as the context unit a model actually processes. Cost varies by language, symbols, and text structure. File size is only a coarse filter. Final judgment should use context statistics or observations from the runtime.
2.3 Discovery layers must resolve conflicts explicitly
Organization-level, user-level, and project-level skills may exist at the same time. A same-name override that is not visible makes behavior hard to explain.
An implementation should record at least:
- The skill’s logical identifier.
- The path that was actually loaded.
- Its source and version.
- The scope currently in effect.
- The conflict-resolution result.
There is no universal override rule, but the rule must be stable and queryable. A protected organization-level security policy should not be replaceable by an ordinary project skill that happens to use the same file name.
Discovery should also be separate from authorization. Being able to scan a directory does not mean scripts in that directory may execute directly.
2.4 Distribution must cover the full lifecycle
Distribution is more than copying a directory. A team also has to manage what changes after installation.
A recommended flow is:
Submit a change → automatic validation → human review → test verification → publish a fixed version → enable it in batches → observe results → roll back when necessary
Production tasks should not implicitly follow a latest version that keeps changing. Record the version or content digest actually used so the run can be reproduced and incidents can be traced.
Also define revocation: when a skill is found to contain dangerous instructions, incorrect steps, or untrusted dependencies, how new tasks stop using it, how in-flight tasks are handled, and how the system returns to a verified version.
2.5 Security controls must be independent of the skill body
A skill file may contain legitimate operating guidance, or it may include malicious requests such as reading unrelated credentials, uploading internal files, or asking the agent to ignore existing constraints.
Treat the skill body as sourced task material, not as inherently trusted instructions with the highest priority.
The execution layer can apply controls such as:
- Read-only permission by default, with write capability granted per task.
- Boundaries on working directories and output directories.
- An allowlist for external access.
- Extra approval for high-impact operations such as deletion, overwrite, and deployment.
- Time and resource limits on scripts.
- Records of tool calls, authorization results, and key artifacts.
Runtime isolation can reduce system-operation risk, but it does not by itself prove that the model was not misled. Prompt-injection defense, data-access control, and execution isolation need to be designed together.
3. How to write skills that migrate more easily
3.1 Keep one skill focused on one clear task
Do not pack code review, deployment, data analysis, and documentation into the same skill. Broader responsibility makes the trigger description vaguer and the test matrix more complex.
A practical grain is a class of tasks with relatively stable inputs, steps, and acceptance criteria. “Review database schema changes” is easier to maintain than “handle all database problems.”
3.2 State inputs, outputs, and stop conditions
A skill should at least answer:
- Which inputs are required before execution?
- What should be asked when an input is missing?
- What structure should the final output use?
- In which cases must execution stop and wait for human confirmation?
“Complete automatically” does not mean “guess automatically.” When the target environment, permission scope, or rollback basis is missing, stopping and reporting the uncertainty is usually more reliable than continuing.
3.3 Move long reference material out of the core body
One possible directory layout is:
review-change/SKILL.mdreferences/compatibility.mdrollback-checklist.mdscripts/inspect-change.pytests/trigger-cases.txtacceptance-cases.txt
This layout is illustrative. Not every runtime requires or supports the same directory semantics. When referencing an attachment, use a relative path and state its purpose. Do not assume the runtime will automatically read every file.
3.4 Prefer idempotent executable scripts
Scripts that can be run again without causing additional damage are better suited to agent invocation. For write operations, generate a plan and show the diff before confirming execution.
If the target system has no transaction or rollback mechanism, state the compensation steps and their limits. Writing “roll back on failure” in the document does not make rollback possible.
4. A baseline checker for skill files
The following example is a local validator that can be executed as written.
It checks the conservative authoring baseline defined in this article. It is not a complete standards certifier, and it does not prove that a skill is safe or can execute successfully. To avoid extra dependencies, the example accepts only simple single-line metadata. The required fields are name and description. Values may be plain strings or strings wrapped in a matching pair of quotes. Multiline values, nested structures, and complex scalars require a full parser.
This article’s baseline requires names to be combinations of lowercase letters, digits, and hyphens, with a length of no more than 64. Descriptions must be non-empty and no longer than 1024. These limits are local policy. They should not be inferred as shared requirements of every runtime.
import reimport sysfrom pathlib import PathNAME_PATTERN = re.compile(r"[a-z0-9]+(?:-[a-z0-9]+)*")KEY_PATTERN = re.compile(r"[A-Za-z_][A-Za-z0-9_-]*")MAX_FILE_BYTES = 256 * 1024def validate(path):errors = []if path.name != "SKILL.md":errors.append("entry file must be named SKILL.md")try:raw = path.read_bytes()except OSError as exc:return [f"unable to read file: {exc}"]if len(raw) > MAX_FILE_BYTES:return errors + ["file exceeds the local policy size limit"]try:text = raw.decode("utf-8")except UnicodeDecodeError:return errors + ["file must use UTF-8 encoding"]if "\x00" in text:errors.append("file contains a null character")lines = text.splitlines()if not lines or lines[0] != "---":return errors + ["file must start with a metadata delimiter line ---"]end = next((i for i in range(1, len(lines)) if lines[i] == "---"),None)if end is None:return errors + ["missing closing metadata delimiter"]fields = {}for number, line in enumerate(lines[1:end], start=2):if not line.strip() or line.lstrip().startswith("#"):continueif line[:1].isspace() or ":" not in line:errors.append(f"line {number}: only single-line key-value pairs are supported")continuekey, value = line.split(":", 1)key, value = key.strip(), value.strip()if not KEY_PATTERN.fullmatch(key):errors.append(f"line {number}: invalid field name")continueif key in fields:errors.append(f"line {number}: duplicate field {key}")continueif value.startswith(("'", '"')):quote = value[0]if len(value) < 2 or value[-1] != quote:errors.append(f"line {number}: unclosed quote")continuevalue = value[1:-1]if quote in value or "\\" in value:errors.append(f"line {number}: escapes or nested quotes are not supported")continueelif (value.startswith(("|", ">", "[", "{", "&", "*", "!"))or " #" in value):errors.append(f"line {number}: complex scalars or trailing comments are not supported")continuefields[key] = valuename = fields.get("name", "")description = fields.get("description", "")if not name:errors.append("missing non-empty name")elif len(name) > 64 or not NAME_PATTERN.fullmatch(name):errors.append("name does not match this article's naming policy")if not description.strip():errors.append("missing non-empty description")elif len(description) > 1024:errors.append("description exceeds this article's length policy")body = "\n".join(lines[end + 1:]).strip()if not body:errors.append("body must not be empty")return errorsdef main():if len(sys.argv) < 2:print("usage: run this file with the local interpreter and pass skill file paths")return 2failed = Falsefor argument in sys.argv[1:]:path = Path(argument)errors = validate(path)if errors:failed = Trueprint(f"[FAIL] {path}")for error in errors:print(f" - {error}")else:print(f"[PASS] {path}")return 1 if failed else 0if __name__ == "__main__":raise SystemExit(main())
Save the code as a local script, run it with the local interpreter, and pass one or more SKILL.md paths. Exit code 0 means every file passed, 1 means validation failed, and 2 means an argument is missing.
This kind of static check fits commit checks and release pipelines, but it cannot verify that operations described in the body are correct, and it will not find every malicious payload. Production use also needs checks of referenced paths, dependency manifests, script behavior, and actual permission boundaries.
5. Move from “the file passed” to “the behavior passed”
5.1 Test whether a skill should be triggered
Build three kinds of cases for each skill:
- Positive cases: tasks that clearly require the skill.
- Negative cases: tasks on a similar topic that should not use the skill.
- Boundary cases: tasks with insufficient information, where the agent should ask before deciding.
If the runtime does not expose an explicit selection event, observable logs or test records can help. Do not infer successful loading only from the final answer.
5.2 Test whether execution results meet the constraints
Acceptance should focus on checkable behavior, not on whether an answer “looks professional.”
For example, a schema-change review skill should list risks, evidence, and rollback prerequisites. When required information is missing, it should identify the gap instead of producing an assumed conclusion.
For write operations, also verify that no unauthorized modification occurred, that nothing was written to the wrong directory, and that a diagnosable record remains after failure.
5.3 Test failures and conflicts
Cover missing skills, unreadable attachments, same-name conflicts, permission denials, and script timeouts.
A useful failure reports which stage failed, which actions have not yet run, which results may be incomplete, and what information is needed next. Silent degradation can make users believe the full workflow finished.
6. Skills and memory are not simple substitutes
Skills mainly carry reusable procedures. Memory mainly stores information across tasks. Rules express long-term constraints. They solve different problems, so one mechanism should not be treated as a necessary replacement for another.
If a system generates experience from past interactions, treat that output first as candidate content pending review. Mark its source, scope, and expiration conditions before deciding whether to turn it into a formal skill. This keeps the efficiency of automatic summarization without freezing an accidental success into a general rule.
7. Practical rollout: govern first, then expand
For individual development, start with directory structure, baseline validation, and version records. Team collaboration needs review, testing, and conflict diagnosis. Work involving sensitive data or high-impact operations also needs source verification, least privilege, audit, and revocation.
What is worth investing in is not the number of skills itself, but an execution path that is explainable, reproducible, and controllable. Format compatibility lowers the cost of sharing. Management mechanisms decide whether that shared content can become a reliable engineering asset.
