litho-budgeted-analysis
Skill79 starsChanged 10 months agoApache-2.0View on GitHub
Profile a repository, inspect existing Litho/deepwiki-rs cache state, generate a repo-local Litho config that preserves the user's current global model/provider, and run deepwiki-rs within a target time budget. Use when Claude needs to analyze a repo quickly with Litho, auto-tune exclusions and boundary settings by repo size, reuse cache intelligently, or create a filtered local copy for very large repos.
In this repository31 other files it gives its agents.
- AGENTS.mdAGENTS.md
- backend/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- .claude/skills/oip-proposal/CLAUDE.mdCLAUDE.md
- docs/CLAUDE.mdCLAUDE.md
- frontend/CLAUDE.mdCLAUDE.md
- scripts/CLAUDE.mdCLAUDE.md
- .cursor/rules/development.mdcCursor rule
- browser-useSkill
- agent-browserSkill
- billing-automationSkill
- canvas-designSkill
- claude-agent-sdk-pythonSkill
- doc-expanderSkill
- docxSkill
- frontend-designSkill
- internal-commsSkill
- mcp-builderSkill
- oip-proposalSkill
- paypal-integrationSkill
- pci-complianceSkill
- pdfSkill
- pptxSkill
- skill-creatorSkill
- spec-driven-devSkill
- stripe-integrationSkill
- template-skillSkill
- theme-factorySkill
- webapp-testingSkill
- web-artifacts-builderSkill
- xlsxSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. About 0 are common, 13 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Create a fast, repo-local Litho run plan without changing the user's global model choice.
- Distinctive: line 16
Prefer a direct run.
- Distinctive: line 17
Use filtered-copy mode only when the repo is too large for the time budget.
- Distinctive: line 23
If you want the simplest possible local test, run exactly one file:
- Distinctive: line 35
If you want a detached background run instead:
- Distinctive: line 75
only tunes safe runtime knobs like exclusions, boundary settings, chunking, and concurrency
- Distinctive: line 76
does not overwrite the global config
- Distinctive: line 78
If automatic global-config detection is wrong or unavailable, pass it explicitly:
- Very specific: line 101
Use --dry-run first when you want to inspect the generated plan:
- Very specific: line 107
Use --detach when you want the command to return immediately and monitor progress separately:
- Distinctive: line 117
Always prefer the wrapper in this skill:
- Very specific: line 125
if the current repo's .venv is broken, falls back automatically to uv run --python "$(which python3)" ...
- Distinctive: line 139
start / last output / finish timestamps
- Very specific: line 145
Never change provider, model_efficient, or model_powerful away from the user's current settings.
- Distinctive: line 146
Prefer direct runs with pruning before filtered-copy mode.
- Very specific: line 147
Treat filtered-copy mode as a last resort for very-large repos or when the estimated runtime exceeds the budget.
- Distinctive: line 148
Do not auto-delete cache. Reuse it when fresh.
- Distinctive: line 149
Keep root configs, source files, migrations, schemas, and key architecture docs in filtered-copy mode.
- Very specific: line 153
Read references/heuristics.md when you need the exact repo-class thresholds, cache freshness logic, or filtered-copy inclusion rules.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill 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
Litho Budgeted Analysis
Create a fast, repo-local Litho run plan without changing the user's global model choice.
Workflow
- Profile the repo.
- Detect the effective global Litho config path if possible.
- Inspect
.litho/cachefreshness. - Generate
litho.local.tomlin the target repo. - Prefer a direct run.
- Use filtered-copy mode only when the repo is too large for the time budget.
Scripts
0. Use the one-file local launcher
If you want the simplest possible local test, run exactly one file:
bash scripts/run_local_litho.sh /path/to/repo 15That script:
- runs the full budgeted Litho workflow for the target repo
- streams progress in the current terminal
- writes
.litho/run.log - writes
.litho/run-status.json
If you want a detached background run instead:
bash scripts/run_local_litho.sh /path/to/repo 15 --detachThen watch progress with:
bash scripts/watch_litho_progress.sh /path/to/repo1. Profile the repo
Run:
bash scripts/uv_run.sh scripts/profile_repo.py --repo-path /path/to/repoThis returns JSON including:
- tracked file count
- source-like file count
- total/source-like bytes
- largest directories
- cache presence/freshness
- detected global Litho config path
- repo class (
small,medium,large,very-large)
2. Generate the local config
Run:
bash scripts/uv_run.sh scripts/generate_litho_config.py --repo-path /path/to/repoBehavior:
- writes
/path/to/repo/litho.local.toml - preserves the user's existing provider/model settings
- only tunes safe runtime knobs like exclusions, boundary settings, chunking, and concurrency
- does not overwrite the global config
If automatic global-config detection is wrong or unavailable, pass it explicitly:
bash scripts/uv_run.sh scripts/generate_litho_config.py --repo-path /path/to/repo --global-config /path/to/global/litho.toml3. Run Litho with a time budget
Run:
bash scripts/uv_run.sh scripts/run_litho_analysis.py --repo-path /path/to/repo --time-budget-minutes 15Behavior:
- profiles first
- generates/refreshes
litho.local.toml - chooses direct vs filtered-copy mode
- chooses cache-aware flags (
--skip-preprocessingwhen safe) - executes through
zsh -icwith alias-safe handling - writes
.litho/run.logand.litho/run-status.jsonin the target repo - updates status with phase, command, PID, timestamps, and exit code
Use --dry-run first when you want to inspect the generated plan:
bash scripts/uv_run.sh scripts/run_litho_analysis.py --repo-path /path/to/repo --time-budget-minutes 15 --dry-runUse --detach when you want the command to return immediately and monitor progress separately:
bash scripts/uv_run.sh scripts/run_litho_analysis.py --repo-path /path/to/repo --time-budget-minutes 15 --detach
tail -f /path/to/repo/.litho/run.log
cat /path/to/repo/.litho/run-status.json4. Run through the uv fallback wrapper
Always prefer the wrapper in this skill:
bash scripts/uv_run.sh scripts/profile_repo.py --repo-path /path/to/repoBehavior:
- uses
uv runwith the PEP 723 script metadata - if the current repo's
.venvis broken, falls back automatically touv run --python "$(which python3)" ... - keeps the logic self-contained inside this skill directory
5. Watch progress explicitly
Run:
bash scripts/watch_litho_progress.sh /path/to/repoIt prints:
- current phase
- PID
- start / last output / finish timestamps
- current exit code if finished
- tail of
.litho/run.log
Rules
- Never change
provider,model_efficient, ormodel_powerfulaway from the user's current settings. - Prefer direct runs with pruning before filtered-copy mode.
- Treat filtered-copy mode as a last resort for
very-largerepos or when the estimated runtime exceeds the budget. - Do not auto-delete cache. Reuse it when fresh; ignore it when stale.
- Keep root configs, source files, migrations, schemas, and key architecture docs in filtered-copy mode.
Heuristic Reference
Read references/heuristics.md when you need the exact repo-class thresholds, cache freshness logic, or filtered-copy inclusion rules.
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.

