x-bookmarks-panel
CLAUDE.md2 starsChanged 7 months agoMITView on GitHub
Auto-loaded by Claude Code when a session starts at the repo root. Keeps context persistent between sessions. Local panel for triaging x.com bookmarks. Reads a curated HTML file (relatorio-bookmarks-x.html), persists everything in SQLite (data/bookmarks.db), and renders cards with an Execute button that fires either Claude Code or the Claude desktop app (Cowork). Stack: Python 3.11+, Flask 3, SQLite, vanilla HTML/CSS/JS. macOS runtime (launchd). No build step. Fields preserved on update: status, tipo_execucao, notas, instalado, aplicado, projeto_iniciado. The rest is overwritten…
- Reads credentials
In this repository2 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
The file
We split this CLAUDE.md into the rules it gives an agent
9 rules. About 0 are common, 2 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 42
No external deps on the hot path: only Flask. claude, gh, and the Claude desktop app are optional — if missing, the panel logs and moves on.
- Distinctive: line 44
Comment only when the "why" is non-obvious: Don't document the "what" — the code says it.
- Very specific: line 81
New editable field on an opportunity: add it to the migration inside db.migrate(), to the allowed set in api_update() (app.py), and to …
- Very specific: line 83
New action button: add it to .actions-bar in cardHTML() with a data-act="..." attribute, and a new branch in the click handler in …
- Very specific: line 89
Never commit data/, .env, relatorio-bookmarks-x.html, captures, triages, or profile analyses.
- Very specific: line 111
Before coding, read this file, PRD.md, PROGRESS.md when it exists, README.md, project manifests, tests, and the relevant source folders.
- Very specific: line 113
Stop only when the requested work is complete, validation is documented, and GOAL_RESULT.md reflects the outcome.
- Distinctive: line 114
Do not rewrite unrelated architecture, fake successful validation, expose secrets, or push without explicit operator instruction for the …
- Very specific: line 117
Use o repo canonico https://github.com/wesleysimplicio/yool-tuple-hamt.
≈ “Common” is an estimate: at least 1 in 5 of the 28,633 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md — Project context
Auto-loaded by Claude Code when a session starts at the repo root. Keeps context persistent between sessions.
About
Local panel for triaging x.com bookmarks. Reads a curated HTML file (relatorio-bookmarks-x.html), persists everything in SQLite (data/bookmarks.db), and renders cards with an Execute button that fires either Claude Code or the Claude desktop app (Cowork).
Stack: Python 3.11+, Flask 3, SQLite, vanilla HTML/CSS/JS. macOS runtime (launchd). No build step.
File map
.
├── server/
│ ├── app.py # Flask + /api/* routes
│ ├── db.py # SQLite schema + helpers (oportunidades, execucoes, projetos)
│ ├── importer.py # Parses `const BOOKMARKS = [...]` from HTML -> upsert into SQLite
│ ├── executor.py # Claude×Cowork heuristic + pbcopy + osascript + git + gh
│ └── requirements.txt # Flask 3.0+
├── index.html # Single-page UI, vanilla JS
├── scripts/launchd/
│ ├── panel.plist.template # Rendered by install-launchd.sh (replaces __LABEL__/__REPO__/__PORT__)
│ └── watchdog.plist.template
├── examples/
│ └── sample-relatorio.html # Expected HTML source format (synthetic data)
├── setup.sh # Idempotent setup
├── install-launchd.sh # Registers launchd agents
├── start.sh # Foreground run (debug)
├── stop.sh # Stops everything
├── healthcheck.sh # Watchdog, invoked by the plist every 5 min
└── .env.example # Documented env varsCode conventions
- Language: code comments and UI strings stay in pt-BR (this is a pt-BR-first app). Function, variable, and class names in English when possible; the existing pt-BR identifiers (
oportunidade,executar,acao_sugerida,tipo_execucao) stay for backward compatibility with the SQLite schema and API payload. Documentation files (this one, README, DESIGN, CONTRIBUTING, CHANGELOG) are always in English. A Portuguese README lives atREADME.pt-BR.md. - Python: PEP 8, f-strings,
pathliboveros.path,from __future__ import annotations, type hints when they help. - No ORM: SQLite direct via
sqlite3+Row. Schema lives in a singleSCHEMAstring plus an idempotentmigrate()for new columns. - No frontend framework: plain HTML + fetch. State at module level in a
stateobject. No bundler. - Always idempotent:
setup.sh,install-launchd.sh, andimport_html()must be safe to run 1 or 100 times. - No external deps on the hot path: only Flask.
claude,gh, and the Claude desktop app are optional — if missing, the panel logs and moves on. - Commits in English, conventional-ish (
feat:,fix:,chore:,docs:). Keep scope small. - Comment only when the "why" is non-obvious. Don't document the "what" — the code says it.
Main flows
1. Import bookmarks
relatorio-bookmarks-x.html -> importer.extract_bookmarks_array (regex)
-> json.loads
-> db.upsert_oportunidade (unique key: `link`)Fields preserved on update: status, tipo_execucao, notas, instalado, aplicado, projeto_iniciado. The rest is overwritten by the HTML.
2. Execute an opportunity
POST /api/oportunidades/<id>/executar { tipo, criar_projeto, com_github }
-> executor.executar(op_id, ...)
-> heuristic_tipo(op) (if tipo not forced)
-> criar_projeto(op) (optional: git init + CLAUDE.md + gh repo create)
-> montar_prompt(op, tipo, projeto_path)
-> pbcopy + osascript (Terminal) or open -a (Cowork)
-> db.log_execucao + db.update_oportunidade(status='em_progresso')3. Always-on
Main launchd plist -> python server/app.py (KeepAlive + Crashed + NetworkState)
Watchdog launchd plist -> healthcheck.sh (StartInterval=300s)
-> curl /api/healthz
-> on failure: launchctl kickstart -k or reinstallCommon tasks
- New editable field on an opportunity: add it to the migration inside
db.migrate(), to theallowedset inapi_update()(app.py), and tocardHTML()+ its handler (index.html). - New classification heuristic: edit
CODE_KEYWORDS/DESKTOP_KEYWORDS/CODE_CATEGORIES/DESKTOP_CATEGORIESinexecutor.py. Mirror the same logic insiderecommendedTipo()inindex.htmlso the visual recommendation matches the backend. - New action button: add it to
.actions-barincardHTML()with adata-act="..."attribute, and a new branch in theclickhandler inindex.html. If it needs a server-side side effect, create an endpoint inapp.pyand call it fromexecutor.py. - New input HTML format: swap the regex in
importer.extract_bookmarks_array()or replace it with JSON/CSV parsing. The contract is the shape of therowdict passed toupsert_oportunidade()— keep those field names.
Security
- Binds to
127.0.0.1by default. Don't flip it to0.0.0.0lightly — the panel has no auth. - Never commit
data/,.env,relatorio-bookmarks-x.html, captures, triages, or profile analyses..gitignorealready blocks them, but double-check before any push. ghtokens live in the macOS keychain — the panel never reads them.- Folders created by the + New project button land under
<repo>/<slug>/and are also ignored by the panel's.gitignore. Each spawned project keeps its own git.
When Claude Code is invoked here
The panel is the tool. When you (Claude) are invoked inside a subfolder created by + New project, that subfolder has its own CLAUDE.md with bookmark-specific instructions (objective, insight, suggested action). Follow that context, not this one.
This CLAUDE.md is for sessions that edit the panel itself (backend, UI, scripts, docs).
Roadmap summary
See README.md for the full list. Priorities: filterable execution history, webhook-based updates, CSV/JSON export.
<!-- codex-long-running-agent-overlay:start -->Universal Long-Running Agent Overlay
This section complements the repository-specific guidance already in this file. If anything here conflicts with the repo-specific rules above, the repo-specific rules win.
PRD.mdis the task source of truth for long-running sessions.PROGRESS.mdis the persistent checkpoint log.GOAL_RESULT.mdis the final execution report.- Before coding, read this file,
PRD.md,PROGRESS.mdwhen it exists,README.md, project manifests, tests, and the relevant source folders. - Work in small checkpoints, run the smallest relevant validation after each meaningful change, update
PROGRESS.md, and continue until complete or genuinely blocked. - Stop only when the requested work is complete, validation is documented, and
GOAL_RESULT.mdreflects the outcome. - Do not rewrite unrelated architecture, fake successful validation, expose secrets, or push without explicit operator instruction for the active session.
<!-- codex-long-running-agent-overlay:end -->Use o repo canonico https://github.com/wesleysimplicio/yool-tuple-hamt. Leia antes de editar: YOOL_TUPLE_HAMT.md, kernel/yool_tuple_kernel.py, guardrails/cpu_throttle.py, guardrails/disk_gc.py, examples/python/receipts.py e scripts/build_hamt.py.
Ao receber "Implement X": decomponha em grafo Hilbert-indexed, crie tuple raiz, use batch_spawn(depth, branching, compression_threshold) para 1.000.000+ subagents sem enumerar, execute work ativo com spawn_agent, roteie por out/in/rd, route_packet e scan_index, aplique hookwall, compress_token e prune_idle, e use LaneWorkerPool respeitando YOOL_TUPLE_* env vars.
Execute: python kernel/yool_tuple_kernel.py
Responda SEMPRE exatamente neste formato (sem varia??es): [Tuple Space Snapshot] [Active Agents/Subagents] [Total Agents/Subagents] [Pr?ximo Yool a executar] [Resultado parcial]
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

