> ## Documentation Index
> Fetch the complete documentation index at: https://docs.innate.bot/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

export const SkillResultsTable = () => {
  const rows = [{
    status: "SUCCESS",
    meaning: "Skill completed its task."
  }, {
    status: "FAILURE",
    meaning: "Something went wrong."
  }, {
    status: "CANCELLED",
    meaning: "Skill was interrupted via cancel()."
  }];
  return <div className="interface-methods-table-wrap">
      <table className="interface-methods-table">
        <thead>
          <tr>
            <th>Status</th>
            <th>Meaning</th>
          </tr>
        </thead>
        <tbody>
          {rows.map(row => <tr key={row.status}>
              <td>
                <span className="interface-param-badge">{row.status}</span>
              </td>
              <td>{row.meaning}</td>
            </tr>)}
        </tbody>
      </table>
    </div>;
};

export const SkillCoreMethodsTable = () => {
  const rows = [{
    method: "name",
    purpose: "Unique identifier the agent uses to call this skill."
  }, {
    method: "guidelines()",
    purpose: "Natural language instructions for when and how to use the skill."
  }, {
    method: "execute()",
    purpose: "The actual behavior. The signature defines the skill parameters."
  }, {
    method: "cancel()",
    purpose: "Clean shutdown when the user or agent interrupts."
  }];
  return <div className="interface-methods-table-wrap">
      <table className="interface-methods-table">
        <thead>
          <tr>
            <th>Method</th>
            <th>Purpose</th>
          </tr>
        </thead>
        <tbody>
          {rows.map(row => <tr key={row.method}>
              <td>
                <span className="interface-method-pill">{row.method}</span>
              </td>
              <td>{row.purpose}</td>
            </tr>)}
        </tbody>
      </table>
    </div>;
};

Code-defined skills are Python classes that implement robot behaviors with explicit logic. Three things make them easy to write:

**The agent reads your code.** Your `execute()` signature and docstring are the API contract — the AI sees `execute(target: str, speed: float = 0.5)` plus the docstring and knows exactly how to call your skill. Type hints matter.

```python theme={null}
def execute(self, target: str, speed: float = 0.5):
    """Move toward the target object.

    Args:
        target: Object to approach (e.g., "cup", "person")
        speed: Movement speed in m/s
    """
```

**Dependencies are one-line class attributes.** Declare what you need and the system injects it — no wiring in `__init__`:

```python theme={null}
class MySkill(Skill):
    mobility = Interface(InterfaceType.MOBILITY)                    # hardware access
    image = RobotState(RobotStateType.LAST_MAIN_CAMERA_IMAGE_B64)   # sensor data
```

**Then just use them.** No callbacks, no message passing:

```python theme={null}
def execute(self):
    if self.image:                    # Latest camera frame, updated at 50Hz
        self.mobility.rotate(0.5)     # Rotate 0.5 radians
```

## The Skill Class

Every code-defined skill extends `Skill` and implements these methods:

```python theme={null}
from brain_client.skill_types import Skill, SkillResult

class MySkill(Skill):
    @property
    def name(self):
        return "my_skill"  # Unique identifier

    def guidelines(self):
        """Tell the agent when to use this skill."""
        return "Use when you need to [do something specific]"

    def execute(self, param1: str, param2: float = 1.0):
        """Do the thing. Agent calls this with parsed arguments."""
        # Your logic here
        return "Result message", SkillResult.SUCCESS

    def cancel(self):
        """Stop gracefully when interrupted."""
        return "Cancelled"
```

<SkillCoreMethodsTable />

## Skill Results

Return a tuple of `(message, status)` from `execute()`:

```python theme={null}
from brain_client.skill_types import SkillResult

def execute(self):
    if success:
        return "Task completed", SkillResult.SUCCESS
    elif self._cancelled:
        return "Interrupted by user", SkillResult.CANCELLED
    else:
        return "Something went wrong", SkillResult.FAILURE
```

<SkillResultsTable />

## Feedback

Send progress updates during long-running skills. The agent reads feedback in real-time and can act on it—for example, canceling the skill or triggering another one immediately:

```python theme={null}
def execute(self):
    for i in range(10):
        self._send_feedback(f"Step {i+1}/10")
        # ... do work ...
    return "Done", SkillResult.SUCCESS
```

## Next Steps

* [**Navigation Interfaces**](/software/skills/code-defined-skills/navigation-interfaces) — Mobility control, rotation, velocity commands

* [**Body Control Interfaces**](/software/skills/code-defined-skills/body-control-interfaces) — Arm manipulation, head movement, IK

* [**Robot State**](/software/skills/code-defined-skills/robot-state) — Camera, odometry, map, sensor data

* [**Physical Skill Examples**](/software/skills/code-defined-skills/physical-skill-examples) — Full-body behaviors combining navigation + manipulation

* [**Digital Skills**](/software/skills/code-defined-skills/digital-skills) — APIs, email, web services
