curl -X POST "https://app.runtm.com/api/agent-directives:import" \
-H "Authorization: Bearer runtm_xxx" \
-H "X-Organization-Id: org_abc123" \
-H "Content-Type: application/json" \
-d '{
"source_kind": "github_repo",
"uri": "acme/my-skills",
"ref": "main",
"paths": [".claude/skills/deploy-to-fly/SKILL.md"],
"attach": {
"repo_full_names": ["acme/web-app"],
"applies_to_all": false
},
"publish": true
}'
import requests
response = requests.post(
"https://app.runtm.com/api/agent-directives:import",
headers={
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
"Content-Type": "application/json",
},
json={
"source_kind": "github_repo",
"uri": "acme/my-skills",
"ref": "main",
"paths": [".claude/skills/deploy-to-fly/SKILL.md"],
"publish": True,
},
)
data = response.json()
for d in data["directives"]:
print(f"Imported: {d['name']}")
const response = await fetch(
"https://app.runtm.com/api/agent-directives:import",
{
method: "POST",
headers: {
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
"Content-Type": "application/json",
},
body: JSON.stringify({
source_kind: "github_repo",
uri: "acme/my-skills",
ref: "main",
paths: [".claude/skills/deploy-to-fly/SKILL.md"],
publish: true,
}),
}
);
const data = await response.json();
data.directives.forEach((d) =>
console.log(`Imported: ${d.name}`)
);
{
"directives": [
{
"id": "dir_new123",
"type": "skill_v0",
"name": "deploy-to-fly",
"display_name": "Deploy to Fly.io",
"description": "Step-by-step Fly.io deployment guide",
"organization_id": "org_abc123",
"owner_user_id": "user_xyz",
"content_kind": "inline",
"content_hash": "sha256:abcdef...",
"size_bytes": 4096,
"source": {
"kind": "github_repo",
"uri": "acme/my-skills",
"ref": "main",
"commit_sha": "a1b2c3d",
"path": ".claude/skills/deploy-to-fly/SKILL.md"
},
"attachments": {
"repos": ["acme/web-app"],
"applies_to_all": false
},
"created_at": "2026-05-09T21:00:00Z",
"updated_at": "2026-05-09T21:00:00Z"
}
]
}
Skills
Import Skill
Import one or more directives from a URL or GitHub repository
POST
/
api
/
agent-directives:import
curl -X POST "https://app.runtm.com/api/agent-directives:import" \
-H "Authorization: Bearer runtm_xxx" \
-H "X-Organization-Id: org_abc123" \
-H "Content-Type: application/json" \
-d '{
"source_kind": "github_repo",
"uri": "acme/my-skills",
"ref": "main",
"paths": [".claude/skills/deploy-to-fly/SKILL.md"],
"attach": {
"repo_full_names": ["acme/web-app"],
"applies_to_all": false
},
"publish": true
}'
import requests
response = requests.post(
"https://app.runtm.com/api/agent-directives:import",
headers={
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
"Content-Type": "application/json",
},
json={
"source_kind": "github_repo",
"uri": "acme/my-skills",
"ref": "main",
"paths": [".claude/skills/deploy-to-fly/SKILL.md"],
"publish": True,
},
)
data = response.json()
for d in data["directives"]:
print(f"Imported: {d['name']}")
const response = await fetch(
"https://app.runtm.com/api/agent-directives:import",
{
method: "POST",
headers: {
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
"Content-Type": "application/json",
},
body: JSON.stringify({
source_kind: "github_repo",
uri: "acme/my-skills",
ref: "main",
paths: [".claude/skills/deploy-to-fly/SKILL.md"],
publish: true,
}),
}
);
const data = await response.json();
data.directives.forEach((d) =>
console.log(`Imported: ${d.name}`)
);
{
"directives": [
{
"id": "dir_new123",
"type": "skill_v0",
"name": "deploy-to-fly",
"display_name": "Deploy to Fly.io",
"description": "Step-by-step Fly.io deployment guide",
"organization_id": "org_abc123",
"owner_user_id": "user_xyz",
"content_kind": "inline",
"content_hash": "sha256:abcdef...",
"size_bytes": 4096,
"source": {
"kind": "github_repo",
"uri": "acme/my-skills",
"ref": "main",
"commit_sha": "a1b2c3d",
"path": ".claude/skills/deploy-to-fly/SKILL.md"
},
"attachments": {
"repos": ["acme/web-app"],
"applies_to_all": false
},
"created_at": "2026-05-09T21:00:00Z",
"updated_at": "2026-05-09T21:00:00Z"
}
]
}
Imports directives from an external source. Supports GitHub repos (importing multiple skills at once via
paths) and individual URLs. Optionally attach to repositories and publish in a single call.
Required scope: context:write
Headers
string
required
Bearer token. Example:
Bearer runtm_xxxstring
Scope to an organization.
Body
string
required
Source type:
github_repo, github_url, or url.string
required
Source URI. For
github_repo: owner/repo. For URLs: full URL to a SKILL.md file.string
Git ref for GitHub sources (branch, tag, or SHA).
object
Optional attachment config applied to each imported directive. Contains
repo_full_names (array of owner/repo) and applies_to_all (boolean).boolean
default:"false"
When
true, publish each imported directive immediately.array
For
github_repo source: specific SKILL.md paths to import. If omitted, all discovered skills are imported.Response
array
Array of imported directive resources.
curl -X POST "https://app.runtm.com/api/agent-directives:import" \
-H "Authorization: Bearer runtm_xxx" \
-H "X-Organization-Id: org_abc123" \
-H "Content-Type: application/json" \
-d '{
"source_kind": "github_repo",
"uri": "acme/my-skills",
"ref": "main",
"paths": [".claude/skills/deploy-to-fly/SKILL.md"],
"attach": {
"repo_full_names": ["acme/web-app"],
"applies_to_all": false
},
"publish": true
}'
import requests
response = requests.post(
"https://app.runtm.com/api/agent-directives:import",
headers={
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
"Content-Type": "application/json",
},
json={
"source_kind": "github_repo",
"uri": "acme/my-skills",
"ref": "main",
"paths": [".claude/skills/deploy-to-fly/SKILL.md"],
"publish": True,
},
)
data = response.json()
for d in data["directives"]:
print(f"Imported: {d['name']}")
const response = await fetch(
"https://app.runtm.com/api/agent-directives:import",
{
method: "POST",
headers: {
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
"Content-Type": "application/json",
},
body: JSON.stringify({
source_kind: "github_repo",
uri: "acme/my-skills",
ref: "main",
paths: [".claude/skills/deploy-to-fly/SKILL.md"],
publish: true,
}),
}
);
const data = await response.json();
data.directives.forEach((d) =>
console.log(`Imported: ${d.name}`)
);
{
"directives": [
{
"id": "dir_new123",
"type": "skill_v0",
"name": "deploy-to-fly",
"display_name": "Deploy to Fly.io",
"description": "Step-by-step Fly.io deployment guide",
"organization_id": "org_abc123",
"owner_user_id": "user_xyz",
"content_kind": "inline",
"content_hash": "sha256:abcdef...",
"size_bytes": 4096,
"source": {
"kind": "github_repo",
"uri": "acme/my-skills",
"ref": "main",
"commit_sha": "a1b2c3d",
"path": ".claude/skills/deploy-to-fly/SKILL.md"
},
"attachments": {
"repos": ["acme/web-app"],
"applies_to_all": false
},
"created_at": "2026-05-09T21:00:00Z",
"updated_at": "2026-05-09T21:00:00Z"
}
]
}