Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Prompt engineering conventions for x-cmd — reuse via template variables, structure rules, safety enforcement patterns.
.claude/skills/x-cmd-prompt/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 14% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 96% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 15% | 0% |
| case-07 | ✗→✓ | ▲ Improved | -12% | 0% |
| case-08 | ✗→✓ | ▲ Improved | -40% | 0% |
Prompts in x-cmd are assembled from reusable fragments, not written as monoliths. A prompt template contains <PLACEHOLDER> variables that are resolved at runtime by the shell module.
Example from claw:
first_contact.md # standalone — loaded into <FIRST_CONTACT_PROMPT>
msg_telegram.md # assembles: <FIRST_CONTACT_PROMPT> + <CHECK_PROMPT> + <MSG>
msg_feishu.md # same fragments, different platform adapter
heartbeat.md # different workflow, shares <CHECK_PROMPT>Why: one fix propagates everywhere. Platform adapters (Telegram, Feishu, WeChat) share behavioral rules but differ in send commands and formatting limits.
See reusing.md for detailed reuse patterns.
<UPPER_CASE> placeholders for variables — never inline real dataSafety and behavioral rules MUST be explicit and forceful:
=== UNBREAKABLE RULES ===
>> RULE 1: Your stdout is INVISIBLE. Every reply MUST use send command. <<
>> RULE 2: Reply FIRST, think SECOND. For non-trivial tasks, send ack immediately. <<
>> RULE 3: Complex/long tasks → use `x agent run`. DO NOT block user. <<Use MUST, NEVER, DO NOT. See skill0-writer for the security language rule.
When prompts target multiple platforms with different formatting capabilities:
FORMAT GUIDE:
- WeChat / Enterprise WeChat: Limited formatting. Plain text, lists, emoji. No tables.
- Telegram: Full markdown including tables. Max 4096 chars.
- Feishu: Full markdown. Card messages need JSON.Prompt fragments currently live in each module's lib/data/prompt/ (e.g., claw/lib/data/prompt/). They will migrate to skill0/lib/skill0/<subskill>/ — same structure, canonical location.
Current examples in claw/lib/data/prompt/:
first_contact.md — new workspace greeting, reusable fragmentheartbeat.md — background agent, reads workspace statemsg_<platform>.md — per-platform message handlers, share common fragments| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-17 | pass→pass | 20,693 | 6,423 | -69% | 1 | 1 | 0% | 2,455 | 1,505 | -39% | 0 | 0 | — |
case-01 | fail→pass | 23,813 | 21,653 | -9% | 1 | 1 | 0% | 3,058 | 3,492 | +14% | 0 | 0 | — |
case-02 | fail→pass | 37,703 | 11,091 | -71% | 1 | 1 | 0% | 1,144 | 2,244 | +96% | 0 | 0 | — |
case-03 | fail→pass | 20,653 | 14,822 | -28% | 1 | 1 | 0% | 2,565 | 2,953 | +15% | 0 | 0 | — |
case-04 | fail→fail | 18,686 | 16,194 | -13% | 1 | 1 | 0% | 2,087 | 2,310 | +11% | 0 | 0 | — |
case-05 | pass→pass | 21,313 | 12,704 | -40% | 1 | 1 | 0% | 2,767 | 2,801 | +1% | 0 | 0 | — |
case-06 | pass→fail | 25,266 | 27,624 | +9% | 1 | 1 | 0% | 2,949 | 3,892 | +32% | 0 | 0 | — |
case-07 | fail→pass | 17,066 | 10,604 | -38% | 1 | 1 | 0% | 2,473 | 2,183 | -12% | 0 | 0 | — |
case-08 | fail→pass | 19,628 | 10,300 | -48% | 1 | 1 | 0% | 2,223 | 1,325 | -40% | 0 | 0 | — |
case-09 | fail→pass | 13,480 | 11,158 | -17% | 1 | 1 | 0% | 1,918 | 1,452 | -24% | 0 | 0 | — |
case-10 | pass→pass | 14,286 | 14,199 | -1% | 1 | 1 | 0% | 1,839 | 2,110 | +15% | 0 | 0 | — |
case-11 | fail→pass | 22,377 | 12,922 | -42% | 1 | 1 | 0% | 2,415 | 1,693 | -30% | 0 | 0 | — |
case-12 | fail→pass | 17,569 | 6,529 | -63% | 1 | 1 | 0% | 1,908 | 1,430 | -25% | 0 | 0 | — |
case-13 | fail→pass | 12,132 | 9,632 | -21% | 1 | 1 | 0% | 1,723 | 1,244 | -28% | 0 | 0 | — |
case-14 | fail→pass | 15,928 | 7,740 | -51% | 1 | 1 | 0% | 1,553 | 1,651 | +6% | 0 | 0 | — |
case-15 | fail→pass | 12,059 | 8,280 | -31% | 1 | 1 | 0% | 918 | 1,003 | +9% | 0 | 0 | — |
case-16 | fail→pass | 9,902 | 2,664 | -73% | 1 | 1 | 0% | 1,466 | 932 | -36% | 0 | 0 | — |
case-18 | fail→pass | 26,700 | 18,353 | -31% | 1 | 1 | 0% | 3,247 | 2,541 | -22% | 0 | 0 | — |
case-19 | pass→pass | 25,163 | 18,134 | -28% | 1 | 1 | 0% | 2,984 | 2,854 | -4% | 0 | 0 | — |
case-20 | pass→pass | 20,813 | 13,588 | -35% | 1 | 1 | 0% | 2,208 | 1,635 | -26% | 0 | 0 | — |
case-21 | fail→pass | 16,450 | 9,368 | -43% | 1 | 1 | 0% | 1,740 | 1,310 | -25% | 0 | 0 | — |
case-22 | fail→pass | 11,778 | 3,186 | -73% | 1 | 1 | 0% | 891 | 1,062 | +19% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 21 counted toward the lift figure. The other 1 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +64 percentage points is the difference between those two pass rates over the 21 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.