Skip to content
Back to skills

Scip Cli

ASecurity

Read when needing symbol lookup or SQL health dashboards in code.

  • 4 stars
  • 0 votes
  • 1 copy
  • 5 views
  • Added September 26, 2026
developmentjavascripttypescriptpythonrustgojavabashsqlnodegit

Works with

  • cli
  • api

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

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

Scanned November 21, 2026

npx -y skills add flesler/scip-cli --skill scip_cli --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Scip Cli?

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

Security grade badge for Scip Cli
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/flesler-scip-cli/badge)](https://www.skillsdirectory.com/skills/flesler-scip-cli)

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: scip-cli
description: Read when needing symbol lookup or SQL health dashboards in code.
---

TypeScript/JavaScript, Python, Go, Rust — not GraphQL, CSS, or other files. Run from project root.

**Contributors:** `pip install -e ".[dev]"` so bare `scip-cli` on PATH is this checkout.

## Quick guide

|Question|Command|Output|
|---|---|---|
|Definition / body|`code X`|Snippet (default 80 lines/def; `members Class` for big types)|
|Usages|`refs X`|`file:line` refs|
|Symbols in file|`symbols file`|`start-end kind name` (bare filename ok)|
|Find by name|`search pattern`|Matching symbols|
|Who imports this file?|`rdeps file`|Importer paths|
|What does this use?|`deps target`|Outbound deps (symbol or file)|
|Class members|`members Class`|Methods/fields + line ranges|
|Health / risk|`analyze`|SQL dashboard — project, dir, file, or symbol|
|Raw SQL|`query "SELECT …"`|Rows from `index.db` (`--format tsv|csv|json`)|

Default `--limit` is **10** on query commands unless noted. Stdout = records; stderr = warnings/progress. Pipe with `--paths-only` / `--names-only`.

## Gotchas

- **Bare names** — functions, types, classes. Members need qualifiers: `code Widget.run`, `members pkg.MyClass`. Consts/vars are not indexed — use `rg`. Class methods: `members Class`, not bare `code method`.
- **Ambiguity** — `code`/`refs` return up to `--limit` matches; `members`/`analyze` pick first with stderr warning. Narrow with dotted names or query `--path`.
- **Stale index** — run `reindex` after substantive edits (no auto-invalidation).
- **Query `--path` ≠ reindex scope** — query `--path` filters results only. `reindex --path` / `--tsconfig` persist TS scope and replace cache; full `reindex` restores.
- **Monorepos** — walks `tsconfig*.json` (skips `node_modules`, `.git`). Dedupes nested projects. Extra roots: `.scip-cli.json` (README). Query scope: `--path packages/api`.
- **allowJs** — when tsconfig `allowJs: true`, matching `.js`/`.jsx` under `include`/`files` are indexed. No root `tsconfig.json`: `--infer-tsconfig`.
- **First run** may auto-index (parallel by default, `SCIP_CLI_INDEX_WORKERS`). >10 tsconfigs log progress. Prerequisites: Node (TS/Python), Go, or Rust toolchain; `scip` converter auto-downloads. `brew install scip` is the wrong package.

## Pipelines

|Goal|Pipeline|
|---|---|
|Blast radius|`scip-cli rdeps file.ts \|xargs -I{} scip-cli symbols {}`|
|Health briefing|`scip-cli analyze --limit 40 --per-check-limit 5`|
|Importer files|`scip-cli refs Foo --paths-only`|
|Symbols in importers|`scip-cli refs Foo --paths-only \|xargs -I{} scip-cli symbols {}`|
|Classes → members|`scip-cli search Handler --kind class --names-only \|xargs -I{} scip-cli members {}`|
|Members → defs|`scip-cli members Widget --names-only \|xargs -I{} scip-cli code Widget.{}`|
|Topic files|`scip-cli search Dynamo --paths-only`|
|Outbound files|`scip-cli deps file.ts --paths-only`|

`xargs` reopens the index each call — cap fan-out with `--limit` on the first command.

## Commands

### code

```bash
code [--kind KIND] [--limit N] [--max-lines N] [--offset N] [--full] [--path PATH] [--snippet] [--line-numbers] <symbol> [...]
```

`--kind`: `function`, `method`, `class`, `property`. Multiple symbols: each block prefixed on stdout. `--max-lines` per body (default 80; also 32k char cap unless `--full` or `--max-lines 0`). `--offset` is body-relative. `SCIP_CLI_MAX_DEF_LINES` overrides cap.

### refs

```bash
refs [--limit N] [--path PATH] [--paths-only] <symbol> [...]
```

`file:line` per ref (reads source for lines). Multi-symbol groups prefixed on stdout.

### search

```bash
search [--kind KIND] [--limit N] [--path PATH] [--names-only] [--paths-only] <pattern> [...]
```

`file:line kind name`. Patterns OR'd. Filters noisy symbols.

### symbols

```bash
symbols [--limit N] [--path PATH] <file>
```

### rdeps

```bash
rdeps [--limit N] [--path PATH] <file>
```

Bare importer paths on stdout.

### deps

```bash
deps [--limit N] [--path PATH] [--paths-only] <symbol|file>
```

Symbol: deps inside definition range. File: external symbols referenced. Format `file:line  symbol`; `--paths-only` dedupes files.

### members

```bash
members [--limit N] [--path PATH] [--names-only] <symbol>
```

`start:end kind name`. Prefix match under parent; missing ranges filled from source when needed.

### query

```bash
query [--format tsv|csv|json] [--write] <sql> [...]
```

SQL against the cached project `index.db`. **Read-only by default** (`PRAGMA query_only`); `--write` allows mutations (commits after each statement). Default `--format` is **tsv** (header row + tab-separated values). `csv` and `json` (array of objects) are also supported. Prefer `reindex` over hand-editing the cache.

Introspect schema (SQLite catalog + `PRAGMA`):

```bash
query "SELECT name FROM sqlite_schema WHERE type='table' ORDER BY 1"
query "PRAGMA table_info(mentions)"
query "SELECT m.name AS table_name, p.name AS column_name, p.type FROM sqlite_schema m JOIN pragma_table_info(m.name) p WHERE m.type='table' AND m.name NOT LIKE 'sqlite_%' ORDER BY 1, p.cid"
```

### analyze

```bash
analyze [--list-checks] [--limit N] [--per-check-limit N] [--path PATH] [--include-tests] [--priority LEVEL] [--check NAME] [target]
```

**Check names:** `scip-cli analyze --list-checks` (scope + one-line summary; no index required). Glue/slop pass:  
`scip-cli analyze --check dead_exports,dead_files,single_importer_files,one_line_exports --priority high,low --limit 40`

**Two “single place” checks:** `single_importer_files` (project) = whole file has one inbound importer. `single_use_imports` (file target only) = import binding imported once in that file and used once repo-wide.

|Target|Scope|
|---|---|
|_(omit)_|Project dashboards|
|directory|Dir dashboards + per-file sections (indexed files under dir)|
|file|File dashboards + top symbols by external consumers|
|symbol|Pressure, consumers, deps, affected|

Priority **high → medium → low**. `[high]` cycles, dead exports, dead files, stale types (project unreferenced omitted when dead exports runs; file unreferenced omitted when dead-in-file runs). `[medium]` same-file-only, change surface (file). `[low]` single-importer files (`[test-only]` tag), test-only consumers, coupling, bottlenecks, hotspots, `one_line_exports` (tiny exported call-through functions — verify before inlining). `--limit` = total finding rows (default 20); headers/truncation don't count. `--per-check-limit` caps each section. Agents: `--limit 40 --per-check-limit 5`. `--priority high` or `high,medium` (`1`/`2`/`3`) skips lower tiers. `--check NAME` (repeatable/comma) ANDs with priority.

**Easy wins:** cycles, dead exports, dead files (production). Stale types = types with no external refs. Dead = no cross-file refs in index, not `vulture`. Shebang plus manifest entrypoints (`package.json` main/bin/scripts, dist→src mapping; each Python package for pyproject/setup/setup.cfg) are never project-level dead files/exports. `single_importer_files` rows with only test importers are tagged `[test-only]`. File-scoped `analyze path/to/cli.ts` still reports unused symbols in that file. Empty `rdeps` on a hit is often a SCIP miss — verify with `rg -F STEM` (basename in `(...)`, same-file hits ignored).

### reindex

```bash
reindex [--path DIR ...] [--tsconfig GLOB ...] [--exclude [GLOB ...]] [--fresh] [--no-incremental] [--unversioned] [--with-external]
```

`--path` and `--tsconfig` are TS-only and mutually exclusive. `--tsconfig` globs expanded in-tool; one heap per file by default (`SCIP_CLI_TS_INDEX_BATCH_SIZE` overrides). Scope/exclude persist in `metadata.json`.

`--exclude GLOB` drops matching docs post-convert (repeatable; merges `.scip-cli.json` `excludeGlobs`). Bare `--exclude` clears list; `--exclude foo --exclude` keeps `foo`. No `/` = basename; with `/` = repo-relative.

`--fresh` clears persisted metadata (unless combined with scope flags on same command).

**Incremental by default** in git TypeScript repos: reuses `shards/manifest.json` (`git_commit` + per-shard `tsconfig_digest`); skips clean shards. Dirty: git delta ∪ importer closure → fork `--files` → upsert live `index.db`; deletions remove documents. `--no-incremental` or `--fresh` forces full reindex and clears the manifest. Non-git, `--unversioned`, or non-TypeScript projects always full-reindex.

Files in this skill

  • SKILL.md6.2 KB
  • __init__.py80 B
  • __main__.py9 KB
  • analyze/__init__.py63 B
  • analyze/common.py7.7 KB
  • analyze/file.py13.5 KB
  • analyze/graph.py4.6 KB
  • analyze/live.py8 KB
  • analyze/project.py17.3 KB
  • analyze/sections.py7.4 KB
  • analyze/symbol.py6.6 KB
  • analyze/targets.py3.1 KB
  • cache.py3 KB
  • cli_args.py1.6 KB
  • commands/__init__.py36 B
  • commands/analyze.py6.8 KB
  • commands/code.py4.7 KB
  • commands/deps.py4.5 KB
  • commands/members.py3.6 KB
  • commands/rdeps.py1.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.

View all in development →

Comments

Loading comments…

Newsletter

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