mirror of
https://github.com/ulpi-io/skills.git
synced 2026-09-19 03:35:17 +08:00
hand-over-to-kiro v1.2.0 + kiro-review v2.2.0 — reference kiro's installed skills
Kiro has a native skills feature (default agent auto-discovers .kiro/skills/ and ~/.kiro/skills/) but NO Skill tool and no --trust-tools token for it; skill bodies load on demand, so a one-shot --no-interactive run can't rely on auto-activation (confirmed against kiro.dev + AWS Amazon Q docs). The handoff never told kiro to use the relevant skill, so kiro built without the stack conventions. Fix (deterministic, no new tool/trust): the prompt-builder INLINES the relevant .kiro/skills/<name>/SKILL.md into kiro's prompt under a <skill> tag and tells kiro to follow it + fs_read its references/ on demand. - hand-over-to-kiro: new Step 2.5 (reference relevant skills) + <skills> block in both prompt templates + a Skills section in references/kiro-cli.md documenting kiro's mechanism (auto-discovery, resources file://skill://, no Skill tool). - kiro-review: inline a stack/convention skill so kiro reviews against it. - ship-playbook kiro build brief: tell the handoff to inline the task's stackSkill. Documents the native alternative too (--agent with resources:[file://...] preload).
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: hand-over-to-kiro
|
||||
version: 1.1.0
|
||||
version: 1.2.0
|
||||
description: |
|
||||
Delegate an implementation task to the Kiro CLI (`kiro-cli`) and report the result. Use when the user
|
||||
asks to hand work to kiro — "/hand-over-to-kiro", "delegate to kiro", "let kiro handle/do this",
|
||||
@@ -98,6 +98,27 @@ Kiro starts fresh — collect everything it needs:
|
||||
**Success criteria**: Enough context is collected that a fresh agent could implement the task without
|
||||
this conversation.
|
||||
|
||||
## Step 2.5: Reference the relevant skills (so kiro actually uses them)
|
||||
|
||||
Kiro has its own skills under `.kiro/skills/<name>/` (skills.sh installs them there; kiro's DEFAULT
|
||||
agent auto-discovers them). But kiro has **no `Skill` tool** to invoke a skill on command, and in a
|
||||
one-shot `--no-interactive` run auto-activation is unreliable and skill bodies load only on demand. So
|
||||
make it DETERMINISTIC by inlining the skill into the prompt:
|
||||
|
||||
1. Identify the skill(s) the task needs — the task's **stack skill** (a `/nextjs` / `/laravel` / `/rust`
|
||||
reference → the `.kiro/skills/nextjs/` etc. skill) plus any others the task calls for.
|
||||
2. For each, if `.kiro/skills/<name>/SKILL.md` exists, **Read it** and include its body in the prompt
|
||||
under a `<skill name="<name>">…</skill>` tag. Tell kiro to follow it as the domain contract and to
|
||||
`fs_read` its `references/` on demand from `.kiro/skills/<name>/references/` (kiro has `fs_read`).
|
||||
3. If a named skill is NOT installed for kiro, say so in the prompt and have kiro proceed on best
|
||||
practice — never block.
|
||||
|
||||
(See `references/kiro-cli.md` → Skills for kiro's native mechanism and the `--agent` `file://` preload
|
||||
alternative for very large skills.)
|
||||
|
||||
**Success criteria**: every skill the task depends on is either inlined into the prompt or explicitly
|
||||
noted as unavailable.
|
||||
|
||||
## Step 3: Build the prompt (injection-safe)
|
||||
|
||||
Write a clear, self-contained prompt with XML-style boundary tags that separate instructions from
|
||||
@@ -112,6 +133,12 @@ Implement the following plan in the current working directory.
|
||||
{full plan text with numbered steps}
|
||||
</plan>
|
||||
|
||||
<skills>
|
||||
{Inline each relevant `.kiro/skills/<name>/SKILL.md` body here under a `<skill name="...">` tag (Step
|
||||
2.5). Tell kiro to follow them as the domain contract and `fs_read` their `references/` on demand.
|
||||
Omit this block if no relevant skill is installed for kiro.}
|
||||
</skills>
|
||||
|
||||
<key-files>
|
||||
- {path}: {why this file matters}
|
||||
</key-files>
|
||||
@@ -136,6 +163,11 @@ Execute the following task in the current working directory.
|
||||
{user's task — rephrased for clarity, NOT raw user input}
|
||||
</task>
|
||||
|
||||
<skills>
|
||||
{Inline each relevant `.kiro/skills/<name>/SKILL.md` body here under a `<skill name="...">` tag (Step
|
||||
2.5). Tell kiro to follow them and `fs_read` their `references/` on demand. Omit if none installed.}
|
||||
</skills>
|
||||
|
||||
<key-files>
|
||||
- {path}: {why this file matters}
|
||||
</key-files>
|
||||
|
||||
@@ -55,6 +55,27 @@ kiro also reads the prompt from **stdin** when no positional arg is given
|
||||
| `/chat save <path>` | Export conversation to file |
|
||||
| `/chat load <path>` | Import conversation from file |
|
||||
|
||||
## Skills (Agent Skills)
|
||||
|
||||
Kiro discovers `SKILL.md` skills and matches them by description, or exposes them as `/<name>` slash commands.
|
||||
|
||||
- **Locations (auto-discovered by the DEFAULT agent):** `.kiro/skills/<name>/SKILL.md` (workspace) and
|
||||
`~/.kiro/skills/<name>/SKILL.md` (global). skills.sh installs them here (symlinks). No config needed
|
||||
for the default agent.
|
||||
- **No `Skill` tool / no `--trust-tools` token for skills.** A skill is not invoked by a tool call;
|
||||
once loaded it drives the agent's own `fs_read`/`execute_bash`. Trust still governs *those*
|
||||
(`--trust-tools=fs_read,…`). Native tool names: `fs_read`, `fs_write`, `execute_bash`, `use_aws`,
|
||||
`report_issue`, `@<mcp>` (aliases `read`/`write`/`shell`).
|
||||
- **Custom agents do NOT auto-load skills.** A `--agent <name>` only sees skills its config lists under
|
||||
`resources`: `file://<path>` preloads the whole file at startup; `skill://<glob>` loads metadata up
|
||||
front and the body on demand (e.g. `"resources": ["skill://.kiro/skills/*/SKILL.md"]`).
|
||||
- **One-shot `--no-interactive`:** auto-activation/slash-commands are unreliable in a single turn. To
|
||||
make kiro FOLLOW a specific skill deterministically, either (a) **inline the SKILL.md body in the
|
||||
prompt** (what this skill does — see SKILL.md Step 2.5), or (b) run `--agent` with
|
||||
`resources: ["file://.kiro/skills/<name>/SKILL.md"]` preloaded.
|
||||
|
||||
Docs: <https://kiro.dev/docs/cli/skills/> · <https://kiro.dev/docs/cli/custom-agents/configuration-reference/>
|
||||
|
||||
## settings
|
||||
|
||||
Read and write configuration values.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: kiro-review
|
||||
version: 2.1.0
|
||||
version: 2.2.0
|
||||
description: |
|
||||
Run Kiro CLI as an independent reviewer over the current branch, a specific commit, or
|
||||
uncommitted changes. Builds a focused prompt from the real diff and returns a compact review
|
||||
@@ -82,6 +82,9 @@ Create a compact prompt that includes:
|
||||
- any previously fixed issues to exclude on later rounds
|
||||
- an instruction to verify findings against the actual code
|
||||
- the expected compact output format
|
||||
- if a stack/convention skill is installed for kiro (`.kiro/skills/<name>/SKILL.md`), inline its body so
|
||||
kiro reviews against those conventions — kiro has no `Skill` tool to load it itself, and one-shot
|
||||
`--no-interactive` runs can't rely on auto-activation
|
||||
|
||||
Avoid generic prompts. They produce weak results.
|
||||
|
||||
|
||||
@@ -426,7 +426,7 @@ function buildSpawn(t, brief, label) {
|
||||
if (BUILD_HARNESS === 'codex')
|
||||
return spawnSpecialist(`You MAY edit files to implement this task.\n${brief}`, { label, phase: 'Build', schema: TASK_RESULT, agentType: 'codex:codex-rescue', isolation: 'worktree' })
|
||||
if (BUILD_HARNESS === 'kiro')
|
||||
return spawnSpecialist(`Use the hand-over-to-kiro skill (\`/hand-over-to-kiro\`) to delegate implementing this task to kiro-cli — it writes an injection-safe prompt to a file and launches kiro via its helper in this worktree, then verifies the diff. This is UNATTENDED: use the skill's \`implement\` mode (scoped write trust \`fs_read,fs_write,execute_bash\`) — do NOT use \`--trust-all-tools\` (unsafe-by-default; the harness blocks it). If the hand-over-to-kiro skill or kiro-cli is unavailable, say so and implement the task yourself.\n${brief}`, { label, phase: 'Build', schema: TASK_RESULT, agentType: 'general-purpose', isolation: 'worktree' })
|
||||
return spawnSpecialist(`Use the hand-over-to-kiro skill (\`/hand-over-to-kiro\`) to delegate implementing this task to kiro-cli — it writes an injection-safe prompt to a file and launches kiro via its helper in this worktree, then verifies the diff. This is UNATTENDED: use the skill's \`implement\` mode (scoped write trust \`fs_read,fs_write,execute_bash\`) — do NOT use \`--trust-all-tools\` (unsafe-by-default; the harness blocks it). ${t.stackSkill ? `Have kiro FOLLOW the ${t.stackSkill} skill — kiro has no Skill tool, so the hand-over skill INLINES the matching \`.kiro/skills/<name>/SKILL.md\` into kiro's prompt (per its Step 2.5). ` : ''}If the hand-over-to-kiro skill or kiro-cli is unavailable, say so and implement the task yourself.\n${brief}`, { label, phase: 'Build', schema: TASK_RESULT, agentType: 'general-purpose', isolation: 'worktree' })
|
||||
return spawnSpecialist(brief, { label, phase: 'Build', schema: TASK_RESULT, agentType: resolveAgent(t.agent), isolation: 'worktree' })
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user