home / skills / bdambrosio / cognitive_workbench / mc-attack
This skill lets you perform left-click style actions to attack entities or break blocks, returning success or failure.
npx playbooks add skill bdambrosio/cognitive_workbench --skill mc-attackReview the files below or copy the command above to add this skill to your agents.
---
name: mc-attack
type: python
description: "Left-click style interaction (entities or blocks). Returns success/failure"
---
# Minecraft Attack Tool
Left-click style interaction for attacking entities or breaking blocks. Returns success/failure status.
## Purpose
Combat and block breaking. Can target entities (mobs, players) or blocks depending on target specification.
## Input
- `target`: Dict with either:
- `entity_id`: String (for entity attack)
- `dx`, `dy`, `dz`: Floats (for block attack, world-relative offsets from agent)
- See coordinate system documentation in jill-minecraft.yaml for details
- Exactly one targeting mode must be specified
- `value`: Ignored
## Output
Returns uniform_return format with:
- `value`: Text summary (success/failure message)
- `data`: Structured data dict (machine-readable). Key fields:
- `success`: Boolean
## Behavior & Performance
- Entity attack: Targets specific entity by ID
- Block attack: Targets block at specified position
- Requires appropriate tool for efficient block breaking
## Guidelines
- Use entity_id for attacking mobs or players
- Use world-relative coordinates `dx, dy, dz` for block attacks (see coordinate system in jill-minecraft.yaml)
- Tool efficiency matters for block breaking (use appropriate tool)
- Multiple attacks may be needed to break blocks or defeat entities
## Usage Examples
Attack block directly south:
```json
{"type":"mc-attack","target":{"dx":0,"dy":0,"dz":1},"out":"$attack"}
```
Attack entity:
```json
{"type":"mc-attack","target":{"entity_id":"zombie_123"},"out":"$attack"}
```
This skill performs a left-click style interaction in Minecraft to attack entities or strike/break blocks. It returns a uniform success/failure result with a human-readable message and machine-readable data indicating whether the interaction succeeded.
You specify a single target mode: either an entity_id to attack a mob/player or world-relative coordinates (dx, dy, dz) to hit a block. The skill executes a left-click interaction at the target and returns a structured result with a boolean success flag and a short text summary. Block breaking speed depends on tool appropriateness and may require repeated attacks.
What input fields are required?
Provide exactly one targeting mode: either entity_id for entities or dx, dy, dz for block positions. The value field is ignored.
How do I know if the attack worked?
The skill returns a uniform result where data.success is true on success and false on failure, plus a short text summary in value.