Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.selftune.dev/llms.txt

Use this file to discover all available pages before exploring further.

Ingest a community bundle

POST /api/v1/community/bundles
Requires API key authentication.
Accept a sanitized community export bundle from a contributor. The bundle is validated against the contribution bundle schema, and summary fields are extracted for efficient querying.

Request body

{
  "creator_id": "550e8400-e29b-41d4-a716-446655440000",
  "skill_name": "my-skill",
  "bundle": {
    "schema_version": "1.2",
    "skill_name": "my-skill",
    "contributor_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
    "created_at": "2026-04-09T12:00:00.000Z",
    "selftune_version": "0.8.0",
    "agent_type": "claude_code",
    "sanitization_level": "conservative",
    "positive_queries": [
      { "query": "run tests", "invocation_type": "explicit", "source": "skill_log" }
    ],
    "eval_entries": [
      { "query": "run tests", "should_trigger": true, "invocation_type": "explicit" },
      { "query": "what is the weather", "should_trigger": false }
    ],
    "grading_summary": {
      "total_sessions": 5,
      "graded_sessions": 3,
      "average_pass_rate": 0.85,
      "expectation_count": 12
    },
    "evolution_summary": {
      "total_proposals": 4,
      "deployed_proposals": 2,
      "rolled_back_proposals": 1,
      "average_improvement": 0.12
    },
    "session_metrics": {
      "total_sessions": 10,
      "avg_assistant_turns": 8,
      "avg_tool_calls": 15,
      "avg_errors": 0.5,
      "top_tools": [
        { "tool": "Read", "count": 42 },
        { "tool": "Bash", "count": 31 }
      ]
    }
  }
}
FieldTypeDescription
creator_idstringThe creator’s cloud user UUID
skill_namestringName of the skill this bundle relates to
bundleobjectThe full contribution bundle payload (validated against ContributionBundleSchema)

Response (201)

{
  "status": "accepted",
  "submission_id": "submission-uuid"
}

Bundle overview

GET /api/v1/community/bundles/overview
Requires API key authentication.
Returns aggregate statistics for community bundle submissions for the authenticated user.

Response

{
  "total_submissions": 15,
  "total_skills": 3,
  "total_contributors": 8,
  "skills": [
    {
      "skill_name": "my-skill",
      "submission_count": 10,
      "contributor_count": 5,
      "latest_submission": "2025-12-31T23:59:59Z"
    }
  ]
}

Per-skill bundle detail

GET /api/v1/community/bundles/skills/:skillName
Requires API key authentication.
Returns bundle submission detail for a single skill, including recent submissions, scoped to the authenticated user.

Path parameters

ParameterDescription
skillNameThe skill name to query

Response

{
  "source": "community_bundle",
  "creator_id": "creator-uuid",
  "generated_at": "2025-12-31T23:59:59Z",
  "skill": {
    "skill_name": "my-skill",
    "submission_count": 10,
    "contributor_count": 5
  },
  "recent_submissions": [
    {
      "submission_id": "submission-uuid",
      "contributor_hash": "sha256-hash",
      "submitted_at": "2025-12-31T23:59:59Z"
    }
  ]
}
Returns "skill": null and an empty recent_submissions array if no bundles exist for the given skill.

Recent bundle submissions

GET /api/v1/community/bundles/recent
Requires API key authentication.
Returns the most recent bundle submissions across all skills for the authenticated user.

Query parameters

ParameterTypeDescription
limitnumberOptional. Number of results (1–100, default 20).

Response

{
  "source": "community_bundle",
  "creator_id": "creator-uuid",
  "generated_at": "2025-12-31T23:59:59Z",
  "submissions": [
    {
      "submission_id": "submission-uuid",
      "skill_name": "my-skill",
      "contributor_hash": "sha256-hash",
      "submitted_at": "2025-12-31T23:59:59Z"
    }
  ]
}