> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# GetAppSkill

# Package: appSkills

# Namespace: AppSkillsService

# Method link: https://dev.wix.com/docs/api-reference/app-management/app-skills/get-app-skill.md

## Permission Scopes:
Read App Skills: SCOPE.APP_SKILLS.READ

## Introduction

Retrieves an app skill by ID, including its `guidelines`.

The skill must be an activated skill of an app installed on the site in context. Returns
`APP_SKILL_NOT_FOUND` otherwise, or when the call has no site context.

---

## REST API

### Schema

```
 Method: getAppSkill
 Description: Retrieves an app skill by GUID, including its `guidelines`.  The skill must be an activated skill of an app installed on the site in context. Returns `APP_SKILL_NOT_FOUND` otherwise, or when the call has no site context.
 URL: https://www.wixapis.com/_api/app-skills/v1/app-skills/{appSkillId}
 Method: GET
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  appSkillId
 Method parameters: 
   param name: appSkillId | type:   none | required: true 
 Return type: GetAppSkillResponse
  - name: appSkill | type: AppSkill | description: Retrieved app skill, including its `guidelines`.  
     - name: id | type: string | description: App skill GUID. Derived from `appId` and `slug`, so a skill keeps the same GUID on every site and across app versions.  | read-only: true | validation: format GUID
     - name: appId | type: string | description: GUID of the app that declares the skill.  | read-only: true | validation: format GUID
     - name: appName | type: string | description: Name of the app that declares the skill.  | read-only: true | validation: minLength 0, maxLength 100
     - name: slug | type: string | description: Identifier of the skill, unique within its app, as declared in the App Skills extension. For example, `package-tracking`.  | read-only: true | validation: minLength 1, maxLength 64
     - name: displayName | type: string | description: Display name of the skill, for users browsing a site's skills.  Returned only when the app declares one.  | read-only: true | validation: minLength 2, maxLength 200
     - name: description | type: string | description: What the skill does and when to use it.  | read-only: true | validation: minLength 1, maxLength 1024
     - name: toolMethodNames | type: array<string> | description: `methodName` values of the tools declared in the app's App Tools extension that this skill may call. Call them with Invoke Tool in the App Tools API. A skill references only its own app's tools.  | read-only: true | validation: maxItems 50, minLength 1, maxLength 30
     - name: guidelines | type: string | description: Instructions an agent follows once it has chosen the skill, in Markdown.  Returned only by Get App Skill.  | read-only: true | validation: maxLength 20000
     - name: tags | type: array<string> | description: Keywords describing what the skill does, for agents that pick skills by topic.  | read-only: true | validation: maxItems 10, minLength 1, maxLength 30
     - name: examples | type: array<string> | description: Example user requests this skill handles, for agents that match a request to a skill.  | read-only: true | validation: maxItems 5, minLength 1, maxLength 200
     - name: inputModes | type: array<string> | description: MIME media types the skill accepts as input, as in the A2A `AgentSkill.inputModes` field. For example, `text/plain`. Empty when the skill accepts any input the agent accepts.  | read-only: true | validation: maxItems 10, minLength 3, maxLength 100
     - name: outputModes | type: array<string> | description: MIME media types the skill produces, as in the A2A `AgentSkill.outputModes` field. For example, `application/json`. Empty when the skill produces whatever the agent produces.  | read-only: true | validation: maxItems 10, minLength 3, maxLength 100

 Possible Errors:
   HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: APP_SKILL_NOT_FOUND | Description: Couldn't find the app skill.


```

### Examples

### Retrieve a skill with its guidelines
Retrieves an app skill by ID, including the guidelines an agent follows once the skill is chosen. The site is set by the wix-site-id header when calling with an API key.

```curl
curl -X GET \
'https://www.wixapis.com/_api/app-skills/v1/app-skills/ba63540e-9561-3352-9ecf-71ca01130d55' \
-H 'Authorization: <AUTH>' \
-H 'wix-site-id: <SITE_ID>'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.appSkills.appSkills.getAppSkill(appSkillId)
 Description: Retrieves an app skill by GUID, including its `guidelines`.  The skill must be an activated skill of an app installed on the site in context. Returns `APP_SKILL_NOT_FOUND` otherwise, or when the call has no site context.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  appSkillId
 Method parameters: 
   param name: appSkillId | type: string | description: App skill GUID, as returned by List App Skills. | required: true | validation: format GUID
 Return type: PROMISE<AppSkill>
  - name: _id | type: string | description: App skill GUID. Derived from `appId` and `slug`, so a skill keeps the same GUID on every site and across app versions.  | read-only: true | validation: format GUID
  - name: appId | type: string | description: GUID of the app that declares the skill.  | read-only: true | validation: format GUID
  - name: appName | type: string | description: Name of the app that declares the skill.  | read-only: true | validation: minLength 0, maxLength 100
  - name: slug | type: string | description: Identifier of the skill, unique within its app, as declared in the App Skills extension. For example, `package-tracking`.  | read-only: true | validation: minLength 1, maxLength 64
  - name: displayName | type: string | description: Display name of the skill, for users browsing a site's skills.  Returned only when the app declares one.  | read-only: true | validation: minLength 2, maxLength 200
  - name: description | type: string | description: What the skill does and when to use it.  | read-only: true | validation: minLength 1, maxLength 1024
  - name: toolMethodNames | type: array<string> | description: `methodName` values of the tools declared in the app's App Tools extension that this skill may call. Call them with Invoke Tool in the App Tools API. A skill references only its own app's tools.  | read-only: true | validation: maxItems 50, minLength 1, maxLength 30
  - name: guidelines | type: string | description: Instructions an agent follows once it has chosen the skill, in Markdown.  Returned only by Get App Skill.  | read-only: true | validation: maxLength 20000
  - name: tags | type: array<string> | description: Keywords describing what the skill does, for agents that pick skills by topic.  | read-only: true | validation: maxItems 10, minLength 1, maxLength 30
  - name: examples | type: array<string> | description: Example user requests this skill handles, for agents that match a request to a skill.  | read-only: true | validation: maxItems 5, minLength 1, maxLength 200
  - name: inputModes | type: array<string> | description: MIME media types the skill accepts as input, as in the A2A `AgentSkill.inputModes` field. For example, `text/plain`. Empty when the skill accepts any input the agent accepts.  | read-only: true | validation: maxItems 10, minLength 3, maxLength 100
  - name: outputModes | type: array<string> | description: MIME media types the skill produces, as in the A2A `AgentSkill.outputModes` field. For example, `application/json`. Empty when the skill produces whatever the agent produces.  | read-only: true | validation: maxItems 10, minLength 3, maxLength 100

 Possible Errors:
   HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: APP_SKILL_NOT_FOUND | Description: Couldn't find the app skill.


```

### Examples

### Retrieve a skill with its guidelines
Retrieves an app skill by ID, including the guidelines an agent follows once the skill is chosen. Use an ID returned by List App Skills.

```javascript
import { appSkills } from "@wix/app-skills";

async function getAppSkill() {
  const response = await appSkills.getAppSkill("ba63540e-9561-3352-9ecf-71ca01130d55");
}

/* Promise resolves to:
 * {
 *   "appSkill": {
 *     "_id": "ba63540e-9561-3352-9ecf-71ca01130d55",
 *     "appId": "6c4d3373-2afc-46a6-b7e0-9b98a43df146",
 *     "appName": "Shipping Helper",
 *     "slug": "package-tracking",
 *     "displayName": "Package tracking",
 *     "description": "Answers questions about where a shipment is and when it will arrive. Use when the user asks about the status, location or delivery date of an order or package, or gives a tracking number.",
 *     "toolMethodNames": ["getPackageTracking"],
 *     "guidelines": "# Package tracking\n\nYou help the user find out where a shipment is.\n\n1. Ask for the carrier tracking number if the user has not given one. Do not guess it and do not use an order number in its place.\n2. Call `getPackageTracking` with the tracking number exactly as the user wrote it.\n3. Report the status, the last known location and the estimated delivery date from the response. If the estimated delivery date is missing, say that it is not available yet.\n4. If the tool returns an error or an unknown tracking number, tell the user the number could not be found and ask them to check it.\n\nDo not use this skill to place, change or cancel orders.",
 *     "tags": ["shipping", "package tracking", "delivery status", "order tracking", "tracking number"],
 *     "examples": [
 *       "Where is my package?",
 *       "Track shipment 1Z999AA10123456784",
 *       "When will order #4521 arrive?",
 *       "Has the parcel for Dana Levi been delivered yet?",
 *       "Is the delivery from yesterday delayed?"
 *     ],
 *     "inputModes": [],
 *     "outputModes": []
 *   }
 * }
 */

```

### getAppSkill (self-hosted)
Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { appSkills } from '@wix/app-skills';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { appSkills },
  // Include the auth strategy and host as relevant
});


async function getAppSkill(appSkillId) {
  const response = await myWixClient.appSkills.getAppSkill(appSkillId);
};
```

---