with one click
prompt
Prompt engineering conventions for x-cmd — reuse via template variables, structure rules, safety enforcement patterns.
Menu
Prompt engineering conventions for x-cmd — reuse via template variables, structure rules, safety enforcement patterns.
Browser automation via Chrome/Chromium CDP — open, snapshot, click, screenshot. For testing web apps, mobile layouts, and automated interactions without Playwright/Puppeteer.
Lovable MCP tool usage — deploy projects, message agent, test with agent-browser. Minimize credits by delegating to local repo.
Typed knowledge graph via TSV append-only log — entity CRUD, directed relations, schema validation, multi-hop reasoning. CLI via `x ondb`, protocol readable by AWK/Python/JS/SQLite.
Root index of x-cmd skill0 sub-skills. Defines the OKR-style agent workflow (goal → rule-verified results → execute), skill discovery, and agent tooling preferences. Style: principle-first, concise, delegate specifics to authoritative external sources.
Writing conventions for skill0 documents — pyramid structure, line limits, and layout rules.
Multi-phase project assessment with scoring. Triggered by "/assess" to evaluate project health across dimensions and generate a comprehensive report.
| name | prompt |
| description | Prompt engineering conventions for x-cmd — reuse via template variables, structure rules, safety enforcement patterns. |
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