Skip to content
Back to skills

Src

ASecurity

How to work in `src/`. Read before editing here.

  • 12 stars
  • 0 votes
  • 0 copies
  • 6 views
  • Added September 4, 2026
ai-agentsgo

Works with

  • terminal
  • cli

Security analysis

A100/100

Pro scans all 17 files and shows the line behind each finding

Scanned September 29, 2026

npx -y skills add Kevin-Liu-01/Local-Search --skill src --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Src?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Src
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/kevin-liu-01-src/badge)](https://www.skillsdirectory.com/skills/kevin-liu-01-src)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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.
- `commands/search.rs` owns search, browser-scoped caching, output, and content
  enrichment. Keep cache hits behind live connection verification, but avoid
  attaching a page unless content or an explicit target needs it.
- `updates.rs` checks published releases independently of browser commands.
  Keep automatic notices terminal-only and startup-only, with daily caching,
  bounded HTTPS requests, and an opt-out. `update-check` is explicit JSON output;
  registry failures are advisory, never an implicit install or browser fallback.
- `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. Use graceful CDP
  shutdown by default; SIGKILL requires explicit `--force`.
- 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.

Files in this skill

  • SKILL.md1.6 KB
  • bin/SKILL.md1.2 KB
  • bin/local-browser.rs24 B
  • bin/local-search.rs24 B
  • bin/lsearch.rs439 B
  • browser/SKILL.md1.8 KB
  • browser/cdp.rs14.9 KB
  • browser/discovery.rs14.4 KB
  • browser/mod.rs136 B
  • browser/scripts.rs13 KB
  • cli.rs9.6 KB
  • commands/mod.rs41.7 KB
  • config.rs3.1 KB
  • error.rs2.6 KB
  • lib.rs629 B
  • output.rs1.1 KB
  • ui.rs13.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.