Skip to content

feat(skill-writer): skill-writer test --skill injection #30

@pixelastic

Description

@pixelastic

Parent

#28

What to build

Add `--skill ` flag to `skill-writer test`.

When `--skill` is provided, the prompt passed to claude must be built as:

```
@/absolute/path/to/SKILL.md

\`\`\`

The `@filepath` syntax is processed by the claude CLI and injects the file content into the message. This was validated: it works correctly in `--print` mode.

Acceptance criteria

  • `skill-writer test --scope foo --skill /path/to/SKILL.md "do something"` builds the prompt with `@/path/to/SKILL.md` on the first line followed by a blank line and the original prompt
  • The path passed to `@` is the absolute path of the skill file
  • Omitting `--skill` leaves the prompt unchanged
  • Non-existent skill path produces a clear error on stderr and exits non-zero

Tests

Add cases to `config/ai/claude/claudecode/skills/skill-writer/tests/skill-writer.bats` covering all acceptance criteria above. The mock `claude` should save its last argument (the prompt) to a temp file so tests can inspect what was actually passed.

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentReady to be picked up by an agent

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions