|
| 1 | +{# |
| 2 | +Template: skill-job-meta.md.jinja |
| 3 | +Purpose: Generates the job overview skill file for Claude Code |
| 4 | +
|
| 5 | +Template Variables: |
| 6 | + - job_name: string - Job identifier (e.g., "competitive_research") |
| 7 | + - job_summary: string - Short one-line summary of the job |
| 8 | + - job_description: string|null - Full description (optional) |
| 9 | + - total_steps: int - Number of steps in the job |
| 10 | + - steps: list - Array of step objects: |
| 11 | + - id: string - Step identifier |
| 12 | + - name: string - Human-readable step name |
| 13 | + - description: string - What the step does |
| 14 | + - command_name: string - Slash command (e.g., "job_name.step_id") |
| 15 | + - dependencies: list[string]|null - Required prior steps |
| 16 | +#} |
1 | 17 | --- |
2 | | -description: {{ job_summary }} |
| 18 | +description: "{{ job_summary }}" |
3 | 19 | --- |
4 | 20 |
|
5 | 21 | # {{ job_name }} |
6 | 22 |
|
7 | | -You are executing the **{{ job_name }}** job. {{ job_summary }} |
| 23 | +**Multi-step workflow**: {{ job_summary }} |
| 24 | + |
| 25 | +> **CRITICAL**: Always invoke steps using the Skill tool. Never copy/paste step instructions directly. |
8 | 26 |
|
9 | 27 | {% if job_description %} |
10 | 28 | {{ job_description }} |
11 | 29 | {% endif %} |
12 | 30 |
|
13 | 31 | ## Available Steps |
14 | 32 |
|
15 | | -This job has {{ total_steps }} step(s): |
16 | | - |
17 | 33 | {% for step in steps %} |
18 | | -### {{ step.id }} |
19 | | -**{{ step.name }}**: {{ step.description }} |
20 | | -- Command: `{{ step.command_name }}` |
21 | | -{% if step.dependencies %} |
22 | | -- Requires: {{ step.dependencies | join(', ') }} |
23 | | -{% endif %} |
24 | | -{% endfor %} |
| 34 | +{{ loop.index }}. **{{ step.id }}** - {{ step.description }}{% if step.dependencies %} (requires: {{ step.dependencies | join(', ') }}){% endif %} |
25 | 35 |
|
26 | | -## Instructions |
| 36 | +{% endfor %} |
27 | 37 |
|
28 | | -This is a **multi-step workflow**. Determine the starting point and run through the steps in sequence. |
| 38 | +## Execution Instructions |
29 | 39 |
|
30 | | -1. **Analyze user intent** from the text that follows `/{{ job_name }}` |
| 40 | +### Step 1: Analyze Intent |
31 | 41 |
|
32 | | -2. **Identify the starting step** based on intent: |
| 42 | +Parse any text following `/{{ job_name }}` to determine user intent: |
33 | 43 | {% for step in steps %} |
34 | | - - {{ step.id }}: {{ step.description }} |
| 44 | +- "{{ step.id }}" or related terms → start at `{{ step.command_name }}` |
35 | 45 | {% endfor %} |
36 | 46 |
|
37 | | -3. **Run the workflow** starting from the identified step: |
38 | | - - Invoke the starting step using the Skill tool |
39 | | - - When that step completes, **automatically continue** to the next step in the workflow |
40 | | - - Continue until the workflow is complete or the user intervenes |
| 47 | +### Step 2: Invoke Starting Step |
| 48 | + |
| 49 | +Use the Skill tool to invoke the identified starting step: |
| 50 | +``` |
| 51 | +Skill tool: {{ steps[0].command_name }} |
| 52 | +``` |
| 53 | + |
| 54 | +### Step 3: Continue Workflow Automatically |
| 55 | + |
| 56 | +After each step completes: |
| 57 | +1. Check if there's a next step in the sequence |
| 58 | +2. Invoke the next step using the Skill tool |
| 59 | +3. Repeat until workflow is complete or user intervenes |
41 | 60 |
|
42 | | -4. **If intent is ambiguous**, ask the user which step to start from: |
43 | | - - Present the available steps as numbered options |
44 | | - - Use AskUserQuestion to let them choose |
| 61 | +### Handling Ambiguous Intent |
45 | 62 |
|
46 | | -**Critical**: |
47 | | -- You MUST invoke each step using the Skill tool. Do not copy/paste step instructions. |
48 | | -- After each step completes, check if there's a next step and invoke it automatically. |
49 | | -- The workflow continues until all dependent steps are complete. |
| 63 | +If user intent is unclear, use AskUserQuestion to clarify: |
| 64 | +- Present available steps as numbered options |
| 65 | +- Let user select the starting point |
50 | 66 |
|
51 | 67 | ## Context Files |
52 | 68 |
|
|
0 commit comments