# Skills

Skills extend Cleric's capabilities by providing domain-specific instructions. Each skill teaches Cleric how to perform a particular task in your unique environment.

## How Skills Work

Cleric suggests new skills when it encounters tasks it cannot complete in your environment. When Cleric needs your input, you'll see an orange notification dot on the Skills tab in the sidebar.

Skills show one of two badges:

* **Needs input**: Skill requires instructions before Cleric can use it
* **Active**: Skill is configured and ready for Cleric to use in investigations

Once you provide instructions, Cleric automatically uses them to complete similar tasks in future investigations.

## Configuring and Testing Skills

To configure a skill:

1. In the Cleric web app, click **Skills** in the sidebar
2. Select a skill from the list
3. Expand **What does Cleric need?** to view guidance on what instructions to provide
4. Write instructions in the **Content** editor to teach Cleric how to perform the skill
5. Click **Save**

Be specific about the steps, tools, and resources Cleric should use. The more detailed your instructions, the better Cleric will perform.

## Example: Identifying Service Dependencies

Let's walk through a complete example of configuring and testing a skill.

### Scenario

Cleric has suggested a skill called **"Identify service dependencies"** and it needs your input.

### Instructions to Provide

In the Cleric web app, navigate to **Skills** and find the "Identify service dependencies" skill. Enter these instructions:

{% code overflow="wrap" %}

```
To identify service dependencies for a service:

1. Check the deployment's environment variables in Kubernetes
   - Look for variables ending in _URL, _HOST, _ENDPOINT, or _API
   - Example: PAYMENT_API_URL indicates a dependency on payment-api
   - Use: kubectl get deployment <service-name> -n production -o jsonpath='{.spec.template.spec.containers[0].env}'

2. If environment variables don't reveal dependencies, search the source code
   - Search for import statements or API client initializations
   - Use: gh repo search "import.*<service-name>" --repo myorg/services
   - Look for HTTP client configurations or service mesh annotations

3. Cross-reference with service mesh configuration if available
   - Check Istio VirtualServices or ServiceEntries
   - Use: kubectl get virtualservice -n production -o yaml | grep <service-name>

4. Document both upstream dependencies (services this service calls) and downstream dependencies (services that call this service)
```

{% endcode %}

Click **Save** to store the instructions.

### Testing the Skill

1. Click **Test skill**
2. If the test requires parameters (inputs the test script needs to run, such as service name or namespace), fill in the values and click **Run test**
3. Review the results

### Example Test Results

{% code overflow="wrap" %}

```
✅ Test completed

**Dependencies identified for checkout-service:**

Upstream dependencies (services checkout-service calls):
• inventory-api (found via INVENTORY_API_URL environment variable)
• pricing-api (found via PRICING_API_URL environment variable)
• payment-gateway (found via PAYMENT_GATEWAY_HOST environment variable)
• user-profile-service (found in source code imports)

Downstream dependencies (services that call checkout-service):
• web-frontend (found in service mesh configuration)
• mobile-api (found in service mesh configuration)

**Evidence:**
- Environment variables: 3 dependencies identified
- Source code search: 1 additional dependency found
- Service mesh config: 2 downstream callers identified
```

{% endcode %}

### Refining Instructions

If the test results aren't accurate, refine your instructions:

* Add more specific search patterns
* Include additional data sources to check
* Clarify the order of operations
* Add examples of what to look for

Click **Save** after each refinement and run the test again until the results are reliable.

## Using Skills During Investigations

Once configured, Cleric automatically uses skills during investigations. For example, when investigating a checkout-service issue, Cleric will automatically identify its dependencies and check their health.

You can also explicitly invoke skills:

{% code overflow="wrap" %}

```
@Cleric What are the dependencies of the checkout-service?
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cleric.ai/learning/skills.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
