From customgpt-ai-rag
Internal utility — permanently remove a document from the agent's knowledge base by its API page ID. Used by other skills that need to delete before re-uploading.
How this skill is triggered — by the user, by Claude, or both
Slash command
/customgpt-ai-rag:_delete-file-by-idThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Permanently remove a document from the agent's knowledge base by its document ID (called "page ID" in the API). The agent will no longer reference this content when answering questions. Cannot be undone — re-upload with `/add-files` to restore.
Permanently remove a document from the agent's knowledge base by its document ID (called "page ID" in the API). The agent will no longer reference this content when answering questions. Cannot be undone — re-upload with /add-files to restore.
.customgpt-meta.json to get agent_idFollow the lookup procedure in skills/_shared/api-key.md. Store the result as $API_KEY.
Walk up from $PWD toward /, looking for .customgpt-meta.json. Extract agent_id.
If not found:
"No agent found in this directory tree. Run
/create-agentto set one up first."
If the user provided a numeric ID: use it directly as $PAGE_ID.
If the user provided a filename or URL instead of an ID: search the file list to find the matching document. Fetch documents until a match is found:
curl -s --request GET \
--url "https://app.customgpt.ai/api/v1/projects/${AGENT_ID}/pages?page=${PAGE}&limit=100&order=asc" \
--header "Authorization: Bearer ${API_KEY}" \
--header "accept: application/json"
Match filename or page_url (case-insensitive substring). If found, note the id, filename or page_url.
If not found after checking all documents:
"No document matching '{term}' found. Run
/list-filesto browse all documents."
If no identifier provided at all:
"Please provide a document ID or filename. Run
/list-filesto see all documents and their IDs."
Present the details and ask for confirmation:
"About to permanently delete document {PAGE_ID} (
{filename or page_url}) from the agent. This cannot be undone. The file must be re-uploaded to restore it.Continue? (yes/no)"
If not confirmed: "Cancelled. Document was not deleted."
curl -s --request DELETE \
--url "https://app.customgpt.ai/api/v1/projects/${AGENT_ID}/pages/${PAGE_ID}" \
--header "Authorization: Bearer ${API_KEY}" \
--header "accept: application/json"
Read the response:
On success:
"Document {PAGE_ID} (
{filename or page_url}) deleted from the agent.""To restore it, run
/add-files {filename}. To replace it with a new version, use/update-agent {filename}."
On failure:
"Delete failed (HTTP {status}): {error message from response body}"
npx claudepluginhub poll-the-people/customgpt-for-claude-code --plugin customgpt-ai-ragRemoves Knowledge Base files from CLAUDE.md tables and optionally deletes them from disk. Supports direct path or interactive selection, with cross-reference cleanup and index updates.
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.