[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-79895":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":10,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":21,"topics":22,"createdAt":10,"pushedAt":10,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":15,"starSnapshotCount":15,"syncStatus":29,"lastSyncTime":30,"discoverSource":31},79895,"filetree-skill","nekocode\u002Ffiletree-skill","nekocode","A Claude Code plugin that maintains `FILETREE.md`.","https:\u002F\u002Fnekocode.github.io\u002Ffiletree-skill\u002F",null,"Python",139,8,94,0,3,34,2.86,false,"main",true,[23,24,25],"agent","ai","skills","2026-06-12 02:03:55","# filetree\n\n[中文版](README.zh.md)\n\nA Claude Code plugin that maintains `FILETREE.md` — a one-line description per file with content hashes for staleness detection. Lets the LLM grasp repo layout in a few hundred tokens before touching code.\n\n## Why\n\nEvery new Claude Code session relearns the codebase: `ls`, `grep`, open file, read, repeat. The discovery is expensive and not reusable across sessions.\n\n| Pain point | filetree's answer |\n|-----|-----|\n| LLM keeps rediscovering layout each session | Persisted as `FILETREE.md`, checked into git, shared with collaborators |\n| Summary docs go stale silently | Per-entry content hash; mismatch reveals drift immediately |\n| Rewriting every description on small refactors wastes tokens | `UNCHANGED` bias — LLM refreshes hash only when purpose is intact (~100x cheaper) |\n| Tooling adds a sqlite \u002F daemon \u002F watcher | Single markdown file. Change detection delegated to git. Zero background process |\n\n## Install\n\n**Via marketplace:**\n\n```\n\u002Fplugin marketplace add nekocode\u002Ffiletree-skill\n\u002Fplugin install filetree\n```\n\n**Local development \u002F dog-fooding** (no install needed):\n\n```sh\ncd \u002Fpath\u002Fto\u002Ffiletree-skill\nclaude --plugin-dir .\n```\n\nAfter editing `commands\u002F` or `SKILL.md`, run `\u002Freload-plugins` inside the session for a hot reload.\n\n## Commands\n\n| Command | Purpose |\n|---------|---------|\n| `\u002Ffiletree:init` | Generate `FILETREE.md` from scratch. Refuses to overwrite without confirmation |\n| `\u002Ffiletree:update` | Sync `FILETREE.md` with current repo state (added \u002F changed \u002F removed \u002F renamed) |\n| `\u002Ffiletree:lint` | Read-only drift check. Exits non-zero on drift, CI-friendly. **Does not call the LLM** |\n\nAll commands refuse to commit `FILETREE.md`. You review the diff and commit yourself.\n\n## Wire it into CLAUDE.md \u002F AGENTS.md\n\n`\u002Ffiletree:init` handles this on first run — it scans the repo root for `CLAUDE.md` \u002F `AGENTS.md`, skips files already referencing `FILETREE.md`, and for the rest proposes a bullet whose location and style matches the existing file. You confirm each edit before it lands. Because wiring runs **before** the manifest is hashed, the post-wire content is what enters `FILETREE.md` directly — no second-pass refresh.\n\nCaveats:\n\n- If neither `CLAUDE.md` nor `AGENTS.md` exists, the plugin won't create one — it's your call which (if any) to seed. Create the file you want, then re-run `\u002Ffiletree:init`.\n- Wiring runs at init time only. If you add `CLAUDE.md` \u002F `AGENTS.md` later, re-run `\u002Ffiletree:init` (it'll ask before overwriting `FILETREE.md`) or wire by hand.\n\nTo wire by hand, drop a line like this into your `CLAUDE.md`:\n\n```markdown\n- `.\u002FFILETREE.md` — Per-file purpose index. Read before `ls` \u002F `grep` when overviewing the repo or locating an implementation.\n```\n\nThe agent then treats `FILETREE.md` as a cheap index — one read replaces dozens of `ls` \u002F `grep` \u002F `cat` calls during orientation.\n\n## How It Works\n\n### Manifest format\n\n```markdown\n# Project Filetree\n\n_Auto-maintained by `\u002Ffiletree:update`. Each entry carries a content hash; mismatched hashes indicate stale summaries._\n\n## src\u002Fauth\u002F\n\n- `middleware.py` — JWT validation middleware; parses bearer token and injects user_id into request context \u003C!--hash:a1b2c3d4-->\n- `jwt_utils.py` — Pure JWT signing \u002F verification helpers, framework-agnostic \u003C!--hash:e5f6g7h8-->\n\n## (root)\u002F\n\n- `README.md` — Project entry doc \u003C!--hash:9a8b7c6d-->\n```\n\n- Section header = directory path (trailing `\u002F`); root files live under `(root)\u002F`\n- Each entry stores filename only (not the full path) + summary + 8-char content hash (from `git hash-object`)\n- Stable sort (sections + entries) → no spurious diffs\n\n### Data flow (`\u002Ffiletree:update`)\n\n```\nfiletree.py todo\n  ├─ git ls-files (tracked + untracked, exclude .gitignore)\n  ├─ git hash-object on all paths\n  ├─ git status --porcelain  (rename detection, trust git 50% heuristic)\n  └─ diff vs current FILETREE.md\n        ↓ JSON\n{added, changed, removed, renamed, stats.need_llm}\n        ↓\nLLM processes added (write fresh summary)\n            changed (UNCHANGED or new summary)\n        ↓ JSON via stdin\nfiletree.py apply\n  ├─ UNCHANGED → refresh hash only, keep summary\n  ├─ new summary → overwrite entry\n  ├─ rename → move entry + rehash\n  └─ write FILETREE.md\n```\n\n### UNCHANGED bias\n\nOn a healthy `update`, **80%+ of `changed` items should resolve to `\"UNCHANGED\"`** — refactors, formatting, comment edits, bug fixes, small additions almost always leave a file's purpose intact. The LLM emits a 4-byte `\"UNCHANGED\"` reply; `apply` refreshes the hash and keeps the old summary. The manifest itself carries the memory of \"I already reviewed this version\" — no separate cache needed.\n\n## Compatibility\n\n| Requirement | Version | Notes |\n|---|---|---|\n| `git` | any modern release | Required at runtime; non-git repos fail fast with a clear error |\n| `python` | ≥ 3.9 | Uses PEP 585 `list[dict]` builtin generics. Stdlib only — zero third-party deps |\n| Claude Code | any | Plugin format. `claude` is shipped as a native binary; Node is not required |\n\n## Development\n\n```sh\n# install pytest if you don't have it\npython -m pip install pytest pytest-cov\n\n# run tests\npython -m pytest tests\u002F -q\n\n# with coverage (target: 100% lines)\npython -m pytest tests\u002F --cov=filetree --cov-report=term-missing\n```\n\nTests load the script via `importlib` (see `tests\u002Fconftest.py`), so no package install is needed.\n\nLint your own `FILETREE.md` while iterating:\n\n```sh\npython skills\u002Ffiletree\u002Fscripts\u002Ffiletree.py lint\n```\n\nExit code 1 = drift, 0 = clean. Wire it into pre-commit or CI as needed:\n\n```yaml\n# .github\u002Fworkflows\u002Ffiletree.yml\n- run: python skills\u002Ffiletree\u002Fscripts\u002Ffiletree.py lint\n```\n\n## Non-Goals\n\nTo prevent scope creep — filetree explicitly **does not**:\n\n- Track function \u002F class \u002F hunk-level changes (file-level is the resolution)\n- Build a semantic search or vector index\n- Run a watcher \u002F daemon \u002F background process\n- Auto-commit (review power stays with you)\n- Map dependencies between files (not a call graph)\n\n## License\n\nMIT. See `.claude-plugin\u002Fplugin.json`.\n","filetree-skill 是一个用于维护 `FILETREE.md` 文件的 Claude Code 插件，该文件为项目中的每个文件提供一行描述及内容哈希以检测陈旧性。其核心功能包括自动生成和更新 `FILETREE.md`，并能检测到文件变动后的内容漂移，从而帮助LLM在少量token内快速理解代码库结构。技术特点上，filetree-skill通过将文件信息持久化存储于Git仓库中实现了跨会话的数据共享，并且采用轻量级Markdown文件形式，避免了额外的后台进程开销。适用于需要频繁进行代码审查或协作开发的场景，尤其当团队成员经常切换工作上下文时，能够显著提高效率。",2,"2026-06-11 03:58:26","CREATED_QUERY"]