{"id":50379224,"url":"https://github.com/cku3987/codex-local-cleanup-skill","last_synced_at":"2026-05-30T11:01:13.494Z","repository":{"id":361361106,"uuid":"1254028548","full_name":"cku3987/codex-local-cleanup-skill","owner":"cku3987","description":"Clean stale Codex Desktop project/thread metadata under ~/.codex with backup-first safety checks.","archived":false,"fork":false,"pushed_at":"2026-05-30T09:27:14.000Z","size":32,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-30T10:20:13.945Z","etag":null,"topics":["agent-skills","cleanup","codex","codex-desktop","codex-skills","developer-tools","dot-codex","metadata-cleanup","openai-codex","sqlite"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cku3987.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-30T04:05:15.000Z","updated_at":"2026-05-30T09:26:51.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/cku3987/codex-local-cleanup-skill","commit_stats":null,"previous_names":["cku3987/codex-local-cleanup-skill"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/cku3987/codex-local-cleanup-skill","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cku3987%2Fcodex-local-cleanup-skill","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cku3987%2Fcodex-local-cleanup-skill/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cku3987%2Fcodex-local-cleanup-skill/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cku3987%2Fcodex-local-cleanup-skill/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cku3987","download_url":"https://codeload.github.com/cku3987/codex-local-cleanup-skill/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cku3987%2Fcodex-local-cleanup-skill/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33689564,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent-skills","cleanup","codex","codex-desktop","codex-skills","developer-tools","dot-codex","metadata-cleanup","openai-codex","sqlite"],"created_at":"2026-05-30T11:00:54.985Z","updated_at":"2026-05-30T11:01:13.479Z","avatar_url":"https://github.com/cku3987.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Codex Local Cleanup Skill\n\n`codex-local-cleanup` is a Codex skill for safely cleaning stale Codex Desktop project and thread metadata, deleted project traces, archived threads, and old local state under `~/.codex`.\n\nIt is intended for cases where old project entries, archived threads, deleted workspace paths, or mobile-visible sidebar clutter remain after projects were removed or reorganized.\n\nThe goal is for the mobile-visible project list to match the active saved projects shown in Codex Desktop.\n\n![Codex Local Cleanup flow](assets/codex-local-cleanup-flow.svg)\n\n## Translations\n\n- [한국어](docs/README.ko.md)\n- [日本語](docs/README.ja.md)\n- [简体中文](docs/README.zh-CN.md)\n- [繁體中文](docs/README.zh-TW.md)\n- [Русский](docs/README.ru.md)\n- [Español](docs/README.es.md)\n- [Français](docs/README.fr.md)\n- [Deutsch](docs/README.de.md)\n\n## What It Does\n\n- Reads saved project roots from `.codex-global-state.json`.\n- Classifies threads in `state_*.sqlite` by `cwd`.\n- Keeps saved projects, projectless chats, and the current thread by default.\n- Finds non-active project threads outside saved project roots.\n- Finds deleted `cwd` entries and stale archived threads.\n- Backs up affected metadata before changing anything.\n- Cleans matching session JSONL files, thread indexes, global state, `config.toml`, and SQLite rows.\n- Verifies SQLite integrity and checks that removed targets no longer appear.\n\n## Installation\n\nRecommended: ask Codex to install this repository path with the built-in `skill-installer` skill:\n\n```text\n$skill-installer Install the skill from https://github.com/cku3987/codex-local-cleanup-skill/tree/main/codex-local-cleanup\n```\n\nManual install: copy the skill folder into your Codex skills directory:\n\n```powershell\nCopy-Item -Recurse .\\codex-local-cleanup \"$env:USERPROFILE\\.codex\\skills\\codex-local-cleanup\"\n```\n\nRestart Codex Desktop after installation if the skill does not appear immediately.\n\n## Example Prompts\n\n```text\n$codex-local-cleanup Keep my saved projects and projectless chats, then back up and clean non-active project metadata from local Codex.\n```\n\n```text\n$codex-local-cleanup Find deleted cwd threads in my local Codex metadata, back them up, remove only those stale entries, and verify the result.\n```\n\n```text\n$codex-local-cleanup Clean saved-project-outside project traces, but do not delete archived_sessions.\n```\n\n## Safety Notes\n\nThis skill works with local Codex Desktop state. It should always back up before modifying metadata.\n\nImportant risk and permission notes:\n\n- This is local application-state cleanup, not source-code cleanup.\n- It can delete Codex thread metadata, session JSONL files, sidebar indexes, trust entries, and SQLite rows for selected targets.\n- In full-access or no-approval environments, Codex may be able to write immediately. Ask for a read-only inventory first if you are unsure.\n- Do not run broad cleanup from a vague prompt. Review the target list, backup path, and preservation rules before allowing writes.\n- Backups may contain local paths, thread titles, prompts, and conversation content. Keep backups private.\n\nIt should not delete or rewrite:\n\n- `auth.json`\n- `installation_id`\n- `skills/`\n- `plugins/`\n- `automations/`\n- `.sandbox-secrets/`\n- user source projects\n\nThe skill is intentionally conservative. It preserves saved project roots, projectless chats, and the current thread unless explicitly instructed otherwise.\n\n## Repository Layout\n\n```text\ncodex-local-cleanup-skill/\n├─ README.md\n├─ LICENSE\n├─ .gitignore\n└─ codex-local-cleanup/\n   ├─ SKILL.md\n   └─ agents/\n      └─ openai.yaml\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcku3987%2Fcodex-local-cleanup-skill","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcku3987%2Fcodex-local-cleanup-skill","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcku3987%2Fcodex-local-cleanup-skill/lists"}