RepoDiet API Docs
1. API Overview
RepoDiet exposes deterministic JSON endpoints for repo scanning, findings analysis, patch bundle generation, and regression checklist generation.
Base URL
https://skillswap-virid-kappa.vercel.app2. Tool manifest
Machine-readable catalog of all RepoDiet tools, input schemas, and output schemas.
GET /api/tools/manifest3. Tool endpoints
All tools accept a public GitHub repoUrl and optional branch. No prior UI scan is required.
scan_repository
Scan a public repository and persist findings via the shared execution engine.
/api/tools/scan_repository
Input schema
{
"type": "object",
"required": [
"repoUrl"
],
"properties": {
"repoUrl": {
"type": "string",
"description": "Public GitHub repository URL (https://github.com/owner/repo)."
},
"branch": {
"type": "string",
"description": "Optional branch name. Defaults to repository default branch."
}
},
"additionalProperties": false
}Sample request
{
"repoUrl": "https://github.com/repodiet/demo-slop-app",
"branch": "main"
}Sample response
{
"success": true,
"taskId": "task_abc123",
"status": "completed",
"result": {
"scanId": "scan_xyz"
}
}curl
curl -X POST https://skillswap-virid-kappa.vercel.app/api/tools/scan_repository \
-H "Content-Type: application/json" \
-d '{"repoUrl":"https://github.com/repodiet/demo-slop-app","branch":"main"}'analyze_repository
A2MCP Quick Triage — bounded repository triage returning up to five prioritized findings. Live paid listing: 0.03 USD₮0 per call via x402 on X Layer (service 32948).
/api/tools/analyze_repository
Input schema
{
"type": "object",
"properties": {
"repoUrl": {
"type": "string",
"description": "Public GitHub repository URL (https://github.com/owner/repo)."
},
"branch": {
"type": "string",
"description": "Optional branch name. Defaults to repository default branch."
},
"scanId": {
"type": "string",
"description": "Prior scan identifier from scan_repository."
},
"taskId": {
"type": "string",
"description": "Prior task identifier."
},
"commitSha": {
"type": "string",
"description": "Exact commit SHA for payment binding."
},
"quoteId": {
"type": "string",
"description": "Funded x402 quote from POST /api/tasks/pay."
},
"idempotencyKey": {
"type": "string"
}
},
"additionalProperties": false
}Sample request
{
"scanId": "scan_xyz"
}Sample response
{
"success": true,
"taskId": "task_analyze",
"status": "completed",
"result": {}
}curl
curl -X POST https://skillswap-virid-kappa.vercel.app/api/tools/analyze_repository \
-H "Content-Type: application/json" \
-d '{"scanId":"scan_xyz"}'get_findings
Return the full findings payload for a completed scan.
/api/tools/get_findings
Input schema
{
"type": "object",
"properties": {
"repoUrl": {
"type": "string",
"description": "Public GitHub repository URL (https://github.com/owner/repo)."
},
"branch": {
"type": "string",
"description": "Optional branch name. Defaults to repository default branch."
},
"scanId": {
"type": "string",
"description": "Prior scan identifier from scan_repository."
},
"taskId": {
"type": "string",
"description": "Prior task identifier."
}
},
"additionalProperties": false
}Sample request
{
"scanId": "scan_xyz"
}Sample response
{
"success": true,
"taskId": "task_findings",
"status": "completed",
"result": {}
}curl
curl -X POST https://skillswap-virid-kappa.vercel.app/api/tools/get_findings \
-H "Content-Type: application/json" \
-d '{"scanId":"scan_xyz"}'list_safe_fixes
List Phase 1 eligible safe fixes for automatic cleanup.
/api/tools/list_safe_fixes
Input schema
{
"type": "object",
"properties": {
"repoUrl": {
"type": "string",
"description": "Public GitHub repository URL (https://github.com/owner/repo)."
},
"branch": {
"type": "string",
"description": "Optional branch name. Defaults to repository default branch."
},
"scanId": {
"type": "string",
"description": "Prior scan identifier from scan_repository."
},
"taskId": {
"type": "string",
"description": "Prior task identifier."
}
},
"additionalProperties": false
}Sample request
{
"scanId": "scan_xyz"
}Sample response
{
"success": true,
"taskId": "task_safe",
"status": "completed",
"result": {
"count": 1
}
}curl
curl -X POST https://skillswap-virid-kappa.vercel.app/api/tools/list_safe_fixes \
-H "Content-Type: application/json" \
-d '{"scanId":"scan_xyz"}'verify_patch
Baseline comparison and verification for a cleanup run patch.
/api/tools/verify_patch
Input schema
{
"type": "object",
"properties": {
"repoUrl": {
"type": "string",
"description": "Public GitHub repository URL (https://github.com/owner/repo)."
},
"branch": {
"type": "string",
"description": "Optional branch name. Defaults to repository default branch."
},
"scanId": {
"type": "string",
"description": "Prior scan identifier from scan_repository."
},
"taskId": {
"type": "string",
"description": "Prior task identifier."
},
"cleanupRunId": {
"type": "string"
},
"patchId": {
"type": "string"
},
"quoteId": {
"type": "string"
}
},
"additionalProperties": false
}Sample request
{
"cleanupRunId": "cleanup_abc",
"scanId": "scan_xyz"
}Sample response
{
"success": true,
"taskId": "task_verify",
"status": "completed",
"result": {}
}curl
curl -X POST https://skillswap-virid-kappa.vercel.app/api/tools/verify_patch \
-H "Content-Type: application/json" \
-d '{"cleanupRunId":"cleanup_abc","scanId":"scan_xyz"}'repository_health_delta
New, resolved and recurring debt between two repository snapshots.
/api/tools/repository_health_delta
Input schema
{
"type": "object",
"properties": {
"repoUrl": {
"type": "string",
"description": "Public GitHub repository URL (https://github.com/owner/repo)."
},
"branch": {
"type": "string",
"description": "Optional branch name. Defaults to repository default branch."
},
"scanId": {
"type": "string",
"description": "Prior scan identifier from scan_repository."
},
"taskId": {
"type": "string",
"description": "Prior task identifier."
},
"baseScanId": {
"type": "string"
},
"headScanId": {
"type": "string"
},
"baseCommitSha": {
"type": "string"
},
"headCommitSha": {
"type": "string"
},
"quoteId": {
"type": "string"
}
}
}Sample request
{
"baseScanId": "scan_old",
"scanId": "scan_new"
}Sample response
{
"success": true,
"taskId": "task_delta",
"status": "completed",
"result": {}
}curl
curl -X POST https://skillswap-virid-kappa.vercel.app/api/tools/repository_health_delta \
-H "Content-Type: application/json" \
-d '{"baseScanId":"scan_old","scanId":"scan_new"}'get_repository_health
Repository health summary with honest analyzer status fields.
/api/tools/get_repository_health
Input schema
{
"type": "object",
"properties": {
"repoUrl": {
"type": "string",
"description": "Public GitHub repository URL (https://github.com/owner/repo)."
},
"branch": {
"type": "string",
"description": "Optional branch name. Defaults to repository default branch."
},
"scanId": {
"type": "string",
"description": "Prior scan identifier from scan_repository."
},
"taskId": {
"type": "string",
"description": "Prior task identifier."
}
},
"additionalProperties": false
}Sample request
{
"scanId": "scan_xyz"
}Sample response
{
"success": true,
"taskId": "task_health",
"status": "completed",
"result": {}
}curl
curl -X POST https://skillswap-virid-kappa.vercel.app/api/tools/get_repository_health \
-H "Content-Type: application/json" \
-d '{"scanId":"scan_xyz"}'get_task_status
Poll task status and result by taskId.
/api/tools/tasks/{taskId}
Input schema
{
"type": "object",
"required": [
"taskId"
],
"properties": {
"taskId": {
"type": "string"
}
}
}Sample request
{
"taskId": "task_abc123"
}Sample response
{
"success": true,
"taskId": "task_abc123",
"status": "completed",
"result": {}
}curl
curl -X POST https://skillswap-virid-kappa.vercel.app/api/tools/tasks/{taskId} \
-H "Content-Type: application/json" \
-d '{"taskId":"task_abc123"}'run_free_safe_fix
Execute one verified safe fix in an isolated workspace (free proof).
/api/tools/run_free_safe_fix
Input schema
{
"type": "object",
"properties": {
"repoUrl": {
"type": "string",
"description": "Public GitHub repository URL (https://github.com/owner/repo)."
},
"branch": {
"type": "string",
"description": "Optional branch name. Defaults to repository default branch."
},
"scanId": {
"type": "string",
"description": "Prior scan identifier from scan_repository."
},
"taskId": {
"type": "string",
"description": "Prior task identifier."
},
"findingIds": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}Sample request
{
"scanId": "scan_xyz"
}Sample response
{
"success": true,
"taskId": "task_fix",
"status": "completed",
"result": {
"finalDecision": "retained"
}
}curl
curl -X POST https://skillswap-virid-kappa.vercel.app/api/tools/run_free_safe_fix \
-H "Content-Type: application/json" \
-d '{"scanId":"scan_xyz"}'run_quick_cleanup
Generate Patch Kit cleanup bundle for selected findings (paid tier).
/api/tools/run_quick_cleanup
Input schema
{
"type": "object",
"properties": {
"repoUrl": {
"type": "string",
"description": "Public GitHub repository URL (https://github.com/owner/repo)."
},
"branch": {
"type": "string",
"description": "Optional branch name. Defaults to repository default branch."
},
"scanId": {
"type": "string",
"description": "Prior scan identifier from scan_repository."
},
"taskId": {
"type": "string",
"description": "Prior task identifier."
},
"findingIds": {
"type": "array",
"items": {
"type": "string"
}
},
"quoteId": {
"type": "string",
"description": "Optional task quote for x402 settlement."
}
},
"additionalProperties": false
}Sample request
{
"scanId": "scan_xyz"
}Sample response
{
"success": true,
"taskId": "task_quick",
"status": "completed",
"result": {}
}curl
curl -X POST https://skillswap-virid-kappa.vercel.app/api/tools/run_quick_cleanup \
-H "Content-Type: application/json" \
-d '{"scanId":"scan_xyz"}'run_cleanup
Unified cleanup runner — operation free_proof or quick_cleanup.
/api/tools/run_cleanup
Input schema
{
"type": "object",
"properties": {
"repoUrl": {
"type": "string",
"description": "Public GitHub repository URL (https://github.com/owner/repo)."
},
"branch": {
"type": "string",
"description": "Optional branch name. Defaults to repository default branch."
},
"scanId": {
"type": "string",
"description": "Prior scan identifier from scan_repository."
},
"taskId": {
"type": "string",
"description": "Prior task identifier."
},
"operation": {
"type": "string",
"enum": [
"free_proof",
"quick_cleanup"
]
},
"findingIds": {
"type": "array",
"items": {
"type": "string"
}
},
"quoteId": {
"type": "string"
}
},
"additionalProperties": false
}Sample request
{
"scanId": "scan_xyz",
"operation": "free_proof"
}Sample response
{
"success": true,
"taskId": "task_cleanup",
"status": "completed",
"result": {}
}curl
curl -X POST https://skillswap-virid-kappa.vercel.app/api/tools/run_cleanup \
-H "Content-Type: application/json" \
-d '{"scanId":"scan_xyz","operation":"free_proof"}'verify_cleanup
Verify a cleanup patch or cleanup run in an isolated workspace.
/api/tools/verify_cleanup
Input schema
{
"type": "object",
"properties": {
"patchId": {
"type": "string"
},
"cleanupRunId": {
"type": "string"
},
"scanId": {
"type": "string"
}
}
}Sample request
{
"patchId": "patchkit_abc"
}Sample response
{
"success": true,
"taskId": "task_verify",
"status": "completed",
"result": {}
}curl
curl -X POST https://skillswap-virid-kappa.vercel.app/api/tools/verify_cleanup \
-H "Content-Type: application/json" \
-d '{"patchId":"patchkit_abc"}'create_cleanup_pr
A2A Verified Cleanup PR delivery primitive (operation create_cleanup_pr). Not an A2MCP x402 pay-per-call listing — public settlement is negotiated A2A escrow with buyer acceptance (service 32947, default reference 1 USD₮0).
/api/tools/create_cleanup_pr
Input schema
{
"type": "object",
"required": [
"repoUrl"
],
"properties": {
"repoUrl": {
"type": "string",
"description": "Public GitHub repository URL (https://github.com/owner/repo)."
},
"branch": {
"type": "string",
"description": "Optional branch name. Defaults to repository default branch."
},
"mode": {
"type": "string",
"enum": [
"safe_only",
"report_only"
]
},
"findings": {
"type": "object"
},
"patchKit": {
"type": "object"
},
"demo": {
"type": "boolean"
},
"githubToken": {
"type": "string"
}
}
}Sample request
{
"repoUrl": "https://github.com/user/repo",
"mode": "safe_only"
}Sample response
{
"success": true,
"taskId": "task_pr",
"status": "completed",
"result": {}
}curl
curl -X POST https://skillswap-virid-kappa.vercel.app/api/tools/create_cleanup_pr \
-H "Content-Type: application/json" \
-d '{"repoUrl":"https://github.com/user/repo","mode":"safe_only"}'configure_repository_policy
Store protected path policy for a repository.
/api/tools/configure_repository_policy
Input schema
{
"type": "object",
"required": [
"repoUrl"
],
"properties": {
"repoUrl": {
"type": "string",
"description": "Public GitHub repository URL (https://github.com/owner/repo)."
},
"branch": {
"type": "string",
"description": "Optional branch name. Defaults to repository default branch."
},
"protectedPaths": {
"type": "array",
"items": {
"type": "string"
}
},
"protectedGlobs": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}Sample request
{
"repoUrl": "https://github.com/user/repo",
"protectedGlobs": [
"app/**/route.ts"
]
}Sample response
{
"success": true,
"taskId": "task_policy",
"status": "completed",
"result": {}
}curl
curl -X POST https://skillswap-virid-kappa.vercel.app/api/tools/configure_repository_policy \
-H "Content-Type: application/json" \
-d '{"repoUrl":"https://github.com/user/repo","protectedGlobs":["app/**/route.ts"]}'activate_repo_guard
Legacy endpoint — Repo Guard is not part of the public OKX two-service model (A2MCP Quick Triage + A2A Verified Cleanup PR).
/api/tools/activate_repo_guard
Input schema
{
"type": "object",
"required": [
"repoUrl"
],
"properties": {
"repoUrl": {
"type": "string",
"description": "Public GitHub repository URL (https://github.com/owner/repo)."
},
"branch": {
"type": "string",
"description": "Optional branch name. Defaults to repository default branch."
}
},
"additionalProperties": false
}Sample request
{
"repoUrl": "https://github.com/user/repo"
}Sample response
{
"success": false,
"taskId": "task_guard",
"status": "failed",
"limitations": [
"Repo Guard not implemented"
]
}curl
curl -X POST https://skillswap-virid-kappa.vercel.app/api/tools/activate_repo_guard \
-H "Content-Type: application/json" \
-d '{"repoUrl":"https://github.com/user/repo"}'get_scan_status
Read-only scan/task status for a prior scan_repository call.
/api/tools/get_scan_status
Input schema
{
"type": "object",
"properties": {
"repoUrl": {
"type": "string",
"description": "Public GitHub repository URL (https://github.com/owner/repo)."
},
"branch": {
"type": "string",
"description": "Optional branch name. Defaults to repository default branch."
},
"scanId": {
"type": "string",
"description": "Prior scan identifier from scan_repository."
},
"taskId": {
"type": "string",
"description": "Prior task identifier."
}
},
"additionalProperties": false
}Sample request
{
"scanId": "scan_xyz"
}Sample response
{
"success": true,
"taskId": "task_status",
"status": "completed",
"result": {
"status": "completed"
}
}curl
curl -X POST https://skillswap-virid-kappa.vercel.app/api/tools/get_scan_status \
-H "Content-Type: application/json" \
-d '{"scanId":"scan_xyz"}'get_repository_coverage
Read-only analyzer coverage and risk-bucket counts for a scanned repository.
/api/tools/get_repository_coverage
Input schema
{
"type": "object",
"properties": {
"repoUrl": {
"type": "string",
"description": "Public GitHub repository URL (https://github.com/owner/repo)."
},
"branch": {
"type": "string",
"description": "Optional branch name. Defaults to repository default branch."
},
"scanId": {
"type": "string",
"description": "Prior scan identifier from scan_repository."
},
"taskId": {
"type": "string",
"description": "Prior task identifier."
}
},
"additionalProperties": false
}Sample request
{
"scanId": "scan_xyz"
}Sample response
{
"success": true,
"taskId": "task_cov",
"status": "completed",
"result": {}
}curl
curl -X POST https://skillswap-virid-kappa.vercel.app/api/tools/get_repository_coverage \
-H "Content-Type: application/json" \
-d '{"scanId":"scan_xyz"}'list_findings
List structured findings for a completed scan (read-only).
/api/tools/list_findings
Input schema
{
"type": "object",
"properties": {
"repoUrl": {
"type": "string",
"description": "Public GitHub repository URL (https://github.com/owner/repo)."
},
"branch": {
"type": "string",
"description": "Optional branch name. Defaults to repository default branch."
},
"scanId": {
"type": "string",
"description": "Prior scan identifier from scan_repository."
},
"taskId": {
"type": "string",
"description": "Prior task identifier."
}
},
"additionalProperties": false
}Sample request
{
"scanId": "scan_xyz"
}Sample response
{
"success": true,
"taskId": "task_list",
"status": "completed",
"result": {
"count": 0
}
}curl
curl -X POST https://skillswap-virid-kappa.vercel.app/api/tools/list_findings \
-H "Content-Type: application/json" \
-d '{"scanId":"scan_xyz"}'get_finding_evidence
Return evidence bundle for one finding id (read-only).
/api/tools/get_finding_evidence
Input schema
{
"type": "object",
"properties": {
"repoUrl": {
"type": "string",
"description": "Public GitHub repository URL (https://github.com/owner/repo)."
},
"branch": {
"type": "string",
"description": "Optional branch name. Defaults to repository default branch."
},
"scanId": {
"type": "string",
"description": "Prior scan identifier from scan_repository."
},
"taskId": {
"type": "string",
"description": "Prior task identifier."
},
"findingId": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"findingId"
]
}Sample request
{
"scanId": "scan_xyz",
"findingId": "f_1"
}Sample response
{
"success": true,
"taskId": "task_ev",
"status": "completed",
"result": {}
}curl
curl -X POST https://skillswap-virid-kappa.vercel.app/api/tools/get_finding_evidence \
-H "Content-Type: application/json" \
-d '{"scanId":"scan_xyz","findingId":"f_1"}'prepare_cleanup_plan
Build an automatic cleanup plan from evidence-backed findings. User chooses outcomes; RepoDiet selects operations.
/api/tools/prepare_cleanup_plan
Input schema
{
"type": "object",
"properties": {
"repoUrl": {
"type": "string",
"description": "Public GitHub repository URL (https://github.com/owner/repo)."
},
"branch": {
"type": "string",
"description": "Optional branch name. Defaults to repository default branch."
},
"scanId": {
"type": "string",
"description": "Prior scan identifier from scan_repository."
},
"taskId": {
"type": "string",
"description": "Prior task identifier."
},
"excludeFindingIds": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}Sample request
{
"scanId": "scan_xyz"
}Sample response
{
"success": true,
"taskId": "task_plan",
"status": "completed",
"result": {
"planCount": 0
}
}curl
curl -X POST https://skillswap-virid-kappa.vercel.app/api/tools/prepare_cleanup_plan \
-H "Content-Type: application/json" \
-d '{"scanId":"scan_xyz"}'get_plan_status
Read-only status lookup for a prepared cleanup plan.
/api/tools/get_plan_status
Input schema
{
"type": "object",
"properties": {
"repoUrl": {
"type": "string",
"description": "Public GitHub repository URL (https://github.com/owner/repo)."
},
"branch": {
"type": "string",
"description": "Optional branch name. Defaults to repository default branch."
},
"scanId": {
"type": "string",
"description": "Prior scan identifier from scan_repository."
},
"taskId": {
"type": "string",
"description": "Prior task identifier."
},
"planId": {
"type": "string"
}
},
"additionalProperties": false
}Sample request
{
"planId": "plan_abc"
}Sample response
{
"success": true,
"taskId": "task_ps",
"status": "completed",
"result": {}
}curl
curl -X POST https://skillswap-virid-kappa.vercel.app/api/tools/get_plan_status \
-H "Content-Type: application/json" \
-d '{"planId":"plan_abc"}'get_delivery_status
Read-only OKX A2A delivery status for a cleanup task.
/api/tools/get_delivery_status
Input schema
{
"type": "object",
"properties": {
"a2aTaskId": {
"type": "string"
},
"taskId": {
"type": "string"
},
"scanId": {
"type": "string"
}
},
"additionalProperties": false
}Sample request
{
"a2aTaskId": "a2a_abc"
}Sample response
{
"success": true,
"taskId": "task_ds",
"status": "completed",
"result": {}
}curl
curl -X POST https://skillswap-virid-kappa.vercel.app/api/tools/get_delivery_status \
-H "Content-Type: application/json" \
-d '{"a2aTaskId":"a2a_abc"}'scan_repo_bloat
Scan a public GitHub repo for structure, bloat signals, analyzer status, and cleanup risk buckets.
/api/tools/scan_repo_bloat
Input schema
{
"type": "object",
"required": [
"repoUrl"
],
"properties": {
"repoUrl": {
"type": "string",
"description": "Public GitHub repository URL (https://github.com/owner/repo)."
},
"branch": {
"type": "string",
"description": "Optional branch name. Defaults to repository default branch."
},
"mode": {
"type": "string",
"enum": [
"quick",
"full"
],
"default": "quick"
}
},
"additionalProperties": false
}Sample request
{
"repoUrl": "https://github.com/Ibrahimmovic/Circle-Arc-Net",
"branch": "main",
"mode": "quick"
}Sample response
{
"ok": true,
"tool": "scan_repo_bloat",
"version": "2.0.0",
"repo": {
"owner": "Ibrahimmovic",
"name": "Circle-Arc-Net",
"branch": "main"
},
"warnings": []
}curl
curl -X POST https://skillswap-virid-kappa.vercel.app/api/tools/scan_repo_bloat \
-H "Content-Type: application/json" \
-d '{"repoUrl":"https://github.com/Ibrahimmovic/Circle-Arc-Net","branch":"main","mode":"quick"}'detect_duplicate_code
Detect duplicate code clusters in a public GitHub repository.
/api/tools/detect_duplicate_code
Input schema
{
"type": "object",
"required": [
"repoUrl"
],
"properties": {
"repoUrl": {
"type": "string",
"description": "Public GitHub repository URL (https://github.com/owner/repo)."
},
"branch": {
"type": "string",
"description": "Optional branch name. Defaults to repository default branch."
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 25
}
},
"additionalProperties": false
}Sample request
{
"repoUrl": "https://github.com/vercel/next-learn",
"branch": "main",
"limit": 25
}Sample response
{
"ok": true,
"tool": "detect_duplicate_code",
"version": "2.0.0",
"summary": {
"duplicateClusters": 0,
"source": "jscpd"
},
"duplicates": [],
"warnings": []
}curl
curl -X POST https://skillswap-virid-kappa.vercel.app/api/tools/detect_duplicate_code \
-H "Content-Type: application/json" \
-d '{"repoUrl":"https://github.com/vercel/next-learn","branch":"main","limit":25}'find_dead_files
Find unused files and orphan patterns in a public GitHub repository.
/api/tools/find_dead_files
Input schema
{
"type": "object",
"required": [
"repoUrl"
],
"properties": {
"repoUrl": {
"type": "string",
"description": "Public GitHub repository URL (https://github.com/owner/repo)."
},
"branch": {
"type": "string",
"description": "Optional branch name. Defaults to repository default branch."
},
"includeOrphans": {
"type": "boolean",
"default": true
}
},
"additionalProperties": false
}Sample request
{
"repoUrl": "https://github.com/Ibrahimmovic/Circle-Arc-Net",
"branch": "main",
"includeOrphans": true
}Sample response
{
"ok": true,
"tool": "find_dead_files",
"version": "2.0.0",
"summary": {
"unusedFiles": 0,
"orphanPatterns": 0,
"safeCandidates": 0,
"reviewFirst": 0
},
"unusedFiles": [],
"orphans": [],
"note": "Review First items are not automatic delete candidates.",
"warnings": []
}curl
curl -X POST https://skillswap-virid-kappa.vercel.app/api/tools/find_dead_files \
-H "Content-Type: application/json" \
-d '{"repoUrl":"https://github.com/Ibrahimmovic/Circle-Arc-Net","branch":"main","includeOrphans":true}'find_unused_dependencies
Find potentially unused npm dependencies in a public GitHub repository.
/api/tools/find_unused_dependencies
Input schema
{
"type": "object",
"required": [
"repoUrl"
],
"properties": {
"repoUrl": {
"type": "string",
"description": "Public GitHub repository URL (https://github.com/owner/repo)."
},
"branch": {
"type": "string",
"description": "Optional branch name. Defaults to repository default branch."
}
},
"additionalProperties": false
}Sample request
{
"repoUrl": "https://github.com/Ibrahimmovic/Circle-Arc-Net",
"branch": "main"
}Sample response
{
"ok": true,
"tool": "find_unused_dependencies",
"version": "2.0.0",
"summary": {
"unusedDependencies": 0,
"source": "fallback",
"confidencePolicy": "review_before_removing"
},
"dependencies": [],
"warnings": []
}curl
curl -X POST https://skillswap-virid-kappa.vercel.app/api/tools/find_unused_dependencies \
-H "Content-Type: application/json" \
-d '{"repoUrl":"https://github.com/Ibrahimmovic/Circle-Arc-Net","branch":"main"}'generate_cleanup_patch
Generate conservative Patch Kit artifacts including cleanup.patch, reports, and optional ZIP bundle.
/api/tools/generate_cleanup_patch
Input schema
{
"type": "object",
"required": [
"repoUrl"
],
"properties": {
"repoUrl": {
"type": "string",
"description": "Public GitHub repository URL (https://github.com/owner/repo)."
},
"branch": {
"type": "string",
"description": "Optional branch name. Defaults to repository default branch."
},
"includeZip": {
"type": "boolean",
"default": false
}
},
"additionalProperties": false
}Sample request
{
"repoUrl": "https://github.com/Ibrahimmovic/Circle-Arc-Net",
"branch": "main",
"includeZip": false
}Sample response
{
"ok": true,
"tool": "generate_cleanup_patch",
"version": "2.0.0",
"summary": {
"safeCandidates": 0,
"reviewFirst": 0,
"doNotTouch": 0,
"bundleFiles": 7
},
"policy": {
"autoDeletes": false,
"safeCandidatesOnly": true
},
"warnings": []
}curl
curl -X POST https://skillswap-virid-kappa.vercel.app/api/tools/generate_cleanup_patch \
-H "Content-Type: application/json" \
-d '{"repoUrl":"https://github.com/Ibrahimmovic/Circle-Arc-Net","branch":"main","includeZip":false}'generate_regression_checklist
Generate a regression checklist markdown and structured route/API checks.
/api/tools/generate_regression_checklist
Input schema
{
"type": "object",
"required": [
"repoUrl"
],
"properties": {
"repoUrl": {
"type": "string",
"description": "Public GitHub repository URL (https://github.com/owner/repo)."
},
"branch": {
"type": "string",
"description": "Optional branch name. Defaults to repository default branch."
}
},
"additionalProperties": false
}Sample request
{
"repoUrl": "https://github.com/Ibrahimmovic/Circle-Arc-Net",
"branch": "main"
}Sample response
{
"ok": true,
"tool": "generate_regression_checklist",
"version": "2.0.0",
"checklistMd": "# RepoDiet Regression Checklist",
"checks": {
"build": [
"npm install"
],
"routes": [
"/"
],
"apiRoutes": [
"/api/scans/run"
]
},
"warnings": []
}curl
curl -X POST https://skillswap-virid-kappa.vercel.app/api/tools/generate_regression_checklist \
-H "Content-Type: application/json" \
-d '{"repoUrl":"https://github.com/Ibrahimmovic/Circle-Arc-Net","branch":"main"}'4. OKX-compatible response format
Successful tool responses return JSON only. Tool-specific fields are returned at the top level alongside ok, tool, version, and warnings.
{
"ok": true,
"tool": "scan_repo_bloat",
"version": "2.0.0",
"repo": {},
"scan": {},
"findings": {},
"policy": {},
"warnings": []
}Error responses:
{
"ok": false,
"tool": "scan_repo_bloat",
"version": "2.0.0",
"error": {
"code": "REPO_NOT_FOUND",
"message": "Could not fetch repository. Check if the repo is public and the branch exists."
}
}5. Safety policy
- RepoDiet never pushes to your main branch.
- RepoDiet never merges pull requests for you.
- RepoDiet only works on public repos in the demo; PR mode uses authorized GitHub access.
- RepoDiet never reads or displays .env values.
- RepoDiet applies fixes on a review branch — unused imports, safe file deletes, package removals.
- Duplicates, routes, and protected paths require human review before any change.
6. Limits
- — Public GitHub repos only
- — Max ZIP size: 25MB
- — Max files: 5000
- — Max single file read: 500KB
- — Timeout: 60 seconds
- — JavaScript/TypeScript focus
- — Fallback analyzers may be used on serverless runtimes
