name: marshail-promote-assets
description: Copies MARSHAIL durable assets — both built-in lifecycle assets under .marshail/{skills,skills-fallback,agents,rules}/ and repo-specific extensions under .marshail/extensions/{skills,agents,rules}/ — into the project's config-sync source tree (default .agent-config/, overridable via sync.agent_config_dir), so the next agent-conf-sync run fans them out to all tool layouts. Names are preserved as-is: built-ins keep their marshail- prefix, extensions keep their mx- prefix. Use when the user asks to "promote MARSHAIL skills/agents/rules", "promote MARSHAIL extensions", "copy from .marshail to .agent-config", "wire MARSHAIL assets into the sync source", or similar — and from marshail-init for first-time setup.
marshail-promote-assets
MARSHAIL stores its durable assets under .marshail/ in two trees:
- Built-in lifecycle assets — shipped with MARSHAIL itself, under
.marshail/{skills,skills-fallback,agents,rules}/.
Names use the marshail- prefix and keep it when promoted.
- Repo-specific extensions — generated by
marshail-learner at the Learn stage (or hand-authored), under .marshail/extensions/{skills,agents,rules}/.
Names use the mx- prefix at creation time and keep it when promoted.
To make either set available to all AI assistants (Cursor, Claude, Copilot, VS Code, Junie, …), they must be copied into the config-sync source tree (default .agent-config/, overridable via sync.agent_config_dir in config.yml) consumed by .cyncia, and then synced.
This skill performs the copy step only.
Run agent-conf-sync (the cyncia sync skill) afterwards to fan the result out to tool-specific layouts.
When to apply
Trigger phrases:
- "promote MARSHAIL skills / agents / rules"
- "promote MARSHAIL extensions"
- "copy MARSHAIL assets into .agent-config"
- "wire
.marshail/ into the sync source"
- "ship the new learner-generated rules / skills"
- "sync MARSHAIL assets to tools" (do this skill, then
agent-conf-sync)
Also called from marshail-init for the first-time copy after .marshail/ and .agent-config/ are scaffolded.
Do not apply when the user is editing source files in .marshail/ or asking about MARSHAIL stages — that is normal MARSHAIL work.
Inputs
- MARSHAIL source dir (default:
.marshail/ at the repo root; the current repo's AGENTS.md may pin a different path).
Otherwise: ask the user.
- Config-sync source dir (default:
sync.agent_config_dir from config.yml, which itself defaults to .agent-config/).
The user may keep their config-sync source under a different name/path; honor sync.agent_config_dir when set.
Otherwise: ask.
- Optional explicit overrides from the user prompt (
from <path>, into <path>).
- Optional scope flag:
built-ins-only | extensions-only |
all (default).
Source trees walked
This skill walks two source trees inside the MARSHAIL source dir:
- Built-ins (
marshail- prefix):
<marshail_src>/skills/<name>/
<marshail_src>/skills-fallback/<name>/
<marshail_src>/agents/<name>.md
<marshail_src>/rules/<name>.md
- Extensions (
mx- prefix, applied at creation):
<marshail_src>/extensions/skills/mx-<name>/
<marshail_src>/extensions/agents/mx-<name>.md
<marshail_src>/extensions/rules/mx-<name>.md
Extensions does not include a skills-fallback/ subfolder.
If a learner-generated skill needs an inline workflow for tools without subagent support, it ships as a single mx-<name>/SKILL.md with the inline content; there is no parallel fallback tree.
Workflow
-
Resolve paths.
Determine MARSHAIL source dir and config-sync source dir as described above (honor sync.agent_config_dir).
Use absolute paths.
-
Sanity-check.
Confirm the MARSHAIL source dir exists and contains at least one of skills/, skills-fallback/, agents/, rules/, or extensions/.
Confirm the config-sync source dir exists and contains AGENTS.md.
-
Plan copies.
For each source tree (built-ins, extensions) and each asset folder that exists, copy contents into the matching folder under the config-sync source dir, creating the target folder if missing.
Names are preserved as-is — no prefixing or renaming happens at copy time.
Built-ins stay marshail-*; extensions stay mx-*.
Mappings (built-ins, names kept):
<marshail_src>/skills/<name>/ → <agent_config>/skills/<name>/ (preserve the inner SKILL.md plus any extra files in the same folder)
<marshail_src>/skills-fallback/<name>/ → <agent_config>/skills/<name>/ only when the host environment lacks subagent support — see step 3a below.
Otherwise skip the fallback tree.
<marshail_src>/agents/<name>.md → <agent_config>/agents/<name>.md
<marshail_src>/rules/<name>.md → <agent_config>/rules/<name>.md
Mappings (extensions, names kept):
<marshail_src>/extensions/skills/mx-<name>/ → <agent_config>/skills/mx-<name>/
<marshail_src>/extensions/agents/mx-<name>.md → <agent_config>/agents/mx-<name>.md
<marshail_src>/extensions/rules/mx-<name>.md → <agent_config>/rules/mx-<name>.md
3a.
Pick skills/ vs skills-fallback/ per target tool.
MARSHAIL ships two parallel built-in skill flavors:
skills/marshail-delegate-to-* — thin wrappers that delegate to the matching subagent in fresh context.
Promoted by default (the subagent-capable flavor).
skills-fallback/marshail-* — full inline workflows for layouts that do not support custom subagents.
Used as the fallback flavor.
Which flavor is promoted is controlled by sync.skill_flavor in config.yml (default delegate; set to fallback to promote the inline skills instead).
Both folders intentionally hold sibling names; promote at most one flavor per name to avoid conflicts.
Extensions have no fallback flavor — copy them as-is regardless.
4. Show the plan: list the source files / folders and their destinations (built-ins as marshail-*, extensions as mx-*), then ask for approval before copying.
Skip the prompt if the user explicitly said "go ahead", "just do it", or similar.
5. Copy.
Use cp -R (Unix) or Copy-Item -Recurse -Force (PowerShell).
Overwrite existing files in the config-sync source — that directory is the sync source, not authored content.
6. Skip MARSHAIL housekeeping files.
Do not copy the MARSHAIL source dir's own AGENTS.md, ENTRYPOINT.md, LICENSE, config.yml, agent-tools.yml, agent-models.yml, references/, knowledge/, or any README.md (including extensions/README.md).
Only the asset folders.
7. Filter by scope or glob (optional).
If the user named specific items ("just marshail-plan", "just the new extensions") or passed a scope flag (built-ins-only, extensions-only), narrow the copy plan accordingly.
8. Merge per-agent tool grants.
Read agent-tools.yml.
For each promoted agent whose canonical name (marshail-<name> for built-ins, mx-<name> for extensions) appears under agents:, union the listed tools into the agent file's declared tools (de-duplicate; never drop the agent's baseline tools).
Agents not listed there are copied unchanged.
9. Apply per-agent model assignments.
Read agent-models.yml.
For each promoted agent whose canonical name appears under agents:, set the listed model as the model: frontmatter key on the promoted copy (add it, or replace an existing value).
Agents not listed keep no model: key and run on the host tool's default model.
10. Suggest follow-up.
End by suggesting the user run agent-conf-sync (the cyncia sync skill) to propagate the copied assets into tool layouts.
Outputs
- Files added or overwritten under
<agent_config>/{skills,agents,rules}/.
- A short summary listing the copied paths, grouped by source (built-ins / extensions).
Edge cases
- Conflicting names.
If a non-MARSHAIL skill/agent/rule with the same name exists in the config-sync source, surface the conflict and ask before overwriting.
- Out-of-tree MARSHAIL. If the MARSHAIL dir is not at the repo root (rare), the user must specify the path explicitly.
- Empty source.
If none of
skills/, skills-fallback/, agents/, rules/, extensions/ exist in the MARSHAIL source, exit with a note instead of copying.
- Misnamed assets.
If a built-in is missing its
marshail- prefix, or an extension under extensions/ is missing its mx- prefix, surface it and ask — do not silently rename the source.
- Dry-run flag.
If the user says "preview", "dry run", or similar, print the copy plan without executing.
Pairing
This skill is half of a two-step flow:
marshail-promote-assets — copy .marshail/ assets (built-ins + extensions) into the config-sync source (this skill).
agent-conf-sync — the cyncia sync skill; fans the config-sync source out to all tool layouts.
When the user asks to "promote MARSHAIL assets to all tools", run both in order.