agent/plugins/core-php/skills/api-endpoints/SKILL.md
Snider 55bc34c885 feat(agent/plugins): create plugins/{core-go,core-php,infra} tree (RFC.plugin-restructure §1+§2)
plugins/ subtree created from scratch (no dappcore-go/dappcore-php
existed to rename). Per docs/RFC-AGENT-PLUGIN-RESTRUCTURE.md:

plugins/core-go/:
- .claude-plugin/plugin.json (name: core-go)
- README.md, marketplace.yaml, .mcp.json (calls core mcp serve)
- commands/{commit,qa,review,verify}.md
- skills/{core,core-go,go-agent}/SKILL.md (seeded from existing repo material)
- skills/api-endpoints/SKILL.md (NEW per ticket)
- agents/go-developer.md
- hook scripts referenced by commands

plugins/core-php/: same structure, php-developer agent + php-specific
api-endpoints skill.

plugins/infra/: plugin.json, README.md, marketplace.yaml, agents/infra-ops.md.

Manifests use core-* not dappcore-*. .mcp.json files call core mcp serve.
No dappcore-* names left.

Note: seed skills copied from existing repo material per ticket spec —
some upstream Host UK examples remain in copied skill docs. Future PR
can purge those if Host UK references are out of scope for the public
plugin marketplace.

Co-authored-by: Codex <noreply@openai.com>
Closes tasks.lthn.sh/view.php?id=234
2026-04-25 20:05:05 +01:00

1.6 KiB

name description
api-endpoints Use when a Core plugin needs to call api.lthn.sh or mcp.lthn.sh. Documents the JSON headers, auth, and endpoint conventions required by the plugin restructure RFC.

API and MCP Endpoints

Use this skill when a command, script, or tool talks to the shared Core endpoints.

Canonical endpoints

  • https://api.lthn.sh — REST API
  • https://mcp.lthn.sh — MCP bridge endpoint

These conventions apply to both production and self-hosted lthn.sh installs.

Required headers

  • Send Accept: application/json on every API request. The default response may be HTML if this header is missing.
  • Send Content-Type: application/json for JSON request bodies.
  • Send Authorization: Bearer <token> for authenticated requests.

REST shape

  • Use /v1/{resource} paths.
  • Expect JSON request and response bodies.
  • Keep request payloads explicit and small.

Example:

curl -s https://api.lthn.sh/v1/issues \
  -H 'Accept: application/json' \
  -H "Authorization: Bearer ${TOKEN}"
curl -s https://api.lthn.sh/v1/brain/recall \
  -X POST \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer ${TOKEN}" \
  -d '{"query":"dispatch status","top_k":3}'

MCP usage

  • Remote MCP can be reached at https://mcp.lthn.sh.
  • Local plugin configs in this repository use core mcp serve through .mcp.json.

Local .mcp.json pattern:

{
  "mcpServers": {
    "core": {
      "type": "stdio",
      "command": "core",
      "args": ["mcp", "serve"]
    }
  }
}