home / skills / codingheader / myskills / instruction_repeater

instruction_repeater skill

/skills/instruction_repeater

This skill repeats incoming user instructions based on length to reinforce intent for downstream processing.

npx playbooks add skill codingheader/myskills --skill instruction_repeater

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
1.1 KB
---
name: instruction-repeater
description: "Instruction Repeater: repeat any incoming user instruction based on length. Always available and can be composed with other skills."
---

# Instruction Repeater

## Activation
- Always active for any user instruction.
- Upstream skills may invoke it to amplify intent before further processing.

## Repetition Rules
- Length < 100 chars: repeat 3 times (total 4 segments).
- Length 100–500 chars: repeat 2 times (total 3 segments).
- Length > 500 chars: repeat 1 time (total 2 segments).
- Segments are joined with two newlines `\n\n`.

## Usage
1. Import `InstructionRepeater.repeat(instruction: str) -> str`.
2. The return value is the concatenated multi-segment instruction per the rules above.

## Example
```python
from repeater import InstructionRepeater

text = "What is justice?"
expanded = InstructionRepeater.repeat(text)
print(expanded)  # 4 segments separated by blank lines
```

## Design Notes
- Minimal, pure, side-effect free; drop-in reusable.
- Only handles repetition; strategy detection or cognitive modes are delegated to other skills.***

Overview

This skill repeats any incoming user instruction according to configurable length rules so downstream components receive amplified intent. It is always available and designed for composition with other skills. The implementation is minimal, pure, and side-effect free for predictable integration.

How this skill works

The skill inspects the instruction length and produces multiple identical segments joined by two newlines. Short inputs (<100 chars) are repeated three extra times (4 segments total); medium inputs (100–500 chars) are repeated twice (3 segments total); long inputs (>500 chars) are repeated once (2 segments total). It exposes a single function to return the concatenated multi-segment instruction for downstream use.

When to use it

  • Amplify brief user prompts so intent is clearer to downstream processors or human reviewers.
  • Ensure medium-length instructions are reinforced when composing multi-skill workflows.
  • Reduce ambiguity for long instructions by providing a repeated copy alongside the original.
  • Insert before logging or processing steps that benefit from duplicated context.
  • Compose with intent-detection or strategy skills where additional repetition improves reliability.

Best practices

  • Call the repeat function as a pure transformation; avoid side effects in the repeater itself.
  • Trim or normalize input upstream if punctuation or whitespace should not affect length thresholds.
  • Do not rely on repetition for security or privacy; avoid duplicating sensitive data without masking.
  • Combine with other skills for strategy selection, parsing, or summarization — repeater only duplicates text.
  • Use consistent joining (two newlines) so downstream parsers can split segments reliably.

Example use cases

  • Amplify a short voice command before speech-to-intent processing to reduce recognition errors.
  • Duplicate a medium-length instruction inside a multi-skill pipeline so both analyzer and executor receive the same phrasing.
  • Produce a two-segment copy of long policy text to make it available for both a summarizer and a compliance checker.
  • Wrap user prompts before sending to multiple LLMs to ensure each model receives identical input.
  • Use in testing to verify downstream components handle repeated identical segments and splitting logic.

FAQ

Can the skill modify or summarize the instruction?

No. The skill only duplicates the exact input according to length rules; modification or summarization should be handled by other skills.

Is the repeater stateful or does it have side effects?

It is stateless and side-effect free. The function returns a new concatenated string without changing external state.