Guidance for writing or refactoring agents and skills using structured task patterns. Use when creating new agents or skills, or refactoring existing ones.
Patterns and best practices for writing or refactoring agents and skills using structured task tracking.
When an agent or skill has multiple steps, define them in a structured table using TaskCreate fields:
| Column | Description | Required | |--------|-------------|----------| | Subject | Brief task title (imperative form) | Yes | | Description | Complete instructions to execute the task | Yes | | Active Form | Present continuous form for spinner display | Yes | | Blocked By | Tasks that must complete first | No | | Blocks | Tasks waiting on this one | No |
| Subject | Description | Active Form | Blocked By | Blocks |
|---------|-------------|-------------|------------|--------|
| Read config | Read `config.json` from project root using the Read tool. Expected structure: `{ "name": string, "version": string, "targets": string[] }`. If file doesn't exist, report error and stop. | Reading config | - | Validate config |
| Validate config | Check that all required fields exist: (1) `name` must be non-empty string, (2) `version` must match semver format `X.Y.Z`, (3) `targets` must be non-empty array. Report all validation errors before stopping. | Validating config | Read config | Apply changes |
| Apply changes | For each path in `targets` array: read the file, replace `{{NAME}}` with config name and `{{VERSION}}` with config version, write the file back. Log each file updated. | Applying changes | Validate config | - |
The description column must be self-contained with ALL information needed to execute the task:
Never reduce or summarize existing content when converting to task table format. If the original documentation had examples, include them. If it had explanations, keep them.
References to external files (other documents in the repo) are acceptable, but never reference sections within the same file.
Design dependencies to maximize parallel execution where possible:
┌─────────┐ ┌─────────┐ ┌─────────┐
│ Task A │ │ Task B │ │ Task C │ ← Wave 1 (parallel)
└────┬────┘ └────┬────┘ └────┬────┘
│ └─────┬──────┘
│ │
▼ ▼
┌─────────┐ ┌─────────┐
│ Task D │ │ Task E │ ← Wave 2 (parallel)
└────┬────┘ └────┬────┘
└────────┬────────┘
│
▼
┌─────────┐
│ Task F │ ← Wave 3
└─────────┘
[see X](#section) within same file)Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer