How to work in `src/`. Read before editing here.
Scanned 9/4/2026
Install to Claude Code
npx -y skills add Kevin-Liu-01/Local-Search --skill src --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Src?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/kevin-liu-01-src)More formats (shields.io, HTML) on the badges page.
---
name: src-skill
description: How to work in `src/`. Read before editing here.
---
# local-search / src
## Purpose
Application code for the CLI, including argument parsing, command dispatch,
typed errors, browser control, and output rendering.
## Mental model & key files
- `src/bin/lsearch.rs` parses Clap arguments and turns typed errors into stable
stderr JSON.
- `lib.rs` exposes the async `run` entry point.
- `cli.rs` is declarative command/argument structure.
- `commands/mod.rs` is orchestration: attach browser, execute command, print
result.
- `error.rs` keeps operator-facing messages and machine-readable error codes in
one place.
## Patterns to follow / invariants
- Keep command handlers thin enough to read from top to bottom.
- Prefer typed `Error` variants over ad hoc strings.
- Any command that may expose browser credentials should redact by default or
require an explicit opt-in flag.
- Do not put CDP JSON protocol plumbing in command handlers when it belongs in
`src/browser/`.
## Common tasks → first action
- New command: add Clap args, add command branch, update README, add CLI test.
- Managed browser cleanup: keep `cleanup` dry-run by default, kill exact managed
listener PIDs only, and never delete profile cookies/data.
- New output mode: update `output.rs` only if the envelope contract changes.
- New error: add variant in `error.rs` and stable `code()` mapping.
## Gotchas
- `run` owns the parsed `Cli`; avoid async closures borrowing `&mut CdpClient`
across helper boundaries unless lifetimes are explicit.
- `read --format text|markdown` and `html` without a path intentionally write raw
body content instead of JSON.
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!