Skip to main content
When creating, optimizing, or combining Skills, calling /comet-any in the Agent and confirming prompts is enough for most cases. Unless you are debugging an Engine Run, runtime checks, or package structure, you do not need the internals on this page first. Classic Spec mode users of /comet-classic also do not need Engine internals to run the five-phase workflow.
Comet’s Skill is not just about Markdown prompts. Starting from 0.4.0-beta.1, Comet has built-in the Skill Engine - a deterministic runtime responsible for executing, constraining, persisting, restoring, and evaluating Comet Skill. It provides stable content hashing, immutable snapshots, pending action recovery, guardrails and runtime checks for multi-step skills.

Audience

The command boundaries are:
  • SKILL.md is the entry description seen by both humans and agents.
  • The comet/ directory is the runtime control plane that determines how to execute, restore, check and evaluate.
  • For comet eval, check the pre-release evidence; for comet skill check, check the runtime check of a certain Run. The two are not the same thing.

Three types of skills

Skill discovery sequence

Search for resolveSkill in the following order. Stop once found:
  1. explicit -Selector points to an existing directory and loads directly. If the path does not exist, an error will be reported and the search will not continue.
  2. project - <projectRoot>/.comet/skills/<selector>, ** takes precedence over built-in **, so the project can override the built-in Skill by name.
  3. builtin — assets/skills/<selector>。
  4. None of them were found → fail closed, no silent rollback.
When the project Skill overrides the built-in Skill by name, if the project Skill When invalid, it will fail directly and prohibit rollback to the built-in version. This can prevent silent downgrading when the custom version is invalid.

”Skill package structure”

An Engine-enabled Skill package includes more than SKILL.md; it also includes a comet/ control plane:
<skill-name>/
SKILL.md
comet/
skill.yaml
guardrails.yaml
checks.yaml
evals.yaml
eval.yaml
evals/
evals.json
scripts/
references/
assets/

Responsibilities of each document

confusing name: plural evals yaml (or checks yaml It is the runtime eval, which is checked by the Engine at runtime. The singular eval.yaml is the creation period evaluation manifest, which is comet eval is verified before release. The life cycles of the two are different and should not be confused. checks yaml and evals.yaml cannot exist simultaneously.

skill Definition: Skill.yaml

skill.yaml describes the objective, orchestration method and declared capabilities of a Skill:
Key field

Step action type

The action.type for each step is one of the following:

Two arrangement modes

The two modes share the same execution loop. The difference lies in who decides the next move.

deterministic

  • The steps are a static diagram. entry specifies the starting point, and next of each step specifies the next step.
  • The Engine automatically parses the results of the current step → construct action → pass guardrails → pause, etc.
  • After success, move on to next; If it fails, increase the retry count and remain at the current step.
  • next indicates that the Run is completed in empty time. Currently, comet skill run only supports end-to-end execution of deterministic.

adaptive

  • entry or steps cannot be defined.
  • Engine ** does not propose actions by itself ** - proposed by an external Agent, injected through acceptAdaptiveAction, and also through guardrails.
  • The completion is driven by evals/Agent, and there is no next: null termination step.
  • The loop layer is ready and has test coverage, but the public entry of comet skill run currently rejects adaptive packages.
If you are writing a multi-step Skill that requires recovery, use deterministic. “adaptive” is an Agent Prepared for the autonomous decision-making scenario, currently loop-ready but not exposed through CLI yet.

Engine runs the loop

The core of Engine is a React-style loop, but Engine itself ** does not execute side effects ** - it is only responsible for decision-making, constraint, recording, and evaluation, while the actual action execution is left to the outside (Agent, platform, or person).

 Xiaoyu records the pending action proposed by the Engine. After external execution, submit the outcome through resume.

Engine only proposes, constrains and records; The real side effects are carried out externally before resume

pending action: Why pause

The pending action is the mechanism by which the Engine returns control to the executor. After Engine proposes an action, the Run state changes to waiting until the result of this action (ActionOutcome) is submitted externally. Why pause: Engine is a deterministic state machine, and it does not do actual work itself (no model adjustment, no code writing). It writes “What to do” into the pending action and persists it to the disk. After the external execution is completed, the result is submitted through resume. This also makes the Run ** cross-process recoverable ** — pending action on the disk, and the new process can continue by reading it. The action id is deterministic: the first 16 digits of sha256(runId:iteration:stepId).

”Run Lifecycle”

run: Start

  1. Reject the adaptive package (currently).
  2. Reject existing runs (in change mode, there can only be one Run per directory).
  3. ** Create an immutable snapshot ** - Freeze the entire Skill package to .comet/skill-snapshots/<hash>/ and hash lock it to Run’s skillHash.
  4. Initialize the Run state: currentStep = entry, status = running.
  5. Record the run_started trajectory event.
  6. decide parses entry step, constructs the first action, passes guardrails, writes pending action, status = waiting.

resume: Submit results or resume

With outcome (actual progress) :
  1. Verify that the submitted outcome corresponds to the current pending action id.
  2. Merge the artifacts of outcome into the artifacts store.
  3. Record the action_completed trajectory event.
  4. recordOutcome: Clear pending, add retry if fails, and advance currentStep if successful.
  5. Run step-scope evals.
  6. If next is empty, status = completed, run completion-scope evals.
  7. Otherwise, decide proposes the next move again.
Without outcome (view/redecide)
  • Return the current pending action (if it exists).
  • Or re-propose the next action when there is no pending status.

eval: Check on demand

comet skill check re-runs evals on the persistent Run state and artifacts as needed, and outputs PASS/FAIL item by item:

Immutable snapshot

Each time Run starts, the Engine freezes the Skill package into an immutable snapshot.

How is hash calculated?

Create a stable JSON for { definition, guardrails, evals } (with keys sorted alphabetically), add SKILL.md and the { path, sha256 } of each script tool source, and finally calculate a SHA-256.

Why is it important

  • ** The Run is locked to the Skill version at startup ** — Modifying skill.yaml afterwards does not affect the ongoing Run. When restoring, reload from the snapshot instead of reading the latest files in the workspace.
  • ** Tamper-proof ** - When reloading a snapshot, the hash will be recalculated to verify integrity.
  • ** Reproducibility ** - The same snapshot + the same outcome sequence generates the same Run trajectory.

Upgrade the running Skill

The only legal way to modify a running Skill version is to explicitly upgrade (--upgrade) :
Upgrades are strictly guarded: there cannot be pending actions, Skill names must match, orchestration patterns must match, and the current step must still exist in the new version. After the upgrade, record the state_migrated event.

guardrails

guardrails restricts what actions the Engine can perform, with guardrails.yaml overriding the default values.

Default value

When guardrails.yaml does not exist, by default: allow list = definition for all skills/agents/tools declared, maxIterations = 50, maxRetriesPerAction = 3, confirmationRequiredFor = all tools marked with requiresConfirmation: true.

Constraint check

Each action should go through checkAction before being proposed:
Dynamic re-planning of cannot relax guardrails. The allow list and budget are fixed by the Skill, and the runtime Agent cannot expand them at runtime. This is the core of Engine security - Skill defines the boundaries, and the executor can only act within the boundaries.

Example

runtime checks

runtime checks is when the Engine checks whether the Run meets the conditions during runtime, which is different from eval (comet eval) during the creation period.

Two types of inspections

Three scopes

Example

This eval checks status === completed when the Run is completed.
comet skill check only checks the completion degree of a certain Engine Run and is not a general Skill assessment. Evaluate a Skill Can the product capabilities be released? Use comet eval. For more details, see Runtime check。

Product authoring lanes

/comet-any classifies and assemps Skill packages through authoring lanes. Each channel is responsible for one type of product, has its own author (deterministic-adapter or subagent), and completes the rendering in sequence. The output of each channel will carry protocolHash, which must be equal to workflowProtocolHash(workflow); otherwise, Factory authoring protocol hash drift will be thrown.

Review access control

After the generation is completed, reviewFactoryArtifactProposals is a mandatory review access control. It will check:
  • Whether all the necessary channels are complete (workflow-entry/skill-core/script-contract/reference/skill-review, and eval when Engine is enabled).
  • Whether the necessary artifacts exist (SKILL.md, reference/workflow-protocol.json, decision-points.md, recovery.md, composition-report.md, resolved-skills.json, skill-review.md, six control plane scripts, etc.).
  • ** Must claim** Whether it exists and the referenced artifact exists (workflow-entry, script:workflow-state, etc.).
  • The product is consistent with the Workflow Contract (nodes, Output Schema, Required Skill Call match).
If the review is not passed (passed === false), generateFactorySkillPackage will throw Generated Skill package failed authoring review and ** no documents will be written **.
This channel design is intended to enable the platform to generate artifacts in parallel using native subagents (each subagent only reads its own) brief. When the platform does not support subagent, the same brief It will run inline as a safety net. For daily use, there is no need to worry about these. Just understand that “every product has an author and a reviewer”.

Run state store

Run state is machine-owned and should not be edited manually.

Two storage locations

The run-state.json field

Five supplementary documents

All file I/O operations are sandboxed within the “change/run” directory, and absolute paths, ~, drive letters, and .. path traversals are rejected. The write is atomic (write to tmp and then rename).

The relationship between classic workflows and engines

The classic five-stage workflow of /comet-classic is driven by the Engine at the bottom layer, but users do not need to directly operate the Engine.

The boundary between comet.yaml and run-state.json

  • .comet.yaml saves workflow projections that users can understand (phase, build_mode, verify_result, etc.) and only links to Engine Run via run_id.
  • The complete Run details (currentStep, pending, trajectory, artifacts) are in .comet/run-state.json and not written into .comet.yaml.
  • When entering a change for the first time, ensureClassicRun deduces the current step from the classic field of .comet.yaml, creates a snapshot and Run state, and establishes the run_id link.
The ComET-Classic definition within the Engine is a deterministic Skill with 28 steps to cover Three profiles: full, hotfix, and tweak. Users can enter through the permanent entry /comet-classic (or driven by project configuration) Enter (/comet alias forwarding) without directly operating these internal YAMLs; The Engine loads and runs them at the bottom layer.

The packaging method of the Classic control package

comet-classic is packaged as an “internal control package” in pure YAML form under comet/runtime/classic/ and contains three files: The Engine definition here is not the top-level comet-classic/ entry directory that the user calls. The internal installation products are these three YAMLs, registered by internalSkills of assets/manifest.json and loaded by Engine. The top-level /comet-classic is only responsible for stabilizing the entry point and workflow orchestration.

When to use /comet-any

If you want to turn a workflow into a team reusable Skill, don’t start with a handwritten Engine file. Use /comet-any to make it read real skills, generate structured evidence, evaluate and enter the release access control. The normal user path is:
For more details, please refer to Quick Start with Combining Any Skill

Common commands

Complete options see comet skill.

Next step

  • Workflow Concept ](/en/concepts/workflow) - /comet-classic How to use Engine at the bottom layer
  • comet skill - Complete Command Reference
  • Runtime check - The difference between comet skill check and comet eval
  • Overview of Skill Creator - Creating Engine-enabled Skill with /comet-any
Last modified on September 4, 2026