curl -X POST "https://app.runtm.com/api/agent-directives:discover-in-repo" \
-H "Authorization: Bearer runtm_xxx" \
-H "X-Organization-Id: org_abc123" \
-H "Content-Type: application/json" \
-d '{"repo": "acme/my-skills", "ref": "main"}'
import requests
response = requests.post(
"https://app.runtm.com/api/agent-directives:discover-in-repo",
headers={
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
"Content-Type": "application/json",
},
json={"repo": "acme/my-skills", "ref": "main"},
)
data = response.json()
for c in data["candidates"]:
status = "imported" if c["already_imported"] else "new"
print(f" {c['path']} ({status})")
const response = await fetch(
"https://app.runtm.com/api/agent-directives:discover-in-repo",
{
method: "POST",
headers: {
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
"Content-Type": "application/json",
},
body: JSON.stringify({ repo: "acme/my-skills", ref: "main" }),
}
);
const data = await response.json();
data.candidates.forEach((c) => {
const status = c.already_imported ? "imported" : "new";
console.log(` ${c.path} (${status})`);
});
{
"repo": "acme/my-skills",
"ref": "main",
"commit_sha": "a1b2c3d4e5f6",
"candidates": [
{
"path": ".claude/skills/deploy-to-fly/SKILL.md",
"dir": ".claude/skills/deploy-to-fly",
"name": "deploy-to-fly",
"display_name": "Deploy to Fly.io",
"description": "Step-by-step Fly.io deployment guide",
"size_bytes": 4096,
"frontmatter": {
"name": "Deploy to Fly.io"
},
"already_imported": false
},
{
"path": ".claude/skills/lint-check/SKILL.md",
"dir": ".claude/skills/lint-check",
"name": "lint-check",
"display_name": "Lint Check",
"description": "Runs linters before committing",
"size_bytes": 1024,
"frontmatter": null,
"already_imported": true
}
],
"truncated": false
}
Skills
Discover Skills in Repo
Scan a GitHub repository for SKILL.md candidates
POST
/
api
/
agent-directives:discover-in-repo
curl -X POST "https://app.runtm.com/api/agent-directives:discover-in-repo" \
-H "Authorization: Bearer runtm_xxx" \
-H "X-Organization-Id: org_abc123" \
-H "Content-Type: application/json" \
-d '{"repo": "acme/my-skills", "ref": "main"}'
import requests
response = requests.post(
"https://app.runtm.com/api/agent-directives:discover-in-repo",
headers={
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
"Content-Type": "application/json",
},
json={"repo": "acme/my-skills", "ref": "main"},
)
data = response.json()
for c in data["candidates"]:
status = "imported" if c["already_imported"] else "new"
print(f" {c['path']} ({status})")
const response = await fetch(
"https://app.runtm.com/api/agent-directives:discover-in-repo",
{
method: "POST",
headers: {
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
"Content-Type": "application/json",
},
body: JSON.stringify({ repo: "acme/my-skills", ref: "main" }),
}
);
const data = await response.json();
data.candidates.forEach((c) => {
const status = c.already_imported ? "imported" : "new";
console.log(` ${c.path} (${status})`);
});
{
"repo": "acme/my-skills",
"ref": "main",
"commit_sha": "a1b2c3d4e5f6",
"candidates": [
{
"path": ".claude/skills/deploy-to-fly/SKILL.md",
"dir": ".claude/skills/deploy-to-fly",
"name": "deploy-to-fly",
"display_name": "Deploy to Fly.io",
"description": "Step-by-step Fly.io deployment guide",
"size_bytes": 4096,
"frontmatter": {
"name": "Deploy to Fly.io"
},
"already_imported": false
},
{
"path": ".claude/skills/lint-check/SKILL.md",
"dir": ".claude/skills/lint-check",
"name": "lint-check",
"display_name": "Lint Check",
"description": "Runs linters before committing",
"size_bytes": 1024,
"frontmatter": null,
"already_imported": true
}
],
"truncated": false
}
Scans a GitHub repository tree for every
SKILL.md file and returns candidates the UI can render for user selection. Read-only - no directives are created.
Required scope: context:read
Headers
string
required
Bearer token. Example:
Bearer runtm_xxxstring
Scope to an organization (uses the org’s GitHub App installation for repo access).
Body
string
required
GitHub repository in
owner/repo format (3–256 chars).string
Git ref to scan (branch, tag, or SHA). Defaults to the repo’s default branch.
Response
string
The repository that was scanned.
string | null
The ref that was resolved.
string
The commit SHA at the time of scanning.
array
Array of skill candidates found in the repo. Each includes
path, dir, name, display_name, description, size_bytes, frontmatter, and already_imported.boolean
true if the scan hit the maximum number of candidates.curl -X POST "https://app.runtm.com/api/agent-directives:discover-in-repo" \
-H "Authorization: Bearer runtm_xxx" \
-H "X-Organization-Id: org_abc123" \
-H "Content-Type: application/json" \
-d '{"repo": "acme/my-skills", "ref": "main"}'
import requests
response = requests.post(
"https://app.runtm.com/api/agent-directives:discover-in-repo",
headers={
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
"Content-Type": "application/json",
},
json={"repo": "acme/my-skills", "ref": "main"},
)
data = response.json()
for c in data["candidates"]:
status = "imported" if c["already_imported"] else "new"
print(f" {c['path']} ({status})")
const response = await fetch(
"https://app.runtm.com/api/agent-directives:discover-in-repo",
{
method: "POST",
headers: {
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
"Content-Type": "application/json",
},
body: JSON.stringify({ repo: "acme/my-skills", ref: "main" }),
}
);
const data = await response.json();
data.candidates.forEach((c) => {
const status = c.already_imported ? "imported" : "new";
console.log(` ${c.path} (${status})`);
});
{
"repo": "acme/my-skills",
"ref": "main",
"commit_sha": "a1b2c3d4e5f6",
"candidates": [
{
"path": ".claude/skills/deploy-to-fly/SKILL.md",
"dir": ".claude/skills/deploy-to-fly",
"name": "deploy-to-fly",
"display_name": "Deploy to Fly.io",
"description": "Step-by-step Fly.io deployment guide",
"size_bytes": 4096,
"frontmatter": {
"name": "Deploy to Fly.io"
},
"already_imported": false
},
{
"path": ".claude/skills/lint-check/SKILL.md",
"dir": ".claude/skills/lint-check",
"name": "lint-check",
"display_name": "Lint Check",
"description": "Runs linters before committing",
"size_bytes": 1024,
"frontmatter": null,
"already_imported": true
}
],
"truncated": false
}