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

# Skills

> Reusable task modules defined in Markdown with YAML frontmatter — learned automatically and crystallized over time.

## SKILL.md Format

```markdown theme={null}
---
name: code-review
description: Review code for bugs, style, and security issues
---

# Code Review

## Instructions

1. Read the specified file(s) using the read tool
2. Analyze for:
   - Bugs and logic errors
   - Security vulnerabilities (OWASP top 10)
   - Code style and readability
   - Performance issues
3. Write a review report to workspace/review.md

## Output Format

For each issue found:
- **File**: path
- **Line**: number
- **Severity**: critical / warning / info
- **Description**: what's wrong
- **Fix**: suggested change
```

Auto-generated fields added by the skill learner:

```
confidence: 1.0
learned_from: "task:<task-id>"
learned_at: "<ISO timestamp>"
usage_count: 0
success_count: 0
failure_count: 0
negative_examples: []
```

## Invoking Skills

```bash theme={null}
# In REPL
/skill:code-review Review the auth module

# In voice/text
"Use the code-review skill on src/auth.ts"

# Via SDK
query({ prompt: "/skill:code-review Review src/auth.ts", dir: "./my-agent" })
```

## Skill Learning Workflow

1. **Task begins** — task\_tracker begins tracking a task
2. **Task completes** — Agent completes the task successfully
3. **Evaluation** — skill\_learner evaluates if the approach is worth saving
4. **Crystallization** — If the task passes worthiness checks, crystallizes it as a new skill
5. **Reuse** — Future tasks search for matching skills
6. **Feedback loop** — Confidence adjusts based on success/failure outcomes

## Skill Directory Structure

```
skills/
  code-review/
    SKILL.md          ← skill instructions + frontmatter
    scripts/
      lint.sh         ← helper scripts
```

<Note>
  Every learned skill is version-controlled and inspectable — it's just a file in your repo, so you can diff, edit, or revert it like any other change.
</Note>

<CardGroup cols={2}>
  <Card title="Tools" icon="wrench" href="/open-source/gitagent/capabilities/tools">
    Built-in and declarative tools the agent uses to act
  </Card>

  <Card title="Workflows" icon="diagram-project" href="/open-source/gitagent/capabilities/workflows">
    Chain skills into deterministic, repeatable pipelines
  </Card>

  <Card title="Hooks" icon="webhook" href="/open-source/gitagent/capabilities/hooks">
    Intercept, block, or modify agent behavior at every stage
  </Card>

  <Card title="Plugins" icon="puzzle-piece" href="/open-source/gitagent/capabilities/plugins">
    Extend GitAgent with installable tools, skills, and hooks
  </Card>
</CardGroup>
