{"record":{"id":"79571b3be94ee30f","repo":"zylon-ai/private-gpt","slug":"skill-with-id-skill-id-is-readonly-and-cannot-be","errorCode":null,"errorMessage":"Skill with id {skill_id} is readonly and cannot be deleted","messagePattern":"Skill with id (.+?) is readonly and cannot be deleted","errorType":"http","errorClass":"HTTPException","httpStatus":403,"severity":"error","filePath":"private_gpt/server/skills/skill_router.py","lineNumber":411,"sourceCode":"    collection: str = Query(\n        ...,\n        min_length=1,\n        max_length=255,\n        examples=[\"acme-prod\"],\n    ),\n    anthropic_beta: Annotated[list[str] | None, Header(alias=\"anthropic-beta\")] = None,\n) -> SkillDeletedResponse:\n    \"\"\"Delete a skill and return a deletion marker payload.\"\"\"\n    del anthropic_beta\n    service: SkillService = request.state.injector.get(SkillService)\n    skill = await service.get_skill(skill_id=skill_id, collection=collection)\n    if not skill:\n        raise HTTPException(\n            status_code=404,\n            detail=f\"Skill with id {skill_id} not found in collection {collection}\",\n        )\n    if skill.readonly:\n        raise HTTPException(\n            status_code=403,\n            detail=f\"Skill with id {skill_id} is readonly and cannot be deleted\",\n        )\n    await service.delete_skill(skill_id=skill_id, collection=collection)\n    return SkillDeletedResponse(id=skill_id)\n\n\n@skill_router.post(\n    \"/{skill_id}/versions\",\n    response_model=SkillVersionResponse,\n    description=\"Create a new version for an existing skill using multipart uploads.\",\n    responses={\n        200: {\n            \"description\": \"Skill version created successfully.\",\n            \"content\": {\n                \"application/json\": {\n                    \"examples\": {\n                        \"created_version\": {","sourceCodeStart":393,"sourceCodeEnd":429,"githubUrl":"https://github.com/zylon-ai/private-gpt/blob/4a030776a31a901ad80b1bf4d7faa2c1a367efbb/private_gpt/server/skills/skill_router.py#L393-L429","documentation":"Error \"Skill with id {skill_id} is readonly and cannot be deleted\" thrown in zylon-ai/private-gpt.","triggerScenarios":"Raised when attempting to delete a skill marked as readonly.","commonSituations":"Trying to delete a bundled/system skill that is protected; readonly skills cannot be removed, only custom ones.","solutions":["Do not attempt to delete readonly (built-in or managed) skills; remove only user-created skills.","If deletion is required, remove the skill from its managed source (e.g. the bundle or configuration that defines it) instead of via the API.","Check the skill's readonly flag before calling delete and skip readonly skills."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4a030776a31a901ad80b1bf4d7faa2c1a367efbb","analyzedAt":"2026-08-15T03:51:26.951Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}